Ansible role for PANOS upgrade

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Palo Alto Networks Approved
Palo Alto Networks Approved
Community Expert Verified
Community Expert Verified

Ansible role for PANOS upgrade

L2 Linker

Hi All ,

Do we have any role for PANOS upgrade in collection : 

paloaltonetworks.panos

 

Thanks 

2 accepted solutions

Accepted Solutions

Hi @DeepakVerma, the collection includes over 100 modules so hopefully you are able to achieve you objectives with them. If you have suggestions for roles you would like to see, please let us know.

 

On the active firewall, you can use panos_facts to get the HA state of a device if you need to use this for some reason, here is a snippet showing how to get three different types of HA information, with example output:

  tasks:
    - name: Gather facts for device
      paloaltonetworks.panos.panos_facts:
        provider: "{{ device }}"

    - name: Display HA information
      ansible.builtin.debug:
        msg:
          - "HA Enabled: {{ ansible_facts['net_ha_enabled'] }}"
          - "HA Type: {{ ansible_facts['net_ha_localmode'] }}"
          - "HA Status: {{ ansible_facts['net_ha_localstate'] }}"

 

ok: [lab] => {
    "msg": [
        "HA Enabled: True",
        "HA Type: Active-Passive",
        "HA Status: active",
    ]
}

 

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

View solution in original post

Hi @JimmyHolland ,

Thanks for your help .

Sure , will check and reach out to you for any query related to role or any module.

 

Thanks ,

 

Deepak

View solution in original post

4 REPLIES 4

L5 Sessionator

Hi @DeepakVerma, there are no roles today.

Can you share what kind of roles would have benefit for you? Thank you 🙂

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

Hi @JimmyHolland 
Thanks for the confirmation. 
Basically we are planning to automate our daily operational works/upgrade etc , so was checking if we have any role already present which we can explorer and use if it fit to our requirements. 
Just one more question , In Ansible is there way we can make sure to login to Active firewall  ?
Like in python we can use fw.refresh_ha_active() which make sure to login to active firewall . 
Any feedback/suggestions on this. ?

Hi @DeepakVerma, the collection includes over 100 modules so hopefully you are able to achieve you objectives with them. If you have suggestions for roles you would like to see, please let us know.

 

On the active firewall, you can use panos_facts to get the HA state of a device if you need to use this for some reason, here is a snippet showing how to get three different types of HA information, with example output:

  tasks:
    - name: Gather facts for device
      paloaltonetworks.panos.panos_facts:
        provider: "{{ device }}"

    - name: Display HA information
      ansible.builtin.debug:
        msg:
          - "HA Enabled: {{ ansible_facts['net_ha_enabled'] }}"
          - "HA Type: {{ ansible_facts['net_ha_localmode'] }}"
          - "HA Status: {{ ansible_facts['net_ha_localstate'] }}"

 

ok: [lab] => {
    "msg": [
        "HA Enabled: True",
        "HA Type: Active-Passive",
        "HA Status: active",
    ]
}

 

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

Hi @JimmyHolland ,

Thanks for your help .

Sure , will check and reach out to you for any query related to role or any module.

 

Thanks ,

 

Deepak

  • 2 accepted solutions
  • 2797 Views
  • 4 replies
  • 0 Likes
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!