You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command will work when being entered directly into the device via the pan-os cli, but seems to get malformed when using ansible.
Expected behavior
I would expect that a command that runs correctly on the device to work with the panos_op module.
Current behavior
When running a command like the following...
- name: Get the traffic infopaloaltonetworks.panos.panos_op:
provider: "{{ device }}"cmd: "show session all filter from private to public"cmd_is_xml: falseregister: traffic_info
Fails with the following error:
TASK [verify : Get the traffic info] ****************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to run command : show session all filter from private to "public" : show -> session -> all -> filter -> from is invalid"}
Possible solution
A current work around is that if you convert the command to XML... it might work.
- name: Get the traffic infopaloaltonetworks.panos.panos_op:
provider: "{{ device }}"cmd: "<show><session><all><filter><from>private</from><to>public</to></filter></all></session></show>"cmd_is_xml: trueregister: traffic_info
The above example works but some commands still fail.. like
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to run XML command : : invalid client cli"}
Steps to reproduce
Just run this command show session all filter from private to public
Context
I'm trying to test that our vm-series firewall in AWS has a valid configuration and is passing traffic correctly. I figured a good way to do that would be to pull down the traffic logs and make sure most of the "flows" are not ending in "ageing-out".
Describe the bug
The command will work when being entered directly into the device via the pan-os cli, but seems to get malformed when using ansible.
Expected behavior
I would expect that a command that runs correctly on the device to work with the panos_op module.
Current behavior
When running a command like the following...
Fails with the following error:
Possible solution
A current work around is that if you convert the command to XML... it might work.
The above example works but some commands still fail.. like
<show><log><traffic></traffic></log></show>
fails with:Steps to reproduce
show session all filter from private to public
Context
I'm trying to test that our vm-series firewall in AWS has a valid configuration and is passing traffic correctly. I figured a good way to do that would be to pull down the traffic logs and make sure most of the "flows" are not ending in "ageing-out".
Your Environment
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/shadycuz/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/shadycuz/.pyenv/versions/3.10.11/lib/python3.10/site-packages/ansible
ansible collection location = /home/shadycuz/.ansible/collections:/usr/share/ansible/collections
executable location = /home/shadycuz/.pyenv/versions/3.10.11/bin/ansible
python version = 3.10.11 (main, Apr 19 2023, 15:29:50) [GCC 11.3.0] (/home/shadycuz/.pyenv/versions/3.10.11/bin/python3.10)
jinja version = 3.1.2
libyaml = True
pan-os-python 1.8.0
pan-python 0.17.0
panos-upgrade-assurance 0.3.0
The text was updated successfully, but these errors were encountered: