I have what’s probably a newbie question about automating our Palo Alto firewall with Ansible.
I want to create a playbook that accepts an IP address or FQDN as a variable and returns all the objects with that IP/FQDN and all rules that apply to those objects. By adding this as a template in Tower, I’m trying to let developers answer the question, “My code isn’t working, could the firewall be my problem?” They enter the IP and get back a list of all the rules that apply to it.
My playbook authenticates and returns all objects or all rules with gathered_filter: *
. So far, so good. I’d like to use gathered_filter
to get only those rules that apply to the IP provided.
I want something like gathered_filter: "<field> contains {{ ip_user_entered }}"
but I don’t know what I should put in the <field>
. Where should I look for possible values for <field>
?
The examples in the documentation show three options: description
, ‘name’ and ‘interfaces’. Are those the only fields available for filtering? Or should I be looking at the gathered_xml
?
All suggestions, links, pointers welcome. Thanks!