From e9564cab3613e7b53bfab7a2e68740a7a86c28d7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 31 Aug 2022 16:07:19 -0400 Subject: [PATCH] azuracast/tasks/main.yml: skip_role_on_error --- roles/azuracast/tasks/main.yml | 43 ++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/roles/azuracast/tasks/main.yml b/roles/azuracast/tasks/main.yml index ef9c28914..c4e69ec0c 100644 --- a/roles/azuracast/tasks/main.yml +++ b/roles/azuracast/tasks/main.yml @@ -19,25 +19,32 @@ quiet: yes -- name: Install AzuraCast if 'azuracast_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml - include_tasks: install.yml - when: azuracast_installed is undefined +- block: + - name: Install AzuraCast if 'azuracast_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml + include_tasks: install.yml + when: azuracast_installed is undefined -# TODO figure out what to turn off/on for AzuraCast -# - include_tasks: enable-or-disable.yml + # TODO figure out what to turn off/on for AzuraCast + # - include_tasks: enable-or-disable.yml + - name: Add 'azuracast' variable values to {{ iiab_ini_file }} + ini_file: + path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini + section: azuracast + option: "{{ item.option }}" + value: "{{ item.value | string }}" + with_items: + - option: name + value: azuracast + - option: description + value: '"AzuraCast is a self-hosted, all-in-one radio station platform. Use AzuraCast to schedule podcasts, music, and even do live streaming of audio content. A variety of streaming formats are supported."' + - option: enabled + value: "{{ azuracast_enabled }}" -- name: Add 'azuracast' variable values to {{ iiab_ini_file }} - ini_file: - path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini - section: azuracast - option: "{{ item.option }}" - value: "{{ item.value | string }}" - with_items: - - option: name - value: azuracast - - option: description - value: '"AzuraCast is a self-hosted, all-in-one radio station platform. Use AzuraCast to schedule podcasts, music, and even do live streaming of audio content. A variety of streaming formats are supported."' - - option: enabled - value: "{{ azuracast_enabled }}" + rescue: + + - name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})' + fail: + msg: "" + when: not skip_role_on_error