Added legit stuff
This commit is contained in:
parent
034e8ef0a7
commit
f851f907d1
@ -4,8 +4,55 @@ all:
|
||||
ansible_user: ubuntu
|
||||
hosts:
|
||||
kube-master-luna:
|
||||
legit_uplink:
|
||||
interface: enp1s0
|
||||
gateway: 192.168.100.1
|
||||
address: 192.168.100.10
|
||||
legit_cluster_network:
|
||||
interface: enp8s0
|
||||
address: 192.168.8.10
|
||||
|
||||
kube-worker-luna:
|
||||
legit_uplink:
|
||||
interface: enp1s0
|
||||
gateway: 192.168.100.1
|
||||
address: 192.168.100.11
|
||||
legit_cluster_network:
|
||||
interface: enp8s0
|
||||
address: 192.168.8.11
|
||||
|
||||
kube-master-mckay:
|
||||
legit_uplink:
|
||||
interface: eth0
|
||||
gateway: 192.168.69.254
|
||||
address: 192.168.69.40
|
||||
legit_cluster_network:
|
||||
interface: eth1
|
||||
address: 192.168.8.20
|
||||
|
||||
kube-worker-mckay:
|
||||
legit_uplink:
|
||||
interface: eth0
|
||||
gateway: 192.168.69.254
|
||||
address: 192.168.69.41
|
||||
legit_cluster_network:
|
||||
interface: eth1
|
||||
address: 192.168.8.21
|
||||
|
||||
kube-master-woolsey:
|
||||
legit_uplink:
|
||||
interface: eth0
|
||||
gateway: 192.168.69.1
|
||||
address: 192.168.69.30
|
||||
legit_cluster_network:
|
||||
interface: eth1
|
||||
address: 192.168.8.30
|
||||
|
||||
kube-worker-woolsey:
|
||||
legit_uplink:
|
||||
interface: eth0
|
||||
gateway: 192.168.69.1
|
||||
address: 192.168.69.31
|
||||
legit_cluster_network:
|
||||
interface: eth1
|
||||
address: 192.168.8.31
|
@ -1,5 +1,10 @@
|
||||
- name: "prepare vms for kmlabs-k8s-cluster"
|
||||
hosts: all
|
||||
handlers:
|
||||
- name: "netplanapply"
|
||||
command: netplan apply
|
||||
async: 45
|
||||
poll: 0
|
||||
|
||||
tasks:
|
||||
- name: "do apt stuff"
|
||||
@ -13,3 +18,6 @@
|
||||
|
||||
- name: "clean motd"
|
||||
import_tasks: tasks/clean-motd.yaml
|
||||
|
||||
- name: "setup networking"
|
||||
import_tasks: tasks/static-networking.yaml
|
15
tasks/static-networking.yaml
Normal file
15
tasks/static-networking.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: "remove cloudinit config"
|
||||
file:
|
||||
path: /etc/netplan/50-cloud-init.yaml
|
||||
state: absent
|
||||
|
||||
- name: "remove installer config"
|
||||
file:
|
||||
path: /etc/netplan/00-installer-config.yaml
|
||||
state: absent
|
||||
|
||||
- name: "install static config"
|
||||
template:
|
||||
src: templates/netplan.yaml
|
||||
dest: /etc/netplan/00-static.yaml
|
||||
notify: netplanapply
|
15
templates/netplan.yaml
Normal file
15
templates/netplan.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
# {{ansible_managed}}
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
{{ legit_uplink.interface }}:
|
||||
dhcp4: false
|
||||
dhcp6: false
|
||||
gateway4: {{ legit_uplink.gateway }}
|
||||
addresses:
|
||||
- "{{ legit_uplink.address }}/24"
|
||||
{{ legit_cluster_network.interface }}:
|
||||
dhcp4: false
|
||||
dhcp6: false
|
||||
addresses:
|
||||
- "{{ legit_cluster_network.address }}/24"
|
Loading…
Reference in New Issue
Block a user