Always connect to active firewall

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

Always connect to active firewall

L2 Linker

HI @gfreeman @btorresgil 


Just checking how we can connect to active firewall using Ansible module .

In python , we are using refresh_ha_active()  and its working , however we need to test using Ansible.
Could you please provide some input here. 




L6 Presenter

Why not just use the facts ansible module and "ansible_net_ha_localstate" and then make the tasks that you want with an Ansible "when" condition to trigger only on the active firewall based on the variable collected by the facts module ?

L0 Member

We just run the playbook against both Panorama ans stop it if the Panorama is not active. If used in multiple playbooks you could create an "stop passive Panorama" role and run it at the beginning of your playbook.


- name: "Panorama HA State - GET Facts"
provider: '{{ device }}'
gather_subset: ['ha']

- name: "Panorama HA State - Show HA State"
msg: "HA State: {{ ansible_net_ha_localstate }} - {{ ( not ansible_net_ha_localstate.endswith('-active') ) | ternary('Not OK -> Need to Stop running further tasks for this host', 'OK') }}"

- name: "Panorama HA State - Stop running Playbook for Hoost"
meta: end_host
- "not ansible_net_ha_localstate.endswith('-active')"





L1 Bithead

Just connect to the loopback IP of the HA firewall pair which will always be the active firewall.

Also if you configure just one floating IP it will be the same deal with connecting to just the active device. It is called active-active but with one floating ip it is actually active-standby:

  • 4 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!