diff options
author | Monty Taylor <mordred@inaugust.com> | 2017-08-30 19:16:21 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2017-08-31 15:50:00 -0500 |
commit | eb09398678229842f23be128ac01ed2b53d2e3a8 (patch) | |
tree | 88b98d2efd7ef46bfebcda4b30691353b0994bef /playbooks/zuul-stream/fixtures/test-stream.yaml | |
parent | 0d254d547198305d3d05f0cf5a24a376cfd8b782 (diff) | |
download | zuul-eb09398678229842f23be128ac01ed2b53d2e3a8.tar.gz |
Handle logging ansible python errors properly
If an exception is thrown from ansible, we don't log it properly.
Add a playbook to the functional test of logging that doesn't mask
failures (it lets the tasks report as failed) So that we cover all four
possibilities for ansible module failure exception:
* failed task
* failed task in item
* failed task that reports as success
* failed task in item that reports as success
Change-Id: I9e355350f5ec34251f5030eaaa3f4bb7b4438a6e
Diffstat (limited to 'playbooks/zuul-stream/fixtures/test-stream.yaml')
-rw-r--r-- | playbooks/zuul-stream/fixtures/test-stream.yaml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/playbooks/zuul-stream/fixtures/test-stream.yaml b/playbooks/zuul-stream/fixtures/test-stream.yaml index 065e33274..5bffc16ce 100644 --- a/playbooks/zuul-stream/fixtures/test-stream.yaml +++ b/playbooks/zuul-stream/fixtures/test-stream.yaml @@ -19,3 +19,19 @@ - item1 - item2 - item3 + + - name: Run a shell task with an ansible python exception + command: echo foo + args: + chdir: /somewhere/that/does/not/exist + failed_when: false + + - name: Loop with items on an ansible python exception + command: "echo {{ item }}" + with_items: + - item1 + - item2 + - item3 + args: + chdir: /somewhere/that/does/not/exist + failed_when: false |