Fix rights for sshd_config
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
---
|
||||
|
||||
- name: sshd | Setup sshd_config
|
||||
- name: unbound | Load system-specific vars
|
||||
include_vars: "{{ ansible_system | lower }}.yml"
|
||||
|
||||
- name: sshd | Deploy sshd_config
|
||||
template:
|
||||
src: "{{ sshd_config_template }}"
|
||||
dest: /etc/ssh/sshd_config
|
||||
mode: 0640
|
||||
owner: root
|
||||
group: root
|
||||
src: "{{ sshd_config_template }}"
|
||||
dest: /etc/ssh/sshd_config
|
||||
mode: "{{ sshd_config_props.mode }}"
|
||||
owner: "{{ sshd_config_props.owner }}"
|
||||
group: "{{ sshd_config_props.group }}"
|
||||
validate: sshd -t -f %s
|
||||
notify: sshd | Apply config
|
||||
|
||||
|
6
vars/linux.yml
Normal file
6
vars/linux.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
sshd_config_props:
|
||||
mode: 0640
|
||||
owner: root
|
||||
group: root
|
7
vars/openbsd.yml
Normal file
7
vars/openbsd.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
sshd_config_props:
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: wheel
|
||||
|
Reference in New Issue
Block a user