Intermittent 403 - Failed Connection Errors in Ansible Playbook
cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent 403 - Failed Connection Errors in Ansible Playbook

L0 Member

I have an ansible playbook that creates address,service objects -> security policy -> Commit and push to different device groups. 
Randomly one of the task fails during executing with the error - Failed Connection: URL Error: code: 403 reason: Forbidden. 
This is not specific to any particular module and have seen it happening in panos_address_object, panos_commit_push etc. Any guidance on this ? 

Siddhant_0-1617387452800.png

 

 

1 REPLY 1

L4 Transporter

You are using the REST-API right ? If so maybe you have generated an API key from a username that is not an admin with full permisions ? Because you mention device groups I think that you are using the Ansible with an API key to control Panorama and the error 403 also confirms that REST-API is used not ssh. It is possible that your user that you use the API_key in the Ansible may have access domain just to some device groups or templates.

 

https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api...

 

 

https://docs.paloaltonetworks.com/panorama/9-0/panorama-admin/panorama-overview/role-based-access-co...

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!