Skip to content

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

Description

@tim-seoss

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"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions