diff options
author | kedarX <4506537+kedarX@users.noreply.github.com> | 2017-09-11 14:45:00 +0530 |
---|---|---|
committer | kedarX <4506537+kedarX@users.noreply.github.com> | 2017-09-11 21:37:28 +0530 |
commit | 911add8bc0dd6142daa7d8b9ae8a2fc0b5daae8d (patch) | |
tree | 88371cfb30b006cd6eee060acc9fb8c95a5539ab | |
parent | d043ba2673d20eb84b2d1d895c0e8033ec9b303e (diff) | |
download | ansible-nxos_pim_rp_address_idempotence_fix.tar.gz |
#27499 : Fixes idempotence issue for nxos_pim_rp_address modulenxos_pim_rp_address_idempotence_fix
-rw-r--r-- | lib/ansible/modules/network/nxos/nxos_pim_rp_address.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/ansible/modules/network/nxos/nxos_pim_rp_address.py b/lib/ansible/modules/network/nxos/nxos_pim_rp_address.py index d688f1753f..78952a425c 100644 --- a/lib/ansible/modules/network/nxos/nxos_pim_rp_address.py +++ b/lib/ansible/modules/network/nxos/nxos_pim_rp_address.py @@ -99,15 +99,15 @@ def get_existing(module, args): values = line.split() if values[0] != address: continue - existing['bidir'] = existing.get('bidir') or 'bidir' in line + if len(values) > 2: - value = values[1] - if values[2] == 'route-map': + value = values[2] + if values[1] == 'route-map': existing['route_map'] = value - elif values[2] == 'prefix-list': + elif values[1] == 'prefix-list': existing['prefix_list'] = value - elif values[2] == 'group-list': + elif values[1] == 'group-list': existing['group_list'] = value return existing @@ -159,7 +159,6 @@ def main(): ['group_list', 'prefix_list'], ['route_map', 'prefix_list']], supports_check_mode=True) - warnings = list() check_args(module, warnings) result = {'changed': False, 'commands': [], 'warnings': warnings} |