add roles

This commit is contained in:
Torma Kristóf 2022-02-05 19:07:34 +01:00
parent 32e6e8a2a9
commit a97b4c0181
5 changed files with 16 additions and 42 deletions

2
group_vars/mckay.yaml Normal file
View File

@ -0,0 +1,2 @@
---
default_gateway: "192.168.69.254"

2
group_vars/woolsey.yaml Normal file
View File

@ -0,0 +1,2 @@
---
default_gateway: "192.168.69.1"

View File

@ -2,13 +2,9 @@
all:
vars:
ansible_become: true
ansible_user: ansible
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
ansible_user: tormakris
children:
woolsey:
hosts:
testhost:
ansible_host: 192.168.69.102

View File

@ -1,32 +0,0 @@
---
- name: "prepare vms for kmlabs-k8s-cluster"
hosts: all
handlers:
- name: "netplanapply"
command: netplan apply
async: 45
poll: 0
- name: "restartkubelet"
systemd:
name: kubelet
state: restarted
tasks:
- name: "do apt stuff"
import_tasks: tasks/apt.yaml
- name: "disable cloudinit"
import_tasks: tasks/disable-cloudinit.yaml
- name: "remove snap"
import_tasks: tasks/remove-snap.yaml
- name: "clean motd"
import_tasks: tasks/clean-motd.yaml
- name: "fix dns"
import_tasks: tasks/fix-dns-resolution.yaml
- name: "setup networking"
import_tasks: tasks/static-networking.yaml

6
test.yaml Normal file
View File

@ -0,0 +1,6 @@
---
- name: "Test ansbile roles"
hosts: woolsey
roles:
- test
- docker