diff --git a/Makefile b/Makefile index 1b6ffa3..8d5f92a 100644 --- a/Makefile +++ b/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 "$@" diff --git a/inventory/host_vars/self.yml b/inventory/host_vars/self.yml index d472c94..f11b2ac 100644 --- a/inventory/host_vars/self.yml +++ b/inventory/host_vars/self.yml @@ -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 diff --git a/library/rescue_role.yml b/library/rescue_role.yml deleted file mode 100644 index cf77e6e..0000000 --- a/library/rescue_role.yml +++ /dev/null @@ -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 ] }}" diff --git a/playbooks/all.yml b/playbooks/all.yml index d05cabd..b4c8143 100644 --- a/playbooks/all.yml +++ b/playbooks/all.yml @@ -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