Skip to content

Commit c07c29a

Browse files
committed
Update ios.yml
1 parent 024567c commit c07c29a

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

roles/restore/tasks/ios.yml

+4-19
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@
88

99
- name: overwrite the config, this will reboot cisco IOS device
1010
block:
11-
# this causes Exception received: /builddir/build/BUILD/Python-3.8.8/Objects/dictobject.c:1438: bad argument to internal function
12-
# - name: copy file over to flash on network device
13-
# ansible.netcommon.net_put:
14-
# src: "/tmp/{{ rollback_date }}/{{ inventory_hostname }}.txt"
15-
# dest: "flash:{{ rollback_date }}-{{ inventory_hostname }}.txt"
16-
17-
# - name: copy file over to flash on network device
18-
# ansible.builtin.command: "scp -o StrictHostKeyChecking=no -i {{ ansible_ssh_private_key_file }} /tmp/{{ rollback_date }}/{{ inventory_hostname }}.txt {{ inventory_hostname }}:flash:{{ rollback_date }}-{{ inventory_hostname }}.txt"
19-
# delegate_to: localhost
20-
21-
# - name: copy file over to flash on network device
22-
# ansible.builtin.command: "scp -o StrictHostKeyChecking=no -i {{ playbook_dir }}/tmp/ssh_key }} /tmp/{{ rollback_date }}/{{ inventory_hostname }}.txt {{ inventory_hostname }}:flash:{{ rollback_date }}-{{ inventory_hostname }}.txt"
23-
# delegate_to: localhost
24-
# - name: Pause for 30 minutes
25-
# ansible.builtin.pause:
26-
# minutes: 30
27-
2811
- name: copy file over to flash on network device
2912
ansible.builtin.command: "scp -o StrictHostKeyChecking=no /tmp/{{ rollback_date }}/{{ inventory_hostname }}.txt {{ ansible_user }}@{{ inventory_hostname }}:flash:{{ rollback_date }}-{{ inventory_hostname }}.txt"
3013
delegate_to: localhost
@@ -46,8 +29,7 @@
4629
- y
4730
- y
4831
- "\r"
49-
- name: reset the connection
50-
meta: reset_connection
32+
ignore_errors: true
5133

5234
- name: Wait for the network device to reload
5335
wait_for:
@@ -57,6 +39,9 @@
5739
port: 22
5840
vars:
5941
ansible_connection: local
42+
43+
- name: reset the connection
44+
meta: reset_connection
6045
when: restore_mode | default('merge') == "overwrite"
6146

6247
- name: print to terminal window

0 commit comments

Comments
 (0)