refactor(ansible): centralize inventory and variables in 'vars' directory

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2025-07-12 21:38:53 +02:00
parent 3d7f652ff3
commit 609e000089
35 changed files with 135 additions and 73 deletions

View File

@@ -2,8 +2,6 @@
- name: Set up Servers
hosts: docker_host
gather_facts: true
vars_files:
- secrets.yml
roles:
- role: common
tags:

View File

@@ -2,8 +2,6 @@
- name: Set up reverse proxy for docker
hosts: docker
gather_facts: true
vars_files:
- secrets.yml
roles:
- role: common
tags:

View File

@@ -1,8 +1,6 @@
- name: Set up Agents
hosts: k3s_nodes
gather_facts: yes
vars_files:
- secrets.yml
pre_tasks:
- name: Get K3s token from the first server
when: host.ip == k3s.server.ips[0] and inventory_hostname in groups["k3s_server"]

View File

@@ -2,8 +2,6 @@
- name: Set up Servers
hosts: k3s_server
gather_facts: yes
vars_files:
- secrets.yml
roles:
- role: common
tags:

View File

@@ -1,8 +1,6 @@
- name: Set up storage
hosts: k3s_nodes
gather_facts: yes
vars_files:
- secrets.yml
gather_facts: true
pre_tasks:
- name: Get K3s token from the first server
when: host.ip == k3s.server.ips[0] and inventory_hostname in groups["k3s_server"]

View File

@@ -2,8 +2,6 @@
- name: Set up Servers
hosts: loadbalancer
gather_facts: yes
vars_files:
- secrets.yml
roles:
- role: common
tags:

View File

@@ -2,8 +2,6 @@
- name: Run proxmox vm playbook
hosts: proxmox
gather_facts: true
vars_files:
- secrets.yml
vars:
is_localhost: "{{ inventory_hostname == '127.0.0.1' }}"
is_proxmox_node: "{{ 'proxmox_nodes' in group_names }}"