|
|
@ -7,7 +7,7 @@
|
|
|
|
nxos_command: &remove_file
|
|
|
|
nxos_command: &remove_file
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- terminal dont-ask
|
|
|
|
- terminal dont-ask
|
|
|
|
- delete nxos.yaml
|
|
|
|
- delete network-integration.cfg
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
|
|
|
@ -18,9 +18,9 @@
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- block:
|
|
|
|
- name: "Copy nxos.yaml to bootflash"
|
|
|
|
- name: "Copy network-integration.cfg to bootflash"
|
|
|
|
nxos_file_copy: ©_file_same_name
|
|
|
|
nxos_file_copy: ©_file_same_name
|
|
|
|
local_file: "./nxos.yaml"
|
|
|
|
local_file: "./network-integration.cfg"
|
|
|
|
file_system: "bootflash:"
|
|
|
|
file_system: "bootflash:"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
username: "{{ ansible_ssh_user }}"
|
|
|
|
username: "{{ ansible_ssh_user }}"
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check Idempotence - Copy nxos.yaml to bootflash"
|
|
|
|
- name: "Check Idempotence - Copy network-integration.cfg to bootflash"
|
|
|
|
nxos_file_copy: *copy_file_same_name
|
|
|
|
nxos_file_copy: *copy_file_same_name
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
@ -45,10 +45,10 @@
|
|
|
|
nxos_command: *remove_file
|
|
|
|
nxos_command: *remove_file
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Copy ios.yaml to bootflash as another name"
|
|
|
|
- name: "Copy inventory.networking.template to bootflash as another name"
|
|
|
|
nxos_file_copy: ©_file_different_name
|
|
|
|
nxos_file_copy: ©_file_different_name
|
|
|
|
local_file: "./ios.yaml"
|
|
|
|
local_file: "./inventory.networking.template"
|
|
|
|
remote_file: "nxos.yaml"
|
|
|
|
remote_file: "network-integration.cfg"
|
|
|
|
file_system: "bootflash:"
|
|
|
|
file_system: "bootflash:"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
username: "{{ ansible_ssh_user }}"
|
|
|
|
username: "{{ ansible_ssh_user }}"
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check Idempotence - Copy ios.yaml to bootflash as another name"
|
|
|
|
- name: "Check Idempotence - Copy inventory.networking.template to bootflash as another name"
|
|
|
|
nxos_file_copy: *copy_file_different_name
|
|
|
|
nxos_file_copy: *copy_file_different_name
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|