When using the templates module, I find running ansible-playbook --check 
--diff really useful. If anything has been added to or removed from the 
config file on the server for any reason, ansible shows it shows me the 

My question is if there is any way to achieve similar functionality when 
using the firewalld module. Let's say for example I have a play like this:

- name: Add source addresses to zone
    source: "{{ item }}"
    zone: privateAccess
    state: enabled
    permanent: true
    -          # VPN range
    -   # main office IP address
    -      # datacentre public network range

If someone removed one of those IP addresses from the zone for some reason, 
--check --diff mode will tell me they're missing, but unlike the case with 
the templates module, if someone added their home IP address to the 
privateAccess zone on the server manually, running the playbook in --check 
--diff mode won't tell me that this item has changed.

If I want to ensure that only those IP address ranges specified are 
configured as source addresses for the zone I could of course delete the 
zone and re-create it from scratch, but if I did that, --check mode 
no-longer works at all; the delete zone, create zone and add source 
addresses to zone steps will always report that they have changed.

Is there a way to make --check --diff mode report that IP addresses were 
present in the zone on the server that are not specified in the ansible 

Thanks very much,

James Birkett

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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to