UFW module issues

23 views
Skip to first unread message

Guy Knights

unread,
Aug 31, 2016, 1:34:58 PM8/31/16
to ansible...@googlegroups.com
I'm running into a confusing issue with the UFW module. I've been using the same role to configure my rules for a while without any problems, but recently I pulled the latest updates for stable-2.1 and now I'm getting the following error for the task below:

- name: enable firewall policy if specified
  ufw:
    policy: reject
    state: enabled
  when: "{{ firewall.enabled }} == True"

FAILED! => {"changed": false, "failed": true, "msg": "Direction must be specified when creating a rule on an interface"}

I haven't specified an interface so the error doesn't really make sense to me, but all the same I tried adding a direction parameter to the above task, and after doing so it gives me the following different error:

FAILED! => {"changed": false, "failed": true, "msg": "ERROR: Invalid syntax\n"}

In the docs for the UFW module it has the following example which is, for all intents and purposes, the same as my original task:

# Allow everything and enable UFW
ufw: state=enabled policy=allow

Any help would be appreciated!

Thanks,
Guy


Brian Coca

unread,
Sep 20, 2016, 11:24:39 AM9/20/16
to ansible...@googlegroups.com
This looks like a bug introduced into the module, please open a ticket at https://github.com/ansible/ansible-modules-extras/

Fill in the template and give as much information as you can.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages