01e4c41be4
* nxos_integration_tests: Removing obsolete provider parameter * nxos: removing support for local-nxapi plugin * nxos: removing LocalNxapi plugin implementation * nxos_nxapi: removing local plugin usage * REVERT - nxos: removing LocalNxapi plugin implementation * Addressing yamllint issues * Removing the condition on the debug messages * Restoring changes done to nxos_nxapi* tests * Retaining timeout of 500 on nxos_smoke test * Some cleanup * Addressing latest comments * Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
99 lines
2.3 KiB
YAML
99 lines
2.3 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_ntp_options sanity test"
|
|
|
|
- name: "Apply default ntp config"
|
|
nxos_ntp_options: &default
|
|
state: absent
|
|
ignore_errors: yes
|
|
|
|
- block:
|
|
|
|
- name: Configure ntp with master and default stratum
|
|
nxos_ntp_options: &configure_master_default_stratum
|
|
master: true
|
|
logging: true
|
|
state: present
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Check Idempotence - Configure ntp with master and default stratum"
|
|
nxos_ntp_options: *configure_master_default_stratum
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- name: Configure ntp with master and non-default stratum
|
|
nxos_ntp_options: &configure_master_non_default_stratum
|
|
master: true
|
|
stratum: 10
|
|
state: present
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Check Idempotence - Configure ntp with master and non-default stratum"
|
|
nxos_ntp_options: *configure_master_non_default_stratum
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Configure ntp with master and no logging
|
|
nxos_ntp_options: &configure_no_log
|
|
master: true
|
|
stratum: 10
|
|
logging: false
|
|
state: present
|
|
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
|
|
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
|
|
register: result
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_ntp_options sanity test"
|