mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 16:11:22 -07:00
Fixing nxos_ntp when no config exists (#19678)
This commit is contained in:
parent
962a592628
commit
c58278b1c2
1 changed files with 38 additions and 36 deletions
|
@ -400,7 +400,9 @@ def get_ntp_peer(module):
|
|||
command = 'show run | inc ntp.(server|peer)'
|
||||
ntp_peer_list = []
|
||||
ntp = execute_show_command(
|
||||
command, module, command_type='cli_show_ascii')[0]
|
||||
command, module, command_type='cli_show_ascii')
|
||||
if ntp:
|
||||
ntp = ntp[0]
|
||||
|
||||
ntp_regex = (
|
||||
".*ntp\s(server\s(?P<address>\S+)|peer\s(?P<peer_address>\S+))"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue