File tree 1 file changed +4
-19
lines changed
1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change 8
8
9
9
- name : overwrite the config, this will reboot cisco IOS device
10
10
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
-
28
11
- name : copy file over to flash on network device
29
12
ansible.builtin.command : " scp -o StrictHostKeyChecking=no /tmp/{{ rollback_date }}/{{ inventory_hostname }}.txt {{ ansible_user }}@{{ inventory_hostname }}:flash:{{ rollback_date }}-{{ inventory_hostname }}.txt"
30
13
delegate_to : localhost
46
29
- y
47
30
- y
48
31
- " \r "
49
- - name : reset the connection
50
- meta : reset_connection
32
+ ignore_errors : true
51
33
52
34
- name : Wait for the network device to reload
53
35
wait_for :
57
39
port : 22
58
40
vars :
59
41
ansible_connection : local
42
+
43
+ - name : reset the connection
44
+ meta : reset_connection
60
45
when : restore_mode | default('merge') == "overwrite"
61
46
62
47
- name : print to terminal window
You can’t perform that action at this time.
0 commit comments