Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding the default rules with an empty rule set causes the role to fail #37

Open
tim-seoss opened this issue Jun 10, 2020 · 1 comment

Comments

@tim-seoss
Copy link

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"}
@tersmitten
Copy link
Member

Have you tried changing it to:

ansible@myhost:~/testing$ cat group_vars/lxd_containers
---
# https://github.com/Oefenweb/ansible-ufw
ufw_rules: []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants