diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-10-02 09:09:12 -0400 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-10-02 09:11:41 -0400 |
commit | 5c39538a736bf3214eaace25ef808aefda41db6b (patch) | |
tree | ed93d11d75f2e8b4bf0100bef852257277afb179 /test/integration/no_log_local.yml | |
parent | ba4afcbbb64c7d8338b13c51a4234cfb00d62901 (diff) | |
download | ansible-5c39538a736bf3214eaace25ef808aefda41db6b.tar.gz |
added no_log tests as per #12214
Diffstat (limited to 'test/integration/no_log_local.yml')
-rw-r--r-- | test/integration/no_log_local.yml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/test/integration/no_log_local.yml b/test/integration/no_log_local.yml new file mode 100644 index 0000000000..7cfec32713 --- /dev/null +++ b/test/integration/no_log_local.yml @@ -0,0 +1,79 @@ +# TODO: test against real connection plugins to ensure they're not leaking module args + +- name: normal play + hosts: testhost + gather_facts: no + tasks: + - name: args should be logged in the absence of no_log + shell: echo "LOG_ME_TASK_SUCCEEDED" + + - name: item args/results should be logged in the absence of no_log + shell: echo {{ item }} + with_items: [ "LOG_ME_ITEM_SUCCEEDED" ] + + - name: failed args should be logged in the absence of no_log + shell: echo "LOG_ME_TASK_FAILED" + failed_when: true + ignore_errors: true + + - name: failed item args should be logged in the absence of no_log + shell: echo {{ item }} + with_items: [ "LOG_ME_ITEM_FAILED" ] + failed_when: true + ignore_errors: true + + - name: args should not be logged when task-level no_log set + shell: echo "DO_NOT_LOG_TASK_SUCCEEDED" + no_log: true + + - name: item args should be suppressed with no_log + shell: echo {{ item }} + no_log: true + with_items: [ "DO_NOT_LOG_ITEM_SUCCEEDED" ] + + - name: failed args should not be logged when task-level no_log set + shell: echo "DO_NOT_LOG_TASK_FAILED" + no_log: true + failed_when: true + ignore_errors: true + + - name: failed item args should be suppressed with no_log + shell: echo {{ item }} + no_log: true + with_items: [ "DO_NOT_LOG_ITEM_FAILED" ] + failed_when: true + ignore_errors: true + + - name: skipped task args should be suppressed with no_log + shell: echo "DO_NOT_LOG_TASK_SKIPPED" + no_log: true + when: false + + - name: skipped item args should be suppressed with no_log + shell: echo {{ item }} + no_log: true + with_items: [ "DO_NOT_LOG_ITEM_SKIPPED", "DO_NOT_LOG_ITEM_SKIPPED_2" ] + when: item == False + + - name: async task args should suppressed with no_log + async: 10 + poll: 1 + shell: echo "DO_NOT_LOG_ASYNC_TASK_SUCCEEDED" + no_log: true + +- name: play-level no_log set + hosts: testhost + gather_facts: no + no_log: true + tasks: + - name: args should not be logged when play-level no_log set + shell: echo "DO_NOT_LOG_PLAY" + + - name: args should not be logged when both play- and task-level no_log set + shell: echo "DO_NOT_LOG_TASK_AND_PLAY" + no_log: true + + - name: args should be logged when task-level no_log overrides play-level + shell: echo "LOG_ME_OVERRIDE" + no_log: false + |