feat(config): exclude_roles option

This commit is contained in:
Oliver Davies 2022-04-17 17:01:58 +01:00
parent b462bad90f
commit 9531d6ca47
2 changed files with 37 additions and 27 deletions

25
group_vars/all Normal file
View file

@ -0,0 +1,25 @@
default_roles:
- alacritty
- ctop
- dconf
- docker
- fzf
- github-cli
- gnome-tweak-tools
- git
- htop
- jq
- neovim
- neovim-lsp
- notion-app
- npm
- platformsh-cli
- pv
- ripgrep
- starship-prompt
- stylua
- tldr
- tree
- tmux
- zsh
- zsh-antigen

View file

@ -1,29 +1,14 @@
---
- hosts: localhost
roles:
- role: alacritty
tags:
- "skip-if-wsl"
- role: ctop
- role: dconf
- role: docker
- role: fzf
- role: github-cli
- role: gnome-tweak-tools
- role: git
- role: htop
- role: jq
- role: neovim
- role: neovim-lsp
- role: notion-app
- role: npm
- role: platformsh-cli
- role: pv
- role: ripgrep
- role: starship-prompt
- role: stylua
- role: tldr
- role: tree
- role: tmux
- role: zsh
- role: zsh-antigen
tasks:
- name: Set roles
set_fact:
roles: "{{ default_roles | difference(exclude_roles | default([])) }}"
- name: Display roles
debug: "var=roles"
- name: Run roles
include_role:
name: "{{ item }}"
with_items: "{{ roles }}"