summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-06-30 16:50:10 +0200
committerAhmed Abdelhalim <[email protected]>2026-06-30 16:50:10 +0200
commited1d43db7edccd9bc2ebda2e7065bca4e70c839f (patch)
treee5bdd9d1b570cbebd2624b77a544609f7336e9a8
parentf1ff5a40a3eec665aceca1a77d1544923b5cda4c (diff)
Refactor role includes to use more convenient approach
-rw-r--r--configure.yml123
1 files changed, 56 insertions, 67 deletions
diff --git a/configure.yml b/configure.yml
index dc1089a9..acbe04e7 100644
--- a/configure.yml
+++ b/configure.yml
@@ -5,78 +5,67 @@
- desktop.local
- macbook.local
- laptop.local
+ roles:
+ - role: "locales"
+ - role: "timezone"
+ - role: "font"
+ - role: "bash"
+ - role: "man"
+ - role: "which"
+ - role: "jq"
+ - role: "ag"
+ - role: "libheif"
+ - role: "tmuxinator"
+ - role: "rsync"
+ - role: "gpg"
+ - role: "git"
+ - role: "git-crypt"
+ - role: "zoxide"
+ - role: "dotfiles"
+ - role: "password_store"
+ - role: "wireguard"
+ - role: "vim"
+ - role: "mise"
+ - role: "neomutt"
+ - role: "go"
+ - role: "python"
+ - role: "nodejs"
+ - role: "docker"
+ - role: "podman"
+ - role: "ansible"
+ - role: "alacritty"
+ - role: "btop"
+ - role: "claude"
+ - role: "firefox"
+ - role: "obsidian"
+ - role: "localsend"
+ - role: "microsoft-teams"
+ - role: "gnome-calendar"
+ - role: "gnome-newsflash"
+ - role: "gnome-planify"
+ - role: "gnome-loupe"
+ - role: "gnome-papers"
+ - role: "gnome-disk-utility"
+ - role: "prometheus-node-exporter"
+ - role: "gpu_driver"
tasks:
- - name: "Common"
+ - name: "Configure distro roles"
+ when: ansible_distribution == role.distro
+ tags: always
ansible.builtin.include_role:
- name: "{{ role }}"
- loop_control:
- loop_var: "role"
+ name: "{{ role.name }}"
+ apply:
+ tags: "{{ role.tags | default([]) }}"
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"
- - "gpu_driver"
-
- - name: "Archlinux configure"
- when: ansible_distribution == 'Archlinux'
- ansible.builtin.include_role:
- name: "{{ role }}"
+ - { name: "yay", distro: "Archlinux" }
+ - { name: "mpv", distro: "Archlinux" }
+ - { name: "hyprland", distro: "Archlinux" }
+ - { name: "zen-browser", distro: "Archlinux" }
+ - { name: "chromium", distro: "Archlinux" }
+ - { name: "steam", distro: "Archlinux" }
+ - { name: "gnome", distro: "Ubuntu" }
loop_control:
loop_var: "role"
- loop:
- - "yay"
- - "mpv"
- - "hyprland"
- - "zen-browser"
- - "chromium"
- - "steam"
-
- - name: "Ubuntu configure"
- when: ansible_distribution == 'Ubuntu'
- ansible.builtin.include_role:
- name: "{{ role }}"
- loop_control:
- loop_var: "role"
- loop:
- - "gnome"
- name: "Raspberry Pi configure"
gather_facts: true