diff --git a/defaults/main.yml b/defaults/main.yml index e892e60..49e361c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,9 @@ hcio_path: /srv/healthchecksio hcio_url: "" hcio_api_key: "" +# Hide API calls output, they contain the API key. Set to false to debug. +hcio_no_log: true + # Add prefix on slug hcio_slug_prefix: "{{ inventory_hostname | replace('.', '_') }}-" diff --git a/tasks/checks.yml b/tasks/checks.yml index 574367e..32b7c02 100644 --- a/tasks/checks.yml +++ b/tasks/checks.yml @@ -22,6 +22,8 @@ when: uuid | length <= 0 changed_when: true register: created + # Hide the API key (task output and syslog on the instance) + no_log: "{{ hcio_no_log }}" loop: "{{ hcio_checks }}" loop_control: label: "{{ item.name }}" @@ -54,6 +56,8 @@ "channels": "{{ channels }}" } when: uuid | length > 0 + # Hide the API key (task output and syslog on the instance) + no_log: "{{ hcio_no_log }}" loop: "{{ hcio_checks }}" loop_control: label: "{{ item.name }}"