diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-10 22:20:09 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-10 22:20:09 +0200 |
| commit | b92b0101920627cf0b8e7dd0d826d25b9fd96a41 (patch) | |
| tree | 442461f5edf1d9a6b937c5457d7a67c2fad2c999 /site.yml | |
| parent | 7c51e0642ec18a88adb8d4b56c54d6de0e0d12cf (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.yml | 44 |
1 files changed, 23 insertions, 21 deletions
@@ -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" |
