Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added upgrade playbook for cisco IOS
- Loading branch information
Anas
committed
Jan 6, 2017
1 parent
295cff2
commit 7aebe23
Showing
7 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
backup/* | ||
images/* | ||
*.save | ||
*.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
- name: Copy file to a Cisco IOS router | ||
hosts: ios | ||
hosts: csr | ||
|
||
tasks: | ||
- ntc_file_copy: | ||
platform: cisco_ios_ssh | ||
local_file: change_hostname.yml | ||
local_file: images/csr1000v-universalk9.03.12.00.S.154-2.S-std.SPA.bin | ||
host: "{{ inventory_hostname }}" | ||
username: vagrant | ||
password: cisco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
[ios] | ||
csr ansible_host=192.168.0.201 | ||
csr3 ansible_host=192.168.0.203 | ||
|
||
[junos] | ||
vsrx ansible_host=192.168.0.130 | ||
|
||
[local] | ||
local ansible_host=127.0.0.1 ansible_python_interpreter=python | ||
local ansible_host=127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
- hosts: all | ||
- hosts: csr | ||
tasks: | ||
- ios_command: | ||
commands: show arp | ||
host: "{{inventory_hostname}}" | ||
provider: "{{cli}}" | ||
when: "'ios' in group_names" | ||
- junos_command: | ||
commands: show arp | ||
provider: "{{netconf}}" | ||
when: "'junos' in group_names" | ||
notify: test | ||
|
||
handlers: | ||
- name: test | ||
raw: "show hostname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
--- | ||
- hosts: all | ||
|
||
- hosts: localhost | ||
connection: local | ||
gather_facts: yes | ||
tasks: | ||
- set_fact: mydate="{{lookup('pipe','date +%Y%m%d%H%M%S')}}" | ||
- debug: var=mydate | ||
- name: print time | ||
debug: var=ansible_date_time | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters