1

Compare commits

..

4 Commits

Author SHA1 Message Date
Ventilaar
410ba6242d pool showen 2022-01-18 14:56:05 +01:00
Ventilaar
13fb98198f namen toegevoegd enz... 2022-01-18 14:55:47 +01:00
Ventilaar
389f0ba805 laatste versie schema 2022-01-18 14:55:23 +01:00
Ventilaar
45b76bfe7f aanpassingen 2022-01-18 14:55:10 +01:00
8 changed files with 16 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
# berat
---
- name: ACL Config
hosts: R3

View File

@@ -1,3 +1,4 @@
# gescreven door taha
---
- hosts: routers
gather_facts: false

View File

@@ -1,3 +1,4 @@
# Door Taha aanpassingen ivo
---
- name: basis services / passwords
hosts: routers

View File

@@ -1,3 +1,4 @@
# berat
---
- name: NAT config
hosts: R3

View File

@@ -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

View File

@@ -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")

Binary file not shown.

View File

@@ -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