Created
January 25, 2016 17:46
-
-
Save jlaska/56826e4c055a5d40bb11 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
gather_facts: false | |
vars: | |
secret_value: "Something secret" | |
tasks: | |
- name: task with stdout | |
command: 'echo {{ secret_value }}' | |
no_log: true | |
changed_when: false | |
register: result | |
- name: Assert that stdout was redacted | |
assert: | |
that: | |
- '"{{ secret_value }}" not in result.stdout' | |
- name: task with stderr | |
shell: 'cat <<< "{{ secret_value }}" 1>&2' | |
no_log: true | |
changed_when: false | |
register: result | |
- name: Assert that stderr was redacted | |
assert: | |
that: | |
- '"{{ secret_value }}" not in result.stderr' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment