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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANNH9mtE%2BJPEEjq%2B%2BA59EsnVUoXMKrAbOfi6EBxZ37J7rfKEUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to