You've already forked sdn-cursus
Compare commits
4 Commits
371990ef68
...
410ba6242d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
410ba6242d | ||
![]() |
13fb98198f | ||
![]() |
389f0ba805 | ||
![]() |
45b76bfe7f |
@@ -1,3 +1,4 @@
|
||||
# berat
|
||||
---
|
||||
- name: ACL Config
|
||||
hosts: R3
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# gescreven door taha
|
||||
---
|
||||
- hosts: routers
|
||||
gather_facts: false
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# Door Taha aanpassingen ivo
|
||||
---
|
||||
- name: basis services / passwords
|
||||
hosts: routers
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# berat
|
||||
---
|
||||
- name: NAT config
|
||||
hosts: R3
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# als alle playbooks in de zelfde folder als deze script zit
|
||||
# en als alles juist is aangesloten/ssh is ingesteld moet dit
|
||||
# de omgeving automatisch volledig configureren.
|
||||
# de omgeving automatisch volledig configureren. -taha
|
||||
ansible-playbook -u cisco -k backup.yml basis.yml bgp.yml ospf.yml gre.yml dhcp.yml nat.yml acl.yml ipsla.yml save.yml backup.yml
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# ruben
|
||||
import paramiko
|
||||
import time
|
||||
|
||||
@@ -60,7 +61,7 @@ gebruiker = "cisco"
|
||||
wachtwoord = "cisco"
|
||||
|
||||
ssh.send("config terminal\n")
|
||||
ssh.send("username " + gebruiker + " password 0 " + wachtwoord + "\n")
|
||||
ssh.send("username " + gebruiker + " privilege " + "15" + " password 0 " + wachtwoord + "\n")
|
||||
ssh.send("end\n")
|
||||
|
||||
# Wachtwoord encryptie
|
||||
@@ -147,20 +148,20 @@ else:
|
||||
ssh.send("end\n")
|
||||
time.sleep(2)
|
||||
|
||||
# Interface loopback1 configuratie
|
||||
# Interface loopback0 configuratie
|
||||
|
||||
print("\n[INTERFACE lo1 CONFIGURATIE]\n")
|
||||
config_intlo1 = input("Wilt u interface lo1 configureren? [Ja/Nee] ")
|
||||
print("\n[INTERFACE lo0 CONFIGURATIE]\n")
|
||||
config_intlo0 = input("Wilt u interface lo0 configureren? [Ja/Nee] ")
|
||||
|
||||
if config_intlo1 != "Ja":
|
||||
if config_intlo0 != "Ja":
|
||||
pass
|
||||
else:
|
||||
interface_ip = input("Welk IP adres moet " + "int lo1" + " krijgen? ")
|
||||
interface_subnetmask = input("Welk subnetmasker moet " + "int lo1" + " krijgen? ")
|
||||
interface_beschrijving = input("Welke beschrijving moet " + "int lo1" + " krijgen? ")
|
||||
interface_ip = input("Welk IP adres moet " + "int lo0" + " krijgen? ")
|
||||
interface_subnetmask = input("Welk subnetmasker moet " + "int lo0" + " krijgen? ")
|
||||
interface_beschrijving = input("Welke beschrijving moet " + "int lo0" + " krijgen? ")
|
||||
|
||||
ssh.send("config terminal\n")
|
||||
ssh.send("interface " + "lo1" + "\n")
|
||||
ssh.send("interface " + "lo0" + "\n")
|
||||
ssh.send("ip address " + interface_ip + " " + interface_subnetmask + "\n")
|
||||
ssh.send("description " + interface_beschrijving + "\n")
|
||||
ssh.send("no shutdown\n")
|
||||
|
BIN
eindopdracht/virtuele omgeving/scripting schema.xlsx
Normal file
BIN
eindopdracht/virtuele omgeving/scripting schema.xlsx
Normal file
Binary file not shown.
@@ -8,7 +8,7 @@
|
||||
tasks:
|
||||
- name: Show DHCP
|
||||
ios_command:
|
||||
commands: show ip dhcp binding
|
||||
commands: show ip dhcp pool
|
||||
register: output
|
||||
|
||||
- debug: var=output.stdout_lines
|
||||
|
Reference in New Issue
Block a user