diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-06-01 17:51:58 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-06-01 17:51:58 +0200 |
commit | 4115572673efed533e06ab9dfcba95bb77992593 (patch) | |
tree | fdb33ea899b753295e29f433d35cf77f8eee6464 /roles/sshd/tasks/main.yml | |
parent | with_flattened vs loop (diff) |
with_dict -> loop
Diffstat (limited to 'roles/sshd/tasks/main.yml')
-rw-r--r-- | roles/sshd/tasks/main.yml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 2c81f497..9d35e750 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -5,13 +5,15 @@ state: present - name: hardening ssh-server config - with_dict: - IgnoreRhosts: "yes" - PermitRootLogin: "without-password" - PubkeyAuthentication: "yes" - HostbasedAuthentication: "no" - PermitEmptyPasswords: "no" - UseDNS: "no" + vars: + sshd_options: + IgnoreRhosts: "yes" + PermitRootLogin: "without-password" + PubkeyAuthentication: "yes" + HostbasedAuthentication: "no" + PermitEmptyPasswords: "no" + UseDNS: "no" + loop: "{{ sshd_options | dict2items }}" loop_control: label: "{{ item.key }} = {{ item.value }}" lineinfile: |