Skip to content

Commit

Permalink
Further abstract Ansible playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
knewell committed Sep 8, 2019
1 parent 3aca3fe commit f51c0c8
Show file tree
Hide file tree
Showing 32 changed files with 2,083 additions and 93 deletions.
2 changes: 1 addition & 1 deletion dhcpd-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: generate dhcpd.hosts entries
hosts: srlab
hosts: "{{ variable_hosts }}"
gather_facts: no
vars_files: group_vars/vmware
tasks:
Expand Down
166 changes: 166 additions & 0 deletions files/ksr-config/ksr-vmx1-config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@

version VERSION
system {
host-name ksr-vmx1;
no-redirects;
root-authentication {
encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA
}
login {
user salt {
uid 2001;
class super-user;
authentication {
encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA
ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA
}
}
}
services {
ssh {
root-login allow;
}
netconf {
ssh;
traceoptions {
file nc.txt size 1m world-readable;
flag all;
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any any;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
chassis {
network-services enhanced-ip;
}
interfaces {
ge-0/0/0 {
description "ksr-vmx2"
unit 0 {
family inet {
address 10.0.0.0/31
}
family inet6;
family mpls;
family iso;
}
}

ge-0/0/1 {
description "ksr-vmx4"
unit 0 {
family inet {
address 10.0.0.2/31
}
family inet6;
family mpls;
family iso;
}
}

ge-0/0/2 {
description "ksr-vmx3"
unit 0 {
family inet {
address 10.0.0.22/31
}
family inet6;
family mpls;
family iso;
}
}

fxp0 {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.201/20;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
family inet6 {
address fec0:0:0:1111::1/128;
}

family iso {
address 49.0001.0010.0100.1001.00;
}

}
}
}
routing-options {
router-id 192.168.0.1;
autonomous-system 65000;
forwarding-table {
export LOAD-BALANCE;
}
static {
route 0.0.0.0/0 {
next-hop 10.39.0.1;
no-readvertise;
preference 255;
}
}
}
protocols {
isis {
source-packet-routing {
srgb start-label 16000 index-range 8000;
node-segment {
ipv4-index 401;
ipv6-index 601;
}
}
level 1 disable;
level 2 wide-metrics-only;
interface ge-0/0/0.0 {
point-to-point;
level 2 metric 1000;
}
interface ge-0/0/1.0 {
point-to-point;
level 2 metric 1000;
}
interface ge-0/0/2.0 {
point-to-point;
level 2 metric 1000;
}
interface lo0.0 {
passive;
}
}
mpls {
interface ge-0/0/0.0;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
}
lldp {
interface ge-0/0/0;
interface ge-0/0/1;
interface ge-0/0/2;
}
}
policy-options {
policy-statement LOAD-BALANCE {
then {
load-balance per-packet;
}
}
}
148 changes: 148 additions & 0 deletions files/ksr-config/ksr-vmx2-config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@

version VERSION
system {
host-name ksr-vmx2;
no-redirects;
root-authentication {
encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA
}
login {
user salt {
uid 2001;
class super-user;
authentication {
encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA
ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA
}
}
}
services {
ssh {
root-login allow;
}
netconf {
ssh;
traceoptions {
file nc.txt size 1m world-readable;
flag all;
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any any;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
chassis {
network-services enhanced-ip;
}
interfaces {
ge-0/0/0 {
description "ksr-vmx1"
unit 0 {
family inet {
address 10.0.0.1/31
}
family inet6;
family mpls;
family iso;
}
}

ge-0/0/1 {
description "ksr-vmx5"
unit 0 {
family inet {
address 10.0.0.4/31
}
family inet6;
family mpls;
family iso;
}
}

fxp0 {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.202/20;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.2/32;
}
family inet6 {
address fec0:0:0:1111::2/128;
}

family iso {
address 49.0001.0010.0100.1002.00;
}

}
}
}
routing-options {
router-id 192.168.0.2;
autonomous-system 65000;
forwarding-table {
export LOAD-BALANCE;
}
static {
route 0.0.0.0/0 {
next-hop 10.39.0.1;
no-readvertise;
preference 255;
}
}
}
protocols {
isis {
source-packet-routing {
srgb start-label 16000 index-range 8000;
node-segment {
ipv4-index 402;
ipv6-index 602;
}
}
level 1 disable;
level 2 wide-metrics-only;
interface ge-0/0/0.0 {
point-to-point;
level 2 metric 1000;
}
interface ge-0/0/1.0 {
point-to-point;
level 2 metric 1000;
}
interface lo0.0 {
passive;
}
}
mpls {
interface ge-0/0/0.0;
interface ge-0/0/1.0;
}
lldp {
interface ge-0/0/0;
interface ge-0/0/1;
}
}
policy-options {
policy-statement LOAD-BALANCE {
then {
load-balance per-packet;
}
}
}
Loading

0 comments on commit f51c0c8

Please sign in to comment.