summaryrefslogtreecommitdiffstats
path: root/site.yml
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-09-10 22:20:09 +0200
committerAhmed AbdelHalim <[email protected]>2025-09-10 22:20:09 +0200
commit9ce94d35d13795c80277ffc9598074dc3fa2b9ed (patch)
tree442461f5edf1d9a6b937c5457d7a67c2fad2c999 /site.yml
parent0e01d4fbcefd68ab748b5ec0cd42473f63d8235b (diff)
Refactor site playbooks to be more host oriented
This also improves the dependency management, making the roles less repeating when not needing to execute multiple times
Diffstat (limited to 'site.yml')
-rw-r--r--site.yml44
1 files changed, 23 insertions, 21 deletions
diff --git a/site.yml b/site.yml
index ce4fd5fb..8c533a07 100644
--- a/site.yml
+++ b/site.yml
@@ -1,32 +1,22 @@
---
-- name: "Distro bootstrap configure"
+- name: "Dev machines configure"
gather_facts: true
- # Password policy is technically not required for boot,
- # But it's quite nice to configure it for boot and therefore
- # enforce the required policies/configurations wanted for the first passwrod change
- tags: ["required_for_boot"]
- hosts: all
+ hosts:
+ - archlinux.local
+ - ubuntu.local
roles:
+ - role: "package_cache"
+ tags: ["required_for_boot"]
- role: "hostname"
+ tags: ["required_for_boot"]
- role: "network"
+ tags: ["required_for_boot"]
- role: "user"
+ tags: ["required_for_boot"]
- role: "ssh"
+ tags: ["required_for_boot"]
- role: "password_policy"
- pre_tasks:
- - name: "Update package cache"
- become: true
- ansible.builtin.package:
- update_cache: true
- async: 60
- poll: 5
- failed_when: false
-
-- name: "Dev machines configure"
- gather_facts: true
- hosts:
- - archlinux.local
- - ubuntu.local
- roles:
+ tags: ["required_for_boot"]
- role: "locales"
- role: "timezone"
- role: "wireguard"
@@ -43,6 +33,18 @@
- rpi5.local
become: true
roles:
+ - role: "package_cache"
+ tags: ["required_for_boot"]
+ - role: "hostname"
+ tags: ["required_for_boot"]
+ - role: "network"
+ tags: ["required_for_boot"]
+ - role: "user"
+ tags: ["required_for_boot"]
+ - role: "ssh"
+ tags: ["required_for_boot"]
+ - role: "password_policy"
+ tags: ["required_for_boot"]
- role: "locales"
- role: "timezone"
- role: "wireguard"