I don't think that machines which should allow no incoming traffic (I have some which are lxd containers, managed with https://docs.ansible.com/ansible/latest/modules/lxd_container_module.html instead of the typical ansible method of management over ssh) can be defined currently. e.g. like this:
ansible@myhost:~/testing$ cat group_vars/lxd_containers
---
# https://github.com/Oefenweb/ansible-ufw
ufw_rules:
results in a failure at runtime:
fatal: [lxdhost:testc1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'None' has no attribute 'rule'\n\nThe error appears to be in '/home/ansible/.ansible/roles/oefenweb.ufw/tasks/configure.yml': line 54, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: configure | rules\n ^ here\n"}
I don't think that machines which should allow no incoming traffic (I have some which are lxd containers, managed with https://docs.ansible.com/ansible/latest/modules/lxd_container_module.html instead of the typical ansible method of management over ssh) can be defined currently. e.g. like this:
results in a failure at runtime: