Skip to content

Commit

Permalink
Update srlab branch
Browse files Browse the repository at this point in the history
  • Loading branch information
knewell committed Feb 16, 2019
1 parent d56d579 commit 120d779
Show file tree
Hide file tree
Showing 34 changed files with 360 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ pip-selfcheck.json
.retry
group_vars/vmware
*.ova
*.iso
70 changes: 0 additions & 70 deletions deploy-topo.yml

This file was deleted.

46 changes: 46 additions & 0 deletions dhcpd_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
- name: generate dhcpd.hosts entries
hosts: srlab
gather_facts: no
vars_files: group_vars/vmware
tasks:
- name: gather facts
delegate_to: localhost
vmware_guest_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
# esxi_hostname: "{{ esxi_hostname }}"
validate_certs: False
# datastore: "host 2 - datastore 2"
datacenter: "NS Lab"
# cluster: "NS Lab"
name: "{{ inventory_hostname }}-vcp"
register: facts
- name: edit dhcpd.hosts
blockinfile:
path: /etc/dhcp/dhcpd.hosts
block: |
host {{ inventory_hostname }} {
hardware ethernet {{ facts.instance.hw_eth0.macaddress }};
fixed-address {{ ansible_host }};
option JUNOS.transfer-mode "http";
option JUNOS.config-file-name "{{ inventory_hostname }}.conf";
}
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ inventory_hostname }}"
delegate_to: dhcpd
become: True
- name: restart dhcpd
systemd:
name: isc-dhcp-server
state: restarted
delegate_to: dhcpd
become: True
run_once: True
- name: deploy vmx configs
template:
src: templates/vmx_base.conf.j2
dest: "/var/www/html/{{ inventory_hostname }}.conf"
mode: 0644
delegate_to: dhcpd
become: True
32 changes: 0 additions & 32 deletions dhcpd_deploy_iso.yml

This file was deleted.

38 changes: 29 additions & 9 deletions dhcpd_server.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
---
# This playbook just apply debops.dhcpd Role to a target node.
- name: Infrastructure Services [DHCP server]
- name: Deploy Infrastructure Services [DHCP server]
hosts: dhcpd
become: True

vars_files:
- vars-dhcpd.yml

roles:
- role: debops.dhcpd
tags: dhcpd
tasks:
- name: Install ISC dhcpd
apt:
name: isc-dhcp-server
update_cache: yes
- name: copy dhcpd.conf
template:
src: templates/dhcpd.conf.j2
dest: /etc/dhcp/dhcpd.conf
mode: 0644
- name: create dhcpd.hosts
copy:
content: ""
dest: /etc/dhcp/dhcpd.hosts
force: no
mode: 0644
- name: restart dhcpd
service:
name: isc-dhcp-server
state: restarted
- name: Install nginx
apt:
name: nginx
update_cache: yes
- name: start nginx
service:
name: nginx
state: started
18 changes: 9 additions & 9 deletions files/nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nodes:
vlan: 0}
ge-0/0/2.0: {cost: 1000, ip: 10.0.0.22, iso: true, mask: 31, mpls: true, remote: srlab-vmx3,
vlan: 0}
mgmt: 10.39.0.57
mgmt: 10.39.0.101
rid: 192.168.0.1
sid: 10
switches: [srlab-vmx1-0--srlab-vmx2-0, srlab-vmx1-1--srlab-vmx4-1, srlab-vmx1-2--srlab-vmx3-2]
Expand All @@ -30,7 +30,7 @@ nodes:
vlan: 0}
ge-0/0/1.0: {cost: 1000, ip: 10.0.0.4, iso: true, mask: 31, mpls: true, remote: srlab-vmx5,
vlan: 0}
mgmt: 10.39.0.58
mgmt: 10.39.0.102
rid: 192.168.0.2
sid: 20
switches: [srlab-vmx1-0--srlab-vmx2-0, srlab-vmx2-1--srlab-vmx5-1]
Expand All @@ -46,7 +46,7 @@ nodes:
vlan: 0}
ge-0/0/4.0: {cost: 1000, ip: 10.0.0.24, iso: true, mask: 31, mpls: true, remote: srlab-vmx6,
vlan: 0}
mgmt: 10.39.0.59
mgmt: 10.39.0.103
rid: 192.168.0.3
sid: 30
switches: [srlab-vmx1-2--srlab-vmx3-2, srlab-vmx3-4--srlab-vmx6-4]
Expand All @@ -67,7 +67,7 @@ nodes:
vlan: 0}
ge-0/0/3.0: {cost: 1000, ip: 10.0.0.10, iso: true, mask: 31, mpls: true, remote: srlab-vmx6,
vlan: 0}
mgmt: 10.39.0.60
mgmt: 10.39.0.104
rid: 192.168.0.4
sid: 40
switches: [srlab-vmx4-0--srlab-vmx5-0, srlab-vmx1-1--srlab-vmx4-1, srlab-vmx4-2--srlab-vmx6-2,
Expand All @@ -86,7 +86,7 @@ nodes:
vlan: 0}
ge-0/0/1.0: {cost: 1000, ip: 10.0.0.5, iso: true, mask: 31, mpls: true, remote: srlab-vmx2,
vlan: 0}
mgmt: 10.39.0.55
mgmt: 10.39.0.105
rid: 192.168.0.5
sid: 50
switches: [srlab-vmx4-0--srlab-vmx5-0, srlab-vmx2-1--srlab-vmx5-1, srlab-vmx5-2--srlab-vmx7-2,
Expand All @@ -109,7 +109,7 @@ nodes:
vlan: 0}
ge-0/0/4.0: {cost: 1000, ip: 10.0.0.25, iso: true, mask: 31, mpls: true, remote: srlab-vmx3,
vlan: 0}
mgmt: 10.39.0.56
mgmt: 10.39.0.106
rid: 192.168.0.6
sid: 60
switches: [srlab-vmx6-0--srlab-vmx7-0, srlab-vmx6-1--srlab-vmx8-1, srlab-vmx4-2--srlab-vmx6-2,
Expand All @@ -129,7 +129,7 @@ nodes:
vlan: 0}
ge-0/0/1.0: {cost: 1000, ip: 10.0.0.18, iso: true, mask: 31, mpls: true, remote: srlab-vmx9,
vlan: 0}
mgmt: 10.39.0.57
mgmt: 10.39.0.107
rid: 192.168.0.7
sid: 70
switches: [srlab-vmx6-0--srlab-vmx7-0, srlab-vmx7-1--srlab-vmx9-1, srlab-vmx5-2--srlab-vmx7-2,
Expand All @@ -146,7 +146,7 @@ nodes:
vlan: 0}
ge-0/0/1.0: {cost: 1000, ip: 10.0.0.17, iso: true, mask: 31, mpls: true, remote: srlab-vmx6,
vlan: 0}
mgmt: 10.39.0.58
mgmt: 10.39.0.108
rid: 192.168.0.8
sid: 80
switches: [srlab-vmx8-0--srlab-vmx9-0, srlab-vmx6-1--srlab-vmx8-1]
Expand All @@ -162,7 +162,7 @@ nodes:
vlan: 0}
ge-0/0/1.0: {cost: 1000, ip: 10.0.0.19, iso: true, mask: 31, mpls: true, remote: srlab-vmx7,
vlan: 0}
mgmt: 10.39.0.59
mgmt: 10.39.0.109
rid: 192.168.0.9
sid: 90
switches: [srlab-vmx8-0--srlab-vmx9-0, srlab-vmx7-1--srlab-vmx9-1]
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx1-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.57/20;
address 10.39.0.101/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx2-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.58/20;
address 10.39.0.102/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx3-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.59/20;
address 10.39.0.103/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx4-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.60/20;
address 10.39.0.104/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx5-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.55/20;
address 10.39.0.105/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx6-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.56/20;
address 10.39.0.106/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx7-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.57/20;
address 10.39.0.107/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx8-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.58/20;
address 10.39.0.108/20;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion files/srlab-config/srlab-vmx9-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interfaces {
description "OOB to MGMT Network";
unit 0 {
family inet {
address 10.39.0.59/20;
address 10.39.0.109/20;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions files/srlab-tasks/srlab-vmx1_task.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: Update vmx networking
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
hostname: "{{ esxi_hostname }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
esxi_hostname: "{{ esxi_hostname }}"
validate_certs: False
name: "srlab-vmx1-vfpc"
Expand Down
6 changes: 3 additions & 3 deletions files/srlab-tasks/srlab-vmx2_task.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: Update vmx networking
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
hostname: "{{ esxi_hostname }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
esxi_hostname: "{{ esxi_hostname }}"
validate_certs: False
name: "srlab-vmx2-vfpc"
Expand Down
6 changes: 3 additions & 3 deletions files/srlab-tasks/srlab-vmx3_task.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: Update vmx networking
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
hostname: "{{ esxi_hostname }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
esxi_hostname: "{{ esxi_hostname }}"
validate_certs: False
name: "srlab-vmx3-vfpc"
Expand Down
Loading

0 comments on commit 120d779

Please sign in to comment.