Skip to content

Commit

Permalink
feat: Add per-admin parameter to Panorama push (#366)
Browse files Browse the repository at this point in the history
* Add per-admin parameter to Panorama push
* Add documentation note for min version reqd
* Adding minimum pan-os-python version
* Fix code formatting
Fixes #361
  • Loading branch information
jamesholland-uk authored Jan 17, 2023
1 parent 1770de9 commit 09d661e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions plugins/modules/panos_commit_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
DOCUMENTATION = """
---
module: panos_commit_push
short_description: Commit Panorama's candidate configuration.
short_description: Push running configuration to managed devices.
description:
- Module that will push the running Panorama configuration to managed devices.
- The new configuration will become active immediately.
Expand Down Expand Up @@ -54,6 +54,11 @@
description:
- A description of the commit.
type: str
admins:
description:
- Push the configuration made by a specific administrator. (PAN-OS 10.2+)
type: list
elements: str
include_template:
description:
- Include device group reference templates.
Expand Down Expand Up @@ -117,6 +122,14 @@
- Production Firewalls
- Staging Firewalls
- Development Firewalls
- name: push admin-specific changes to a device group
panos_commit_push:
provider: "{{ credentials }}"
style: 'device group'
name: 'EMEA_Device_Group'
admins:
- 'ansible-admin'
"""

RETURN = """
Expand All @@ -140,7 +153,7 @@

def main():
helper = get_connection(
min_pandevice_version=(1, 0, 0),
min_pandevice_version=(1, 8, 0), # 1.8.0 for per-admin push in PAN-OS 10.2+
min_panos_version=(8, 0, 0),
argument_spec=dict(
style=dict(
Expand All @@ -156,6 +169,7 @@ def main():
),
name=dict(type="str"),
description=dict(type="str"),
admins=dict(type="list", elements="str"),
include_template=dict(type="bool", default=False),
force_template_values=dict(type="bool", default=False),
devices=dict(type="list", elements="str"),
Expand All @@ -177,6 +191,7 @@ def main():
style=module.params["style"],
name=module.params["name"],
description=module.params["description"],
admins=module.params["admins"],
include_template=module.params["include_template"],
force_template_values=module.params["force_template_values"],
devices=module.params["devices"],
Expand Down

0 comments on commit 09d661e

Please sign in to comment.