Hide API key from task output and syslog #1

Merged
pulsar merged 1 commits from hide-api-key into main 2026-11-13 18:06:14 +00:00
2 changed files with 7 additions and 0 deletions
Showing only changes of commit 2c68499a10 - Show all commits

No files matched your search

+3
View File
@@ -11,6 +11,9 @@ hcio_path: /srv/healthchecksio
hcio_url: "" hcio_url: ""
hcio_api_key: "" 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 # Add prefix on slug
hcio_slug_prefix: "{{ inventory_hostname | replace('.', '_') }}-" hcio_slug_prefix: "{{ inventory_hostname | replace('.', '_') }}-"
+4
View File
@@ -22,6 +22,8 @@
when: uuid | length <= 0 when: uuid | length <= 0
changed_when: true changed_when: true
register: created register: created
# Hide the API key (task output and syslog on the instance)
no_log: "{{ hcio_no_log }}"
loop: "{{ hcio_checks }}" loop: "{{ hcio_checks }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"
@@ -54,6 +56,8 @@
"channels": "{{ channels }}" "channels": "{{ channels }}"
} }
when: uuid | length > 0 when: uuid | length > 0
# Hide the API key (task output and syslog on the instance)
no_log: "{{ hcio_no_log }}"
loop: "{{ hcio_checks }}" loop: "{{ hcio_checks }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"