Adding Netbox

This commit is contained in:
Patrick Toal
2019-05-06 00:34:45 -04:00
parent 832502de34
commit 6e2205a046
278 changed files with 12767 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
---
- name: validate ios_checkpoint_filename is defined
fail:
msg: "missing required var: ios_checkpoint_filename"
when: ios_checkpoint_filename is undefined
- name: get current files on disk
cli:
command: dir
register: ios_dir_listing
- name: remove old checkpoint file (if necessary)
cli:
command: "delete /force flash:/{{ ios_checkpoint_filename }}"
when: ios_checkpoint_filename in ios_dir_listing.stdout
# copy the current running-config to the local flash disk on the target device.
# This will be used both for restoring the current config if a failure happens
# as well as performing a configuration diff once the new config has been
# loaded.
- name: create a checkpoint of the current running-config
ios_command:
commands:
- command: "copy running-config flash:{{ ios_checkpoint_filename }}"
prompt: ["\\? "]
answer: "{{ ios_checkpoint_filename }}"