mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
fix nxos_ntp_options (#38695)
This commit is contained in:
@@ -31,20 +31,9 @@
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Remove ntp with master and default stratum
|
||||
nxos_ntp_options: &remove_master_default_stratum
|
||||
logging: true
|
||||
master: true
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Configure ntp with master and non-default stratum
|
||||
nxos_ntp_options: &configure_master_non_default_stratum
|
||||
master: true
|
||||
logging: true
|
||||
stratum: 10
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
@@ -58,16 +47,57 @@
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Remove ntp with master and non-default stratum
|
||||
nxos_ntp_options: &remove_master_non_default_stratum
|
||||
logging: true
|
||||
- name: Configure ntp with master and no logging
|
||||
nxos_ntp_options: &configure_no_log
|
||||
master: true
|
||||
state: absent
|
||||
stratum: 10
|
||||
logging: false
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence - Configure ntp with master and no logging"
|
||||
nxos_ntp_options: *configure_no_log
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Configure ntp with logging and no master
|
||||
nxos_ntp_options: &configure_no_master
|
||||
master: false
|
||||
logging: true
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence - Configure ntp with logging and no master"
|
||||
nxos_ntp_options: *configure_no_master
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: "Configure ntp with master and non-default stratum again"
|
||||
nxos_ntp_options: *configure_master_non_default_stratum
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Remove ntp options
|
||||
nxos_ntp_options: *default
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence - Remove"
|
||||
nxos_ntp_options: *default
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
always:
|
||||
- name: Cleanup ntp config
|
||||
nxos_ntp_options: *default
|
||||
|
||||
@@ -1347,7 +1347,6 @@ lib/ansible/modules/network/nxos/nxos_igmp_interface.py E326
|
||||
lib/ansible/modules/network/nxos/nxos_interface.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_lldp.py E326
|
||||
lib/ansible/modules/network/nxos/nxos_logging.py E325
|
||||
lib/ansible/modules/network/nxos/nxos_ntp_options.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_nxapi.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_nxapi.py E325
|
||||
lib/ansible/modules/network/nxos/nxos_nxapi.py E326
|
||||
|
||||
Reference in New Issue
Block a user