simplify playbook
This commit is contained in:
parent
4ba31e275d
commit
88709a460e
4 changed files with 25 additions and 27 deletions
2
Makefile
2
Makefile
|
@ -2,4 +2,4 @@ all:
|
|||
ansible-playbook playbooks/all.yml
|
||||
|
||||
%:
|
||||
ansible-playbook --extra-vars "enable_roles=['$@']" playbooks/all.yml
|
||||
ansible-playbook playbooks/all.yml --tags "$@"
|
||||
|
|
|
@ -4,15 +4,3 @@ full_name: "{{ first_name }} {{ last_name }}"
|
|||
email: pim@kunis.nl
|
||||
vscodium_extensions:
|
||||
- shd101wyy.markdown-preview-enhanced
|
||||
enable_roles:
|
||||
- bash
|
||||
- alacritty
|
||||
- wireguard
|
||||
- asdf
|
||||
- neovim
|
||||
- signal
|
||||
- virtualbox
|
||||
- vscodium
|
||||
- syncthing
|
||||
- strawberry
|
||||
- nicotine
|
||||
|
|
|
@ -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 ] }}"
|
|
@ -1,9 +1,27 @@
|
|||
- name: Setup system
|
||||
hosts: self
|
||||
roles:
|
||||
- system
|
||||
tasks:
|
||||
- include_tasks: "../library/rescue_role.yml"
|
||||
loop: "{{ enable_roles }}"
|
||||
loop_control:
|
||||
loop_var: item_my_role
|
||||
- role: system
|
||||
tags: system
|
||||
- role: bash
|
||||
tags: bash
|
||||
- role: alacritty
|
||||
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
|
||||
|
|
Reference in a new issue