diff --git a/inventory b/inventory deleted file mode 100644 index 8f033c2..0000000 --- a/inventory +++ /dev/null @@ -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 diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml new file mode 100644 index 0000000..b95f898 --- /dev/null +++ b/inventory/group_vars/all.yml @@ -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: "" diff --git a/inventory/hosts.yml b/inventory/hosts.yml new file mode 100644 index 0000000..0c6a65d --- /dev/null +++ b/inventory/hosts.yml @@ -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