diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml index f76c1f7..595d689 100644 --- a/roles/ssh/tasks/main.yml +++ b/roles/ssh/tasks/main.yml @@ -47,7 +47,7 @@ iptables_raw: name: sshd_ports state: "{{ (sshd_src_ip is defined and sshd_src_ip | length > 0) | ternary('present','absent') }}" - rules: "-A INPUT -m state --state new -p tcp -m multiport --dports {{ sshd_ports | join(',') }} -s {{ sshd_src_ip | join(',') }} -j ACCEPT" + rules: "-A INPUT -m state --state new -p tcp -m multiport --dports {{ sshd_ports | join(',') }} -s {{ sshd_src_ip | flatten | join(',') }} -j ACCEPT" when: iptables_manage | default(True) tags: ssh,firewall