Parameter for panos_facts

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

Parameter for panos_facts

L1 Bithead

Hello,

 

The module documentation for panos_facts says the gather_subset parameter should be a list with values from all, system, session, interfaces, ha, routing, vr, vsys and config,  But when I run a playbook with gather_subset: ['vr']  I get "msg": "Subset must be one of [config, system, ha], got vr".  I'm running the panos colletion 2.9.0.  Where should I start troubleshooting?

 

Peter

6 REPLIES 6

L5 Sessionator

Hi @plonergan, do any values specified in gather_subset work for you? It works fine for me with collection 2.9.0:

 

ansible --version
ansible [core 2.11.5] 
  config file = /Users/jholland/code/github/playground/ansible.cfg
  configured module search path = ['/Users/jholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/jholland/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.9 (main, Nov 21 2021, 03:23:42) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 2.11.3
  libyaml = True

 

Collection             Version
---------------------- -------
amazon.aws             1.4.1  
community.aws          1.4.0  
community.general      4.0.2  
paloaltonetworks.panos 2.9.0  

 

  tasks:
    - name: Gather facts for device
      paloaltonetworks.panos.panos_facts:
        provider: "{{ device }}"
        gather_subset: ['vr']

    - name: Display model, PAN-OS version
      debug:
        msg:
          "FACTS: {{ ansible_facts }}"

 

.
.
.
.
'_ansible_facts_gathered': True, 'net_gather_subset': ['system', 'vr'], 'net_hostname': 'james-vm-series-a', 'net_model': 'PA-VM', 'net_serial': '007951xxxxxxx', 'net_version': '10.1.4', 'net_uptime': '1 days, 18:59:05', 'net_multivsys': 'off', 'net_uncommitted_changes': False, 'net_full_commit_required': False, 'net_virtual_routers': [{'vr_name': 'default', 'vr_iflist': ['ethernet1/4', 'tunnel.1', 'tunnel.20', 'tunnel.30', 'tunnel.50', 'vlan.100', 'ethernet1/1'], 'vr_asn': '8989', 'vr_routerid': '192.168.1.1'}]}"
}

PLAY RECAP ********************************************************************************************************************************************************
firewall                   : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

 

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

gather_subset: ['system'] works fine.  My environment is pretty back-level compared to yours but the panos collection is up to date.

 

ansible --version
ansible 2.9.11
config file = /etc/ansible/ansible.cfg
configured module search path = ['/usr/local/lib/python3.6/site-packages/git_acp/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]

 

How about pan-os-python?

$ pip list | grep pan
pan-os-python      1.5.1
pan-python         0.16.0
Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

Looks OK too.

 

pip list | grep pan
pan-os-python 1.6.0
pan-python 0.16.0
pandevice 0.14.0

I matched your package versions, still works on mine! Have you tried -vvv on your ansible execution to get more details on the failure?

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

Yes, but the results aren't much more informative.

 

{
"msg": "Subset must be one of [ha, system, config], got vr",
"invocation": {
"module_args": {
"provider": {
"api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"ip_address": "lab-pan.net.umd.edu",
"username": "admin",
"port": 443,
"password": null,
"serial_number": null
},
"gather_subset": [
"vr"
],
"username": "admin",
"port": 443,
"ip_address": null,
"password": null,
"api_key": null
}
},
"_ansible_no_log": false,
"changed": false
}


  • 2870 Views
  • 6 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!