I figured out how to add a new object to an existing object group, below is a a small snip of my ansible script which run on our Panorama server. Hope this helps vars: < This is the variable used in the script that creates the object, in the ansible script i also require someone to provide their creds vs static user creds rds_server_object: x-t-rds01-app-10.x.x.x cli: ip_address: "{{ inventory_hostname }}" username: "{{ cred }}" password: "{{ creds }}" roles: - role: PaloAltoNetworks.paloaltonetworks tasks: - name: Gather FW Auth Creds include_vars: 'cheat_code.yml' < This yaml file has all the customer specific data, the script uses this data to populate the vars no_log: 'no' ##### This Section adds rds server object to the Customer RDS group ##### - name: Gathering Facts of the Customer RDS server group panos_object_facts: device_group: 'tst-ha-fw' provider: '{{ cli }}' object_type: 'address-group' name_regex: 'Customer RDS-1' register: customer_rds_group - name: Adding new customer RDS server to Customer RDS server group panos_address_group: device_group: 'tst-ha-fw' <- This is the device group that panorama will be targeting provider: '{{ cli }}' name: '{{ item.name }}' description: '{{ item.description | default(omit, true) }}' static_value: '{{ item.static_value + [rds_server_object] }}' tag: '{{ item.tag | default(omit, true) }}' commit: 'no' loop: '{{ customer_rds_group.objects }}' loop_control: label: '{{ item.name }}' when: - item.static_value - rds_server_object not in item.static_value
... View more