evolinux-base: fallback with warning for ssh without addresses

This commit is contained in:
Jérémy Lecour 2017-09-14 14:26:00 +02:00 committed by Jérémy Lecour
parent 82fda57cdb
commit 3a9b95cedc

View file

@ -1,7 +1,6 @@
--- ---
- debug:
- fail: msg: "Warning: empty 'evolinux_ssh_password_auth_addresses' variable, tasks will be skipped!"
msg: You must provide at least 1 ssh trusted IP
when: evolinux_ssh_password_auth_addresses == [] when: evolinux_ssh_password_auth_addresses == []
- name: Security directives for Evolinux - name: Security directives for Evolinux
@ -16,6 +15,7 @@
insertafter: EOF insertafter: EOF
validate: '/usr/sbin/sshd -T -f %s' validate: '/usr/sbin/sshd -T -f %s'
notify: reload sshd notify: reload sshd
when: not evolinux_ssh_password_auth_addresses == []
# - name: verify Match Address directive # - name: verify Match Address directive
# command: "grep 'Match Address' /etc/ssh/sshd_config" # command: "grep 'Match Address' /etc/ssh/sshd_config"