- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-27-2022 06:23 AM
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
02-03-2022 08:35 AM
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
02-03-2022 10:13 AM
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)]
02-03-2022 10:52 AM
How about pan-os-python?
$ pip list | grep pan
pan-os-python 1.5.1
pan-python 0.16.0
02-03-2022 11:05 AM
Looks OK too.
pip list | grep pan
pan-os-python 1.6.0
pan-python 0.16.0
pandevice 0.14.0
02-03-2022 11:44 AM
I matched your package versions, still works on mine! Have you tried -vvv on your ansible execution to get more details on the failure?
02-03-2022 12:26 PM
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
}
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!