-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating to network_cli connection method
updating to support network_cli connection method. The older legacy provider method will be stored as oldmethod.yml until the deprecation process starts.
- Loading branch information
Showing
14 changed files
with
111 additions
and
42 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
tasks: | ||
- nxos_vlan: | ||
vlan_id: 10 | ||
name: STORAGE | ||
provider: "{{login_info}}" |
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,7 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
connection: network_cli | ||
tasks: | ||
- nxos_vlan: | ||
vlan_id: 10 | ||
name: STORAGE | ||
provider: "{{login_info}}" |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
tasks: | ||
- nxos_config: | ||
backup: yes | ||
provider: "{{login_info}}" |
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,7 +1,6 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
connection: network_cli | ||
tasks: | ||
- nxos_config: | ||
backup: yes | ||
provider: "{{login_info}}" |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
tasks: | ||
- nxos_snmp_user: | ||
user: exampleuser | ||
group: network-admin | ||
authentication: sha | ||
pwd: testPASS123 | ||
provider: "{{login_info}}" |
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,10 +1,9 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
connection: network_cli | ||
tasks: | ||
- nxos_snmp_user: | ||
user: exampleuser | ||
group: network-admin | ||
authentication: sha | ||
pwd: testPASS123 | ||
provider: "{{login_info}}" |
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,3 +1,9 @@ | ||
login_info: | ||
username: admin | ||
password: Bullf00d | ||
|
||
login_info_eos: | ||
username: admin | ||
password: Bullf00d! | ||
authorize: True | ||
auth_pass: DURHAM! |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
localhost | ||
|
||
[mac] | ||
192.168.2.1 | ||
|
||
[cisco] | ||
n9k ansible_host=192.168.2.3 ansible_user=admin ansible_password=Bullf00d | ||
|
||
[cisco:vars] | ||
ansible_network_os=nxos | ||
|
||
[arista] | ||
eos ansible_host=192.168.2.10 | ||
|
||
[arista:vars] | ||
ansible_network_os=eos | ||
ansible_become=yes | ||
ansible_become_method=enable | ||
ansible_user=admin | ||
ansible_password=Bullf00d! | ||
ansible_become_pass=DURHAM! | ||
|
||
[network:children] | ||
cisco | ||
arista |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- hosts: arista | ||
connection: local | ||
tasks: | ||
- eos_config: | ||
lines: | ||
- no switchport | ||
- ip address 172.16.1.1/24 | ||
parents: interface Ethernet1 | ||
provider: "{{login_info_eos}}" |
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,10 +1,9 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
- hosts: arista | ||
connection: network_cli | ||
tasks: | ||
- nxos_config: | ||
- eos_config: | ||
lines: | ||
- no switchport | ||
- ip address 172.16.1.1/24 | ||
parents: interface Ethernet1/20 | ||
provider: "{{login_info}}" | ||
parents: interface Ethernet1 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
gather_facts: False | ||
tasks: | ||
- name: run show version | ||
nxos_facts: | ||
provider: "{{login_info}}" | ||
- debug: | ||
var: ansible_net_version |
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,10 +1,9 @@ | ||
--- | ||
- hosts: cisco | ||
connection: local | ||
connection: network_cli | ||
gather_facts: False | ||
tasks: | ||
- name: run show version | ||
nxos_facts: | ||
provider: "{{login_info}}" | ||
- debug: | ||
var: ansible_net_version |