Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve log message for verify alerting env's step #25

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions roles/containers/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@
AMQP_URL: "{{ amqp_protocol }}://{{ rabbitmq_username }}:{{ rabbitmq_password }}@{{ rabbitmq_host }}/{{ rabbitmq_vhost | urlencode | replace('/', '%2F') }}"
DATABASE_URL: "ecto://{{ wanda_postgres_user }}:{{ wanda_postgres_password }}@{{ wanda_postgres_host }}/{{ wanda_postgres_db }}"

- name: Verify that alerting configuration variables are defined in json configuration if alerting is enabled
- name: Verify that alerting configuration variables are defined if alerting is enabled
ansible.builtin.assert:
that:
- alerting_env is defined
- "{{ lookup('vars', alerting_env) | length > 0 }}"
- "{{ lookup('vars', alerting_env) != None }}"
- "{{ lookup('vars', alerting_env) != '' }}"

fail_msg: "{{ alerting_env }} needs to be set in json configuration to enable alerting"
success_msg: "{{ alerting_env }} is set in json configuration"
fail_msg: "{{ alerting_env }} needs to be set in playbook variables to enable alerting"
success_msg: "{{ alerting_env }} is set in playbook variables"
loop_control:
loop_var: alerting_env
with_items:
Expand Down
Loading