blob: c4946e845ea111ce8c89805a686ab1466959242c [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
Monty Taylor7b871b42017-09-06 18:22:40 -050013 - name: Output a debug sentence
14 debug:
15 msg: This is a debug message
16
Monty Taylor0d254d52017-08-26 13:26:29 -050017 - name: Run a shell task
18 command: ip addr show
19
20 - name: Loop with items
21 command: "echo {{ item }}"
22 with_items:
23 - item1
24 - item2
25 - item3
Monty Tayloreb093982017-08-30 19:16:21 -050026
Monty Taylora36b3b32017-08-31 13:48:59 -050027 - name: Loop with complex items
28 command: "echo {{ item.name }}"
29 with_items:
30 - name: complex1
31 - name: complex2
32 - name: complex3
33
Monty Tayloreb093982017-08-30 19:16:21 -050034 - name: Run a shell task with an ansible python exception
35 command: echo foo
36 args:
David Shrewsbury13d6e582017-08-31 13:03:12 -040037 chdir: /shelltask/somewhere/that/does/not/exist
Monty Tayloreb093982017-08-30 19:16:21 -050038 failed_when: false
39
40 - name: Loop with items on an ansible python exception
41 command: "echo {{ item }}"
42 with_items:
43 - item1
44 - item2
45 - item3
46 args:
David Shrewsbury13d6e582017-08-31 13:03:12 -040047 chdir: /itemloop/somewhere/that/does/not/exist
Monty Tayloreb093982017-08-30 19:16:21 -050048 failed_when: false
Tobias Henkele771b6e2017-10-25 14:23:31 +020049
50 - name: Print binary data
51 command: echo -e '\x80abc'