I suspect I am missing something simple, but when I try to use the awall module to establish firewall rules on Alpine Linux, ansible hangs on the awall activate task, even though allowing ssh is one of the rules I active. If I ssh to the machine before running the task, the connection remains intact, and I can establish new ssh connections as expected. It is only the ansible connection that seems to get interrupted, but it does successfully populate iptables rules via awall. Furthermore, I do not see the ansible activate task in /var/log/messages. I’m guessing this is because the ssh connection gets broken by the firewall. I am using ansible 2.9.6 and awall 1.7.1-r0, and Alpine Linux 3.11.3 (will try on 3.11.5 soon). Is this just an unavoidable limitation due to the way awall activates, making it impossible to use ansible to configure awall from the ground up?
Thanks for using ansible. To answer your question more information is needed.
-
Which commands did you run, and what actual output did you get (copied as plain text - not as screenshots, images, or other binary attachments).
-
What do the relevant inventory/tasks/playbooks/code/variables look like.
-
The output of ‘ansible --version’
$ ansible --version
ansible 2.9.6
config file = ~/repos/ansible/ansible.cfg
configured module search path = [‘~/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = ~/.local/lib/python3.7/site-packages/ansible
executable location = ~/.local/bin/ansible
python version = 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Here is the playbook: