mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
358e63232f
* Minor updates to nxos_nxapi tests * Fixed duplicate yaml key issue * Make rubocop happy
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
- debug: msg="START cli/configure.yaml"
|
|
|
|
- set_fact: nxapi_sandbox_option="yes"
|
|
when: platform is search('N7K')
|
|
|
|
- name: Setup - put NXAPI in stopped state
|
|
nxos_nxapi:
|
|
state: absent
|
|
provider: "{{ cli }}"
|
|
|
|
- name: Configure NXAPI
|
|
nxos_nxapi:
|
|
enable_http: no
|
|
enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
|
|
enable_https: yes
|
|
https_port: 9443
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
|
|
- nxos_command:
|
|
commands:
|
|
- show nxapi | json
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
|
|
- include: targets/nxos_nxapi/tasks/platform/n7k/assert_changes.yaml
|
|
when: platform is match('N7K')
|
|
|
|
- include: targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml
|
|
when: platform is match('N5K')
|
|
|
|
- include: targets/nxos_nxapi/tasks/platform/default/assert_changes.yaml
|
|
when: not ( platform is search('N7K')) and not (platform is search('N5K')) and not (platform is search('N35'))
|
|
|
|
- name: Configure NXAPI again
|
|
nxos_nxapi:
|
|
enable_http: no
|
|
enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
|
|
enable_https: yes
|
|
https_port: 9443
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
|
|
- name: Assert configuration is idempotent
|
|
assert:
|
|
that:
|
|
- result.changed == false
|
|
|
|
- debug: msg="END cli/configure.yaml"
|