paloaltonetworks.panos.panos_import module – import file on PAN-OS devices
Note
This module is part of the paloaltonetworks.panos collection (version 2.21.2).
To install it, use: ansible-galaxy collection install paloaltonetworks.panos
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: paloaltonetworks.panos.panos_import
.
New in paloaltonetworks.panos 1.0.0
Synopsis
Import file on PAN-OS device
Requirements
The below requirements are needed on the host that executes this module.
pan-python
requests
requests_toolbelt
Parameters
Parameter |
Comments |
---|---|
Deprecated Use provider to specify PAN-OS connectivity instead. The API key to use instead of generating it using username / password. |
|
When category=keypair, controls if the private key is allowed to be exported from PAN-OS in future. If this parameter is left undefined, the effective value with be no. Choices: |
|
Category of file to import. Choices:
|
|
When category=certificate, this is the name of the certificate object. When category=keypair, the key pair will be associated with this certificate object. |
|
When category=custom-logo, import this logo file here. Choices: |
|
Location of the file to import into device. |
|
Format of the imported certifcate. Choices: |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The IP address or hostname of the PAN-OS device being configured. |
|
Passphrase used to decrypt the certificate and/or private key. |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The password to use for authentication. This is ignored if api_key is specified. |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The port number to connect to the PAN-OS device on. Default: :ansible-option-default:`443` |
|
When category=idp-metadata, the name of the SAML profile to create. |
|
A dict object containing connection details. |
|
The API key to use instead of generating it using username / password. |
|
The IP address or hostname of the PAN-OS device being configured. |
|
The password to use for authentication. This is ignored if api_key is specified. |
|
The port number to connect to the PAN-OS device on. Default: :ansible-option-default:`443` |
|
The serial number of a firewall to use for targeted commands. If ip_address is not a Panorama PAN-OS device, then this param is ignored. |
|
The username to use for authentication. This is ignored if api_key is specified. Default: :ansible-option-default:`"admin"` |
|
(Panorama only) The template this operation should target. Mutually exclusive with template_stack. |
|
(Panorama only) The template stack this operation should target. Mutually exclusive with template. |
|
URL of the file that will be imported to device. |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The username to use for authentication. This is ignored if api_key is specified. Default: :ansible-option-default:`"admin"` |
Notes
Note
category=certificate is used for importing a certificate on its own from a file.
category=keypair is used for importing a certificate and private key from a single file.
PAN-OS connectivity should be specified using provider or the classic PAN-OS connectivity params (ip_address, username, password, api_key, and port). If both are present, then the classic params are ignored.
If the PAN-OS to be configured is Panorama, either template or template_stack must be specified.
Examples
- name: Import software image into PAN-OS
paloaltonetworks.panos.panos_import:
provider: '{{ provider }}'
category: software
file: /tmp/paloaltonetworks.panos.panos_vm-10.0.1
- name: Import certificate
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'certificate'
certificate_name: 'ISRG Root X1'
format: 'pem'
filename: '/tmp/isrgrootx1.pem'
- name: Import content
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'content'
filename: '/tmp/panupv2-all-contents-8322-6317'
- name: Import named configuration snapshot
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'configuration'
filename: '/tmp/config.xml'
- name: Import application block page
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'application-block-page'
filename: '/tmp/application-block-page.html'
- name: Import custom logo
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'custom-logo'
custom_logo_location: 'login-screen'
filename: '/tmp/logo.jpg'
- name: Import SAML metadata profile
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'idp-metadata'
filename: '/tmp/saml_metadata.xml'
profile_name: 'saml-profile'
- name: Import SAML metadata profile to template
paloaltonetworks.panos.panos_import:
provider: '{{ device }}'
category: 'idp-metadata'
filename: '/tmp/saml_metadata.xml'
profile_name: 'saml-profile'
template: firewall-template