ansible/test/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml
nkshrishail 01e4c41be4 nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)
* 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
2020-01-08 13:43:23 +05:30

133 lines
2.7 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_ntp_auth sanity test"
- name: Configure text ntp authentication
nxos_ntp_auth: &setup
key_id: 32
md5string: hello
state: absent
ignore_errors: yes
- block:
- name: Configure text ntp authentication
nxos_ntp_auth: &configure_text
key_id: 32
md5string: hello
authentication: off
state: present
register: result
- assert: &true
that:
- "result.changed == true"
- name: Remove text ntp authentication
nxos_ntp_auth: &remove_text
key_id: 32
md5string: hello
authentication: off
state: absent
register: result
- assert: *true
- name: Configure encrypt ntp authentication
nxos_ntp_auth: &configure_encrypt
key_id: 32
md5string: hello
auth_type: encrypt
state: present
register: result
- assert: *true
- name: "Check Idempotence - Configure encrypt ntp authentication"
nxos_ntp_auth: *configure_encrypt
register: result
- assert: &false
that:
- "result.changed == false"
- name: Turn on authentication
nxos_ntp_auth: &authon
authentication: on
state: present
register: result
- assert: *true
- name: "Check Idempotence - Turn on authentication"
nxos_ntp_auth: *authon
register: result
- assert: *false
- name: Turn off authentication
nxos_ntp_auth: &authoff
authentication: off
state: present
register: result
- assert: *true
- name: "Check Idempotence - Turn off authentication"
nxos_ntp_auth: *authoff
register: result
- assert: *false
- name: Add trusted key
nxos_ntp_auth: &tkey
key_id: 32
trusted_key: true
state: present
register: result
- assert: *true
- name: "Check Idempotence - Add trusted key"
nxos_ntp_auth: *tkey
register: result
- assert: *false
- name: Remove trusted key
nxos_ntp_auth: &rtkey
key_id: 32
trusted_key: false
state: present
register: result
- assert: *true
- name: "Check Idempotence - Remove trusted key"
nxos_ntp_auth: *rtkey
register: result
- assert: *false
- name: Remove encrypt ntp authentication
nxos_ntp_auth: &remove_encrypt
key_id: 32
md5string: hello
auth_type: encrypt
authentication: on
state: absent
register: result
- assert: *true
- name: "Check Idempotence - Remove encrypt ntp authentication"
nxos_ntp_auth: *remove_encrypt
register: result
- assert: *false
always:
- name: Cleanup ntp auth config
nxos_ntp_auth: *setup
ignore_errors: yes
- debug: msg="END connection={{ ansible_connection }} nxos_ntp_auth sanity test"