summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-07 16:30:43 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-07 16:30:43 +0200
commit4d42a2b0950882bf63380a08c90007970c38b4ce (patch)
tree3d0e7082545fbfe79fce990e70329d05f3aa8a7c
parentcc70d069ee8b414ee31620e7a81c4af0accaf69d (diff)
Add pve-lxc service provisioning using service.yml and containers group
-rw-r--r--configure.yml2
-rw-r--r--group_vars/all.ymlbin26 -> 50 bytes
-rw-r--r--group_vars/all.yml.example1
-rw-r--r--group_vars/containers.ymlbin0 -> 62 bytes
-rw-r--r--group_vars/containers.yml.example3
-rw-r--r--host_vars/git.local.ymlbin0 -> 531 bytes
-rw-r--r--host_vars/git.local.yml.example21
-rw-r--r--inventory/hosts.yml6
-rw-r--r--service.yml7
-rw-r--r--site.yml5
10 files changed, 41 insertions, 4 deletions
diff --git a/configure.yml b/configure.yml
index 763bc406..f64046c6 100644
--- a/configure.yml
+++ b/configure.yml
@@ -135,6 +135,6 @@
pve_lxc_ip: "{{ hostvars[service_host].pve_lxc_ip }}"
pve_lxc_gateway: "{{ hostvars[service_host].pve_lxc_gateway }}"
pve_lxc_dns: "{{ hostvars[service_host].pve_lxc_dns }}"
- loop: "{{ groups['services'] }}"
+ loop: "{{ groups['containers'] }}"
loop_control:
loop_var: "service_host"
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 20f84e62..8109283b 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
Binary files differ
diff --git a/group_vars/all.yml.example b/group_vars/all.yml.example
index ed97d539..c612e689 100644
--- a/group_vars/all.yml.example
+++ b/group_vars/all.yml.example
@@ -1 +1,2 @@
---
+ansible_connection: ssh
diff --git a/group_vars/containers.yml b/group_vars/containers.yml
new file mode 100644
index 00000000..e6d29eb5
--- /dev/null
+++ b/group_vars/containers.yml
Binary files differ
diff --git a/group_vars/containers.yml.example b/group_vars/containers.yml.example
new file mode 100644
index 00000000..b2559075
--- /dev/null
+++ b/group_vars/containers.yml.example
@@ -0,0 +1,3 @@
+---
+ansible_user: root
+ansible_port: 22
diff --git a/host_vars/git.local.yml b/host_vars/git.local.yml
new file mode 100644
index 00000000..f01929e3
--- /dev/null
+++ b/host_vars/git.local.yml
Binary files differ
diff --git a/host_vars/git.local.yml.example b/host_vars/git.local.yml.example
new file mode 100644
index 00000000..60b8d659
--- /dev/null
+++ b/host_vars/git.local.yml.example
@@ -0,0 +1,21 @@
+---
+ansible_host: "10.0.0.100"
+
+network_ipv4_address: "10.0.0.100"
+network_ipv4_gateway: "10.0.0.254"
+network_ipv4_dns: "10.0.0.254"
+
+pve_lxc_id: 100
+pve_lxc_hostname: "git"
+pve_lxc_template: "alpine-3.23-default_20260116_amd64.tar.xz"
+pve_lxc_disk: "local-lvm:4"
+pve_lxc_cores: 1
+pve_lxc_memory: 256
+pve_lxc_ip: "10.0.0.100/24"
+pve_lxc_gateway: "10.0.0.254"
+pve_lxc_dns: "10.0.0.254"
+
+cgit_hostname: "git.home.arpa"
+cgit_title: "git.a14m.dev"
+cgit_description: "a14m git repositories"
+cgit_ssh_user: "git"
diff --git a/inventory/hosts.yml b/inventory/hosts.yml
index 080c06fd..ce41d1b5 100644
--- a/inventory/hosts.yml
+++ b/inventory/hosts.yml
@@ -1,10 +1,12 @@
---
homelab:
- vars:
- ansible_connection: ssh
hosts:
desktop.local:
macbook.local:
laptop.local:
rpi5.local:
pve.local:
+
+containers:
+ hosts:
+ git.local:
diff --git a/service.yml b/service.yml
new file mode 100644
index 00000000..a08cfa69
--- /dev/null
+++ b/service.yml
@@ -0,0 +1,7 @@
+---
+- name: "Git configure"
+ gather_facts: true
+ hosts:
+ - git.local
+ roles:
+ - role: "cgit"
diff --git a/site.yml b/site.yml
index 34c96e5b..7f9a4745 100644
--- a/site.yml
+++ b/site.yml
@@ -18,5 +18,8 @@
poll: 5
failed_when: false
-- name: "Configure"
+- name: "Host Configure"
ansible.builtin.import_playbook: "configure.yml"
+
+- name: "Service Configure"
+ ansible.builtin.import_playbook: "service.yml"