diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-05-25 02:53:21 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-05-25 02:53:21 +0200 |
commit | 33621ca937a96cbd027240a1620bc891c08a02b4 (patch) | |
tree | 3004a0b7f137e966d6f1c4a74493305ad2068ebc /roles/sshd/tasks/main.yml | |
parent | fix cloud-install role (diff) |
loop vs. with - the beginnings...
Diffstat (limited to 'roles/sshd/tasks/main.yml')
-rw-r--r-- | roles/sshd/tasks/main.yml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index e638905b..2c81f497 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -5,11 +5,6 @@ state: present - name: hardening ssh-server config - lineinfile: - regexp: "^#?\\s*{{ item.key }}" - line: "{{ item.key }} {{ item.value }}" - dest: /etc/ssh/sshd_config - mode: 0644 with_dict: IgnoreRhosts: "yes" PermitRootLogin: "without-password" @@ -18,7 +13,12 @@ PermitEmptyPasswords: "no" UseDNS: "no" loop_control: - label: "{{ item.key }}" + label: "{{ item.key }} = {{ item.value }}" + lineinfile: + regexp: "^#?\\s*{{ item.key }}" + line: "{{ item.key }} {{ item.value }}" + dest: /etc/ssh/sshd_config + mode: 0644 notify: restart ssh - name: limit allowed users |