--- - name: Fail if required mash-playbook settings not defined ansible.builtin.fail: msg: >- You need to define a required configuration setting (`{{ item.name }}`). when: "item.when | bool and vars[item.name] == ''" with_items: - {'name': 'mash_playbook_generic_secret_key', 'when': true} - {'name': 'mash_playbook_generic_secret_key', 'when': true} - {'name': 'mash_playbook_metrics_exposure_hostname', 'when': "{{ mash_playbook_metrics_exposure_enabled }}"} - name: Fail if mash_playbook_reverse_proxy_type is set incorrectly ansible.builtin.fail: msg: "Detected that variable mash_playbook_reverse_proxy_type (current value: `{{ mash_playbook_reverse_proxy_type }}`) appears to be set incorrectly. See roles/custom/mash_playbook_base/defaults/main.yml for valid choices." when: mash_playbook_reverse_proxy_type not in ['playbook-managed-traefik', 'other-traefik-container', 'none']