Skip to content

Commit

Permalink
Fix duplication issue in LAN automation workflow manager
Browse files Browse the repository at this point in the history
  • Loading branch information
maaliaj committed Dec 17, 2024
1 parent 87a54c1 commit 8cd0712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/modules/lan_automation_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,12 @@ def extract_lan_automation(self, config):
msg="IP address: {} does not exist in Catalyst Center. Please provide a valid IP address for "
"'lan_automation -> peer_device_management_ip_address'!".format(peer_device_ip), response=[]
)
self.log("Validate peer device management IP address is not the same as primary device IP", "INFO")
if primary_device_ip == peer_device_ip:
self.module.fail_json(
msg="The primary device management IP address '{}' cannot be the same as the peer device IP "
"address '{}'.".format(primary_device_ip, peer_device_ip), response=[]
)
self.log("Peer device management IP address '{}' is valid.".format(peer_device_ip), "DEBUG")
else:
self.log("Peer device IP not provided. Skipping peer device checks.", "INFO")
Expand Down

0 comments on commit 8cd0712

Please sign in to comment.