diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-04-23 14:39:21 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-04-23 14:39:21 +0200 |
| commit | 02a526a9d987b13f7d59f87601c4061985ee8ac3 (patch) | |
| tree | 0b1436a1f34e1474b06f039e26507bf429a3fade | |
| parent | eec9015acc48df70b31052e2f2e1cc761ffc047b (diff) | |
Refactor the configure playbook to dynamically include roles
Since these hosts could have dual boot enabled, depending on which OS is
booted it configures the custom roles needed for each OS (depending on
the use case), right now they are all interchangeable so it simplify the
playbook
| -rw-r--r-- | configure.yml | 160 |
1 files changed, 69 insertions, 91 deletions
diff --git a/configure.yml b/configure.yml index e43da442..264532e4 100644 --- a/configure.yml +++ b/configure.yml @@ -1,98 +1,76 @@ --- -- name: "Archlinux configure" +- name: "Dev configure" gather_facts: true hosts: - - archlinux.local - - marchlinux.local - roles: - - role: "locales" - - role: "timezone" - - role: "yay" - - role: "font" - - role: "which" - - role: "bash" - - role: "alacritty" - - role: "man" - - role: "jq" - - role: "ag" - - role: "libheif" - - role: "tmuxinator" - - role: "rsync" - - role: "gpg" - - role: "btop" - - role: "zoxide" - - role: "git" - - role: "git-crypt" - - role: "dotfiles" - - role: "password_store" - - role: "wireguard" - - role: "vim" - - role: "mise" - - role: "gnome-calendar" - - role: "gnome-loupe" - - role: "gnome-papers" - - role: "gnome-planify" - - role: "gnome-disk-utility" - - role: "gnome-newsflash" - - role: "mpv" - - role: "neomutt" - - role: "go" - - role: "python" - - role: "nodejs" - - role: "docker" - - role: "podman" - - role: "ansible" - - role: "claude" - - role: "hyprland" - - role: "firefox" - - role: "zen-browser" - - role: "chromium" - - role: "obsidian" - - role: "localsend" - - role: "microsoft-teams" - - role: "gpu_driver" - - role: "steam" - - role: "prometheus-node-exporter" + - desktop.local + - macbook.local + - laptop.local + tasks: + - name: "Common" + ansible.builtin.include_role: + name: "{{ item }}" + loop: + - "locales" + - "timezone" + - "font" + - "bash" + - "man" + - "which" + - "jq" + - "ag" + - "libheif" + - "tmuxinator" + - "rsync" + - "gpg" + - "git" + - "git-crypt" + - "zoxide" + - "dotfiles" + - "password_store" + - "wireguard" + - "vim" + - "mise" + - "neomutt" + - "go" + - "python" + - "nodejs" + - "docker" + - "podman" + - "ansible" + - "alacritty" + - "btop" + - "claude" + - "firefox" + - "obsidian" + - "localsend" + - "microsoft-teams" + - "gnome-calendar" + - "gnome-newsflash" + - "gnome-planify" + - "gnome-loupe" + - "gnome-papers" + - "gnome-disk-utility" + - "prometheus-node-exporter" -- name: "Ubuntu configure" - gather_facts: true - hosts: - - ubuntu.local - - mubuntu.local - roles: - - role: "locales" - - role: "timezone" - - role: "font" - - role: "bash" - - role: "man" - - role: "jq" - - role: "ag" - - role: "libheif" - - role: "tmuxinator" - - role: "rsync" - - role: "gpg" - - role: "git" - - role: "git-crypt" - - role: "dotfiles" - - role: "password_store" - - role: "vim" - - role: "mise" - - role: "neomutt" - - role: "wireguard" - - role: "go" - - role: "python" - - role: "docker" - - role: "podman" - - role: "ansible" - - role: "gnome" - - role: "gnome-planify" - - role: "firefox" - - role: "obsidian" - - role: "localsend" - - role: "microsoft-teams" - - role: "gnome-calendar" - - role: "gnome-newsflash" - - role: "prometheus-node-exporter" + - name: "Archlinux" + when: ansible_distribution == 'Archlinux' + ansible.builtin.include_role: + name: "{{ item }}" + loop: + - "yay" + - "mpv" + - "hyprland" + - "zen-browser" + - "chromium" + - "gpu_driver" + - "steam" + + - name: "Ubuntu" + when: ansible_distribution == 'Ubuntu' + ansible.builtin.include_role: + name: "{{ item }}" + loop: + - "gnome" - name: "Raspberry Pi configure" gather_facts: true |
