Add inventory hierarchy and temporary hosts
This commit is contained in:
parent
39a5980f43
commit
bdc1667dcb
16
inventory
16
inventory
@ -1,16 +0,0 @@
|
|||||||
beta ansible_host=10.10.0.30 hostname=beta is_nas=false
|
|
||||||
gamma ansible_host=10.10.0.37 hostname=gamma is_nas=true
|
|
||||||
|
|
||||||
[k3s_cp]
|
|
||||||
beta
|
|
||||||
|
|
||||||
[k3s_node]
|
|
||||||
gamma
|
|
||||||
|
|
||||||
[virgin]
|
|
||||||
gamma
|
|
||||||
|
|
||||||
[virgin:vars]
|
|
||||||
ansible_ssh_private_key_file = /home/tanguy/.ssh/creator
|
|
||||||
ansible_user = creator
|
|
||||||
ansible_become_password = aberation
|
|
7
inventory/group_vars/all.yml
Normal file
7
inventory/group_vars/all.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
k3s_version: v1.23.6+k3s1
|
||||||
|
# ansible_user: debian
|
||||||
|
systemd_dir: /etc/systemd/system
|
||||||
|
master_ip: "{{ hostvars[groups['master'][0]]['wireguard_ip'] | default(groups['master'][0]) }}"
|
||||||
|
extra_server_args: "--no-deploy traefik --advertise-address {{hostvars[inventory_hostname]['wireguard_ip']}}"
|
||||||
|
extra_agent_args: ""
|
36
inventory/hosts.yml
Normal file
36
inventory/hosts.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
all:
|
||||||
|
hosts:
|
||||||
|
cp:
|
||||||
|
ansible_host: 10.10.0.64
|
||||||
|
is_nas: false
|
||||||
|
hostname: cp
|
||||||
|
wireguard_ip: 10.20.0.2
|
||||||
|
outsider:
|
||||||
|
ansible_host: 51.15.109.2
|
||||||
|
is_nas: false
|
||||||
|
hostname: outsider
|
||||||
|
wireguard_ip: 10.20.0.1
|
||||||
|
local:
|
||||||
|
ansible_connection: local
|
||||||
|
ansible_host: 127.0.0.1
|
||||||
|
is_local: true
|
||||||
|
wireguard_ip: 10.20.0.3
|
||||||
|
children:
|
||||||
|
master:
|
||||||
|
hosts:
|
||||||
|
cp:
|
||||||
|
node:
|
||||||
|
hosts:
|
||||||
|
outsider:
|
||||||
|
k3s_cluster:
|
||||||
|
children:
|
||||||
|
master:
|
||||||
|
node:
|
||||||
|
vars:
|
||||||
|
ansible_ssh_private_key_file: ~/.ssh/creator
|
||||||
|
ansible_user: creator
|
||||||
|
ansible_become_password: aberation
|
||||||
|
ansible_ssh_port: 22
|
||||||
|
ufw_enabled: false
|
||||||
|
wireguard_port: 51820
|
||||||
|
wireguard_mask_bits: 8
|
Loading…
Reference in New Issue
Block a user