diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-07 16:30:43 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-07 16:30:43 +0200 |
| commit | 4d42a2b0950882bf63380a08c90007970c38b4ce (patch) | |
| tree | 3d0e7082545fbfe79fce990e70329d05f3aa8a7c | |
| parent | cc70d069ee8b414ee31620e7a81c4af0accaf69d (diff) | |
Add pve-lxc service provisioning using service.yml and containers group
| -rw-r--r-- | configure.yml | 2 | ||||
| -rw-r--r-- | group_vars/all.yml | bin | 26 -> 50 bytes | |||
| -rw-r--r-- | group_vars/all.yml.example | 1 | ||||
| -rw-r--r-- | group_vars/containers.yml | bin | 0 -> 62 bytes | |||
| -rw-r--r-- | group_vars/containers.yml.example | 3 | ||||
| -rw-r--r-- | host_vars/git.local.yml | bin | 0 -> 531 bytes | |||
| -rw-r--r-- | host_vars/git.local.yml.example | 21 | ||||
| -rw-r--r-- | inventory/hosts.yml | 6 | ||||
| -rw-r--r-- | service.yml | 7 | ||||
| -rw-r--r-- | site.yml | 5 |
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 Binary files differindex 20f84e62..8109283b 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml 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 Binary files differnew file mode 100644 index 00000000..e6d29eb5 --- /dev/null +++ b/group_vars/containers.yml 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 Binary files differnew file mode 100644 index 00000000..f01929e3 --- /dev/null +++ b/host_vars/git.local.yml 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" @@ -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" |
