increase fault tolerancy for the master playbook
add units apt packages
This commit is contained in:
parent
1bbbd8a952
commit
76d3b54c8d
3 changed files with 25 additions and 9 deletions
8
library/rescue_role.yml
Normal file
8
library/rescue_role.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
# 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 ] }}"
|
|
@ -2,12 +2,19 @@
|
|||
hosts: self
|
||||
roles:
|
||||
- system
|
||||
- zsh
|
||||
- asdf
|
||||
- neovim
|
||||
- signal
|
||||
- virtualbox
|
||||
- vscodium
|
||||
- syncthing
|
||||
- strawberry
|
||||
- nicotine
|
||||
vars:
|
||||
my_roles:
|
||||
- zsh
|
||||
- asdf
|
||||
- neovim
|
||||
- signal
|
||||
- virtualbox
|
||||
- vscodium
|
||||
- syncthing
|
||||
- strawberry
|
||||
- nicotine
|
||||
tasks:
|
||||
- include_tasks: "../library/rescue_role.yml"
|
||||
loop: "{{ my_roles }}"
|
||||
loop_control:
|
||||
loop_var: item_my_role
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
- gimp
|
||||
- tree
|
||||
- wireshark
|
||||
- units
|
||||
- name: Install .gitconfig
|
||||
template:
|
||||
src: "{{ role_path }}/templates/.gitconfig.j2"
|
||||
|
|
Reference in a new issue