Cleaned up linting items
This commit is contained in:
parent
e7137317e7
commit
3e2bfdda93
@ -4,7 +4,7 @@ sshd_config_path: /etc/ssh
|
||||
|
||||
ssh_port: 22
|
||||
ssh_address_family: any
|
||||
ssh_listen_addresses:
|
||||
ssh_listen_addresses:
|
||||
- 0.0.0.0
|
||||
|
||||
ssh_host_key_file: /etc/ssh/ssh_host_ed25519_key
|
||||
@ -35,10 +35,10 @@ ssh_x11_forwarding: 'no'
|
||||
|
||||
ssh_print_motd: 'no'
|
||||
|
||||
ssh_permit_user_env: False
|
||||
ssh_permit_user_env: false
|
||||
ssh_accept_env:
|
||||
- LANG
|
||||
- 'LC_*'
|
||||
|
||||
ssh_banner: True
|
||||
ssh_banner: true
|
||||
ssh_banner_file: /etc/issue.net
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Ensure ssh server is installed
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: openssh-server
|
||||
state: present
|
||||
|
||||
|
@ -1,26 +1,29 @@
|
||||
---
|
||||
|
||||
- name: Ensure destination for sshd_config exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ sshd_config_path }}"
|
||||
mode: '0644'
|
||||
state: directory
|
||||
|
||||
- name: Write sshd_config file
|
||||
template:
|
||||
src: ../templates/sshd_config.j2
|
||||
ansible.builtin.template:
|
||||
src: sshd_config.j2
|
||||
dest: "{{ sshd_config_path }}/sshd_config"
|
||||
mode: '0644'
|
||||
become: true
|
||||
register: sshd_config_file
|
||||
|
||||
- name: Restart service
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: sshd
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: restarted
|
||||
when: sshd_config_file.changed
|
||||
|
||||
- name: Write banner file
|
||||
template:
|
||||
src: ../templates/issue.net.j2
|
||||
ansible.builtin.template:
|
||||
src: issue.net.j2
|
||||
dest: "{{ ssh_banner_file }}"
|
||||
mode: '0644'
|
||||
when: ssh_banner
|
||||
|
Loading…
x
Reference in New Issue
Block a user