simplify playbook

This commit is contained in:
Pim Kunis 2023-01-23 10:10:48 +01:00
parent 4ba31e275d
commit 88709a460e
4 changed files with 25 additions and 27 deletions

View file

@ -2,4 +2,4 @@ all:
ansible-playbook playbooks/all.yml ansible-playbook playbooks/all.yml
%: %:
ansible-playbook --extra-vars "enable_roles=['$@']" playbooks/all.yml ansible-playbook playbooks/all.yml --tags "$@"

View file

@ -4,15 +4,3 @@ full_name: "{{ first_name }} {{ last_name }}"
email: pim@kunis.nl email: pim@kunis.nl
vscodium_extensions: vscodium_extensions:
- shd101wyy.markdown-preview-enhanced - shd101wyy.markdown-preview-enhanced
enable_roles:
- bash
- alacritty
- wireguard
- asdf
- neovim
- signal
- virtualbox
- vscodium
- syncthing
- strawberry
- nicotine

View file

@ -1,8 +0,0 @@
# https://stackoverflow.com/a/55524120
- name: Rescue role
block:
- include_role:
name: "{{ item_my_role }}"
rescue:
- set_fact:
failed_roles: "{{ failed_roles|default([]) + [ item_my_role ] }}"

View file

@ -1,9 +1,27 @@
- name: Setup system - name: Setup system
hosts: self hosts: self
roles: roles:
- system - role: system
tasks: tags: system
- include_tasks: "../library/rescue_role.yml" - role: bash
loop: "{{ enable_roles }}" tags: bash
loop_control: - role: alacritty
loop_var: item_my_role tags: alacritty
- role: wireguard
tags: wireguard
- role: asdf
tags: asdf
- role: neovim
tags: neovim
- role: signal
tags: signal
- role: virtualbox
tags: virtualbox
- role: vscodium
tags: vscodium
- role: syncthing
tags: syncthing
- role: strawberry
tags: strawberry
- role: nicotine
tags: nicotine