diff --git a/ip_addresses.txt b/ip_addresses.txt index 1d3ab5e..387e41f 100644 --- a/ip_addresses.txt +++ b/ip_addresses.txt @@ -1,10 +1,12 @@ 172.16.0.1/22 172.16.4.1/22 172.16.8.1/22 -172.16.12.1/22 172.18.0.1/22 172.18.4.1/22 172.18.8.1/22 +172.19.0.1/21 +172.19.8.1/21 +172.19.16.1/21 172.30.1.1/30 172.31.1.1/24 172.31.2.1/24 diff --git a/netmiko_conn.py b/netmiko_conn.py index 32b6768..85912d0 100644 --- a/netmiko_conn.py +++ b/netmiko_conn.py @@ -6,6 +6,14 @@ "username": "juniper", "password": "juniper123!", } +rtr2 = { + "device_type": "juniper_junos", + "host": "rtr2.domain.com", + "username": "juniper", + "password": "juniper123!", +} -with ConnectHandler(**rtr1) as net_connect: - output = net_connect.send_command("show version") +for device in (rtr1, rtr2): + with ConnectHandler(**device) as net_connect: + output = net_connect.send_command("show version") + print(output) diff --git a/nornir.yaml b/nornir.yaml index fbb353c..5c71043 100644 --- a/nornir.yaml +++ b/nornir.yaml @@ -3,9 +3,9 @@ inventory: plugin: SimpleInventory runner: - plugin: threaded - options: - num_workers: 10 + plugin: serial + # options: + # num_workers: 10 logging: log_file: nornir.out diff --git a/sites.yaml b/sites.yaml index 36e7271..8b6dcf8 100644 --- a/sites.yaml +++ b/sites.yaml @@ -4,3 +4,5 @@ - sfo1 - den1 - den2 +- dal1 +- dal2