Modularize tasks from system/base to its own role

Seems like I misunderstood what tags are for. They're not individual
flags for the play, they're commonly used for excluding/including tasks
at runtime (e.g., `ansible-playbook $PLAYBOOK --tags $TAGS`). When
running a playbook, it will execute all tasks by default.

Think of them as attaching a label and letting the user choose from the
playbook run. Setting multiple tags at the playbook-level seems to be
the best practice as seen from jwflory's Ansible playbooks.
This commit is contained in:
Gabriel Arazas 2022-03-19 11:18:42 +08:00
parent 029c59cd01
commit 78568ab207
4 changed files with 7 additions and 16 deletions

View File

@ -6,15 +6,3 @@
- name: Install additional development tools
include: dev_extra.yml
tags: dev_extra
- name: Install Flatpak remotes and desktop applications (requires `flatpak`)
include: flatpak_desktop_apps.yml
tags: flatpak_desktop_apps
- name: Install i18n-related tools
include: i18n.yml
tags: i18n
- name: Install fonts
include: fonts.yml
tags: fonts

View File

@ -6,13 +6,15 @@
flatpakrepo_url: "{{ item.repo }}"
loop:
- name: flathub
repo: "https://flathub.org/repo/flathub.flatpakrepo"
repo: https://flathub.org/repo/flathub.flatpakrepo
- name: flathub-beta
repo: "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"
repo: https://flathub.org/beta-repo/flathub-beta.flatpakrepo
- name: gnome-nightly
repo: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
repo: https://nightly.gnome.org/gnome-nightly.flatpakrepo
- name: kdeapps
repo: "https://distribute.kde.org/kdeapps.flatpakrepo"
repo: https://distribute.kde.org/kdeapps.flatpakrepo
- name: appcenter
repo: https://flatpak.elementary.io/repo.flatpakrepo
- name: Install applications from 'flathub' Flatpak remote
flatpak:
@ -20,6 +22,7 @@
name: "{{ item }}"
remote: flathub
loop:
- com.github.gi_lom.dialect
- com.github.tchx84.Flatseal
- com.github.wwmm.easyeffects
- com.obsproject.Studio