Skip to content
This repository
Newer
Older
100644 79 lines (53 sloc) 2.079 kb
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
1 # extremely simple test of the most basic of playbook engine/functions
2 ---
3 - hosts: all
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
4
1c9b43df »
2012-08-06 more whitespace
5 # the 'weasels' string should show up in the output
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
6
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
7 vars:
c1fe0dd7 »
2012-03-18 Quote long variables in playbooks when feeding them to the setup command
8 answer: "Wuh, I think so, Brain, but if we didn't have ears, we'd look like weasels."
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
9 port: 5150
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
10
11 # we should have import events for common_vars and CentOS.yml (if run on CentOS)
12 # sorry, tests are a bit platform specific just for now
13
4de7bbb1 »
2012-03-19 Allow conditional imports, see examples/playbook3.yml comments for a …
14 vars_files:
15 - common_vars.yml
16 - [ '$facter_operatingsystem.yml', 'default_os.yml' ]
1c9b43df »
2012-08-06 more whitespace
17
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
18 tasks:
19
20 - name: test basic success command
1bcba4f4 »
2012-07-30 test/TestRunner.py now executes false with no directory prefix
21 action: command true
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
22
23 - name: test basic success command 2
1bcba4f4 »
2012-07-30 test/TestRunner.py now executes false with no directory prefix
24 action: command true
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
25
5ed2b894 »
2012-03-19 Add an additional way to dereference a variable in a playbook, $foo
26 - name: test basic shell, plus two ways to dereference a variable
27 action: shell echo $HOME $port {{ port }}
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
28
4de7bbb1 »
2012-03-19 Allow conditional imports, see examples/playbook3.yml comments for a …
29 - name: test vars_files imports
30 action: shell echo $duck $cow $testing
31
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
32 # in the command below, the test file should contain a valid template
33 # and trigger the change handler
34
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
35 - name: test copy
b15c8e9c »
2012-03-18 Playbook test upgrades, made some notes about callbacks we need to ad…
36 action: copy src=sample.j2 dest=/tmp/ansible_test_data_copy.out
1c9b43df »
2012-08-06 more whitespace
37 notify:
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
38 - on change 1
39
40 # this should trigger two change handlers, but the 2nd should
41 # not be triggered twice because it's already triggered
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
42
43 - name: test template
b15c8e9c »
2012-03-18 Playbook test upgrades, made some notes about callbacks we need to ad…
44 action: template src=sample.j2 dest=/tmp/ansible_test_data_template.out
1c9b43df »
2012-08-06 more whitespace
45 notify:
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
46 - on change 1
47 - on change 2
48
49 # there should be various poll events within the range
50
51 - name: async poll test
52 action: shell sleep 5
53 async: 10
54 poll: 3
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
55
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
56 # the following command should be skipped
57
58 - name: this should be skipped
59 action: shell echo 'if you see this, this is wrong ($facter_operatingsystem)'
60 only_if: "'$facter_operatingsystem' == 'Imaginary'"
61
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
62 handlers:
63
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
64 # in the above test example, this should fire ONCE (at the end)
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
65 - name: on change 1
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
66 action: shell echo 'this should fire once'
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
67
68 # in the above test example, this should fire ONCE (at the end)
69
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
70 - name: on change 2
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
71 action: shell echo 'this should fire once also'
5371a9e4 »
2012-03-18 Regression tests for playbooks, logging the events they call via call…
72
73 # in the above test example, this should NOT FIRE
74
75 - name: on change 3
6ab615c7 »
2012-03-23 Code cleanup for playbooks, also added 'on_skipped' callback
76 action: shell echo 'if you see this, this is wrong'
45abe3c1 »
2012-03-18 Add unit tests for playbooks, and fix an error caught by one
77
78
Something went wrong with that request. Please try again.