diff --git a/tasks/main.yml b/tasks/main.yml index b13f333..a071306 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/vars/linux.yml b/vars/linux.yml new file mode 100644 index 0000000..6c2cf18 --- /dev/null +++ b/vars/linux.yml @@ -0,0 +1,6 @@ +--- + +sshd_config_props: + mode: 0640 + owner: root + group: root diff --git a/vars/openbsd.yml b/vars/openbsd.yml new file mode 100644 index 0000000..1d78a8b --- /dev/null +++ b/vars/openbsd.yml @@ -0,0 +1,7 @@ +--- + +sshd_config_props: + mode: 0644 + owner: root + group: wheel +