Skip to content

Commit

Permalink
fix(panos_device_group): Do not move a Device Group if state is set t…
Browse files Browse the repository at this point in the history
…o gathered (#484)
  • Loading branch information
jamesholland-uk authored Sep 8, 2023
1 parent 0761d36 commit 93d61a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/modules/panos_device_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def post_state_handling(self, obj, result, module):
else:
parent = module.params["parent"]
result["diff"]["after_parent"] = parent
if obj.opstate.dg_hierarchy.parent != parent:
if obj.opstate.dg_hierarchy.parent != parent and module.params["state"] in (
"present",
"replaced",
"merged",
):
result["changed"] = True
obj.opstate.dg_hierarchy.parent = parent
if not module.check_mode:
Expand Down

0 comments on commit 93d61a7

Please sign in to comment.