Monty Taylor | 0d254d5 | 2017-08-26 13:26:29 -0500 | [diff] [blame] | 1 | - name: Run some commands to show that logging works |
| 2 | hosts: node |
| 3 | tasks: |
| 4 | |
| 5 | - name: Run setup |
| 6 | setup: |
| 7 | register: setupvar |
| 8 | |
| 9 | - name: Output debug for a var |
| 10 | debug: |
| 11 | var: setupvar |
| 12 | |
| 13 | - name: Run a shell task |
| 14 | command: ip addr show |
| 15 | |
| 16 | - name: Loop with items |
| 17 | command: "echo {{ item }}" |
| 18 | with_items: |
| 19 | - item1 |
| 20 | - item2 |
| 21 | - item3 |
Monty Taylor | eb09398 | 2017-08-30 19:16:21 -0500 | [diff] [blame] | 22 | |
| 23 | - name: Run a shell task with an ansible python exception |
| 24 | command: echo foo |
| 25 | args: |
| 26 | chdir: /somewhere/that/does/not/exist |
| 27 | failed_when: false |
| 28 | |
| 29 | - name: Loop with items on an ansible python exception |
| 30 | command: "echo {{ item }}" |
| 31 | with_items: |
| 32 | - item1 |
| 33 | - item2 |
| 34 | - item3 |
| 35 | args: |
| 36 | chdir: /somewhere/that/does/not/exist |
| 37 | failed_when: false |