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 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
|
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
|
|
||||||
|
|
|
@ -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
|
- 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
|
||||||
|
|
Reference in a new issue