Description
Describe the bug
When using the panos_import module to import software the given credentials are not used. Instead I see the linux user that is running the playbook being used for SSH login.
Expected behavior
I would expect that the module connects to the PA and imports the software update file.
Current behavior
The connection should be made using the "provider" I've given, but running the playbook with -vvv shows me that another username is being used, which results in a "permission denied" error.
Possible solution
- Fix the module to use the given credentials instead.
- While doing that, is it possible to add an option to disregard or accept the "new ssh key"?
Steps to reproduce
-
Build a playbook with this task:
- name: Import files into Palo Alto Firewall
paloaltonetworks.panos.panos_import:
provider: "{{ provider }}"
category: software
filename: "{{ software_file }}"
- name: Import files into Palo Alto Firewall
-
Make sure the variables are ok and a software update file is available and used
-
Run the playbook against a PA with "-vvv"
-
Check the output of the error, near the end there should be something like "@: Permission denied"
Context
I'm trying to locally import and install an update, not all firewalls have an internet connection or Panorama. To automate the update I thought to create a playbook that can import and install the update.
Your Environment
I've set up a simple test environment with a PA-VM and an Ubuntu server with ansible. They are in the same network, so nothing can interfere.
- Collection: paloaltonetworks.panos
- Python: 3.12.3
- Ansible: core 2.17.9
- PAN-OS Python Library & version (e.g. pandevice 0.14.0, pan-os-python 1.0.2):
pan-os-python 1.12.1
pan-python 0.17.0