blob: 29bbf475910e848cab3a6da69667cfd62e320dd3 [file] [log] [blame]
Monty Taylor0d254d52017-08-26 13:26:29 -05001- 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 Tayloreb093982017-08-30 19:16:21 -050022
Monty Taylora36b3b32017-08-31 13:48:59 -050023 - name: Loop with complex items
24 command: "echo {{ item.name }}"
25 with_items:
26 - name: complex1
27 - name: complex2
28 - name: complex3
29
Monty Tayloreb093982017-08-30 19:16:21 -050030 - name: Run a shell task with an ansible python exception
31 command: echo foo
32 args:
33 chdir: /somewhere/that/does/not/exist
34 failed_when: false
35
36 - name: Loop with items on an ansible python exception
37 command: "echo {{ item }}"
38 with_items:
39 - item1
40 - item2
41 - item3
42 args:
43 chdir: /somewhere/that/does/not/exist
44 failed_when: false