Monty Taylor | eb09398 | 2017-08-30 19:16:21 -0500 | [diff] [blame] | 1 | - name: Run some commands to show that logging works on failed tasks too |
| 2 | hosts: node |
| 3 | tasks: |
| 4 | |
| 5 | - block: |
| 6 | |
| 7 | - name: Run a shell task with an ansible python exception |
| 8 | command: echo foo |
| 9 | args: |
David Shrewsbury | 13d6e58 | 2017-08-31 13:03:12 -0400 | [diff] [blame] | 10 | chdir: /failure-shelltask/somewhere/that/does/not/exist |
Monty Taylor | eb09398 | 2017-08-30 19:16:21 -0500 | [diff] [blame] | 11 | |
David Shrewsbury | 13d6e58 | 2017-08-31 13:03:12 -0400 | [diff] [blame] | 12 | always: |
Monty Taylor | eb09398 | 2017-08-30 19:16:21 -0500 | [diff] [blame] | 13 | |
| 14 | - name: Loop with items on an ansible python exception |
| 15 | command: "echo {{ item }}" |
| 16 | with_items: |
| 17 | - item1 |
| 18 | - item2 |
| 19 | - item3 |
| 20 | args: |
David Shrewsbury | 13d6e58 | 2017-08-31 13:03:12 -0400 | [diff] [blame] | 21 | chdir: /failure-itemloop/somewhere/that/does/not/exist |