Michael DeHaan
cdaa2085ee
Preliminary ability to use Jinja2 {{ }} to replace ${foo.bar} in playbooks. Can't use both at the same time per line.
2013-04-03 01:04:16 -04:00
Javier Candeira
ca6c36e1ac
password lookup plugin, with working tests and documentation
2013-03-10 13:36:53 +11:00
Jayson Vantuyl
13ddd39db9
add with_sequence lookup plugin
...
Plugin allows you to do easy counts for items.
2013-01-09 15:30:24 -08:00
Michael DeHaan
0c4b30a471
Aliased node test doesn't make sense locally, so remove it.
2012-11-19 10:45:10 -05:00
Michael DeHaan
9985995a9d
Make tests use the local connection type, fix missing callback in tests.
2012-11-19 10:30:30 -05:00
Daniel Hokka Zakrisson
eebbbd3f0e
Make parameterized playbook includes work with vars as a list
...
Fixes #1610 .
2012-11-13 12:12:18 +01:00
Daniel Hokka Zakrisson
5752d2a850
Fix lookup plugin test properly
2012-11-13 12:09:42 +01:00
Daniel Hokka Zakrisson
f91fa9f765
Fix lookup plugin test
2012-11-13 02:13:10 +01:00
Daniel Hokka Zakrisson
9c095b72b9
Add parameterized playbook includes
...
Also makes with_* work with them.
Fixes #1162 .
2012-11-09 15:43:49 +01:00
Daniel Hokka Zakrisson
43419d7b20
Add tests for lookup plugins
2012-11-07 23:21:26 +01:00
Daniel Hokka Zakrisson
40af8eff14
Add testcase for first_available_file
2012-11-06 20:57:35 +01:00
Daniel Hokka Zakrisson
fbda2d4628
Use default port if ansible_ssh_port is not set for the delegated node
...
Also add testcase for it.
2012-11-01 12:00:49 +01:00
Michael DeHaan
6ba30170dd
Make group_vars and host_vars available to usr/bin/ansible, and make vars_plugins exist
2012-10-26 19:55:59 -04:00
Daniel Hokka Zakrisson
1449c8ac67
Fix ansible_ssh_host again
...
This time with unit tests to ensure it keeps working.
2012-10-21 21:22:56 +02:00
Michael DeHaan
e1ecb95b3d
Delete test that was coded against *local* resolv.conf -- obviously not going to be the same between people's computers
2012-09-18 21:16:35 -04:00
Michael DeHaan
08b70949c7
Fix a test and a typo in an example
2012-09-18 21:10:07 -04:00
John Kleint
2a002f5c0b
Support iteration over command output in with_items.
...
When the output of a command is stored in a register, this will create a
stdout_lines field in the result object that contains stdout split into a list
of lines. This list can then be iterated over using with_items.
2012-09-17 16:57:33 -04:00
Michael DeHaan
04555f525e
Fix a test from a previous pull request.
2012-09-11 18:04:54 -04:00
Brian Coca
83d1028a21
- Makefile now works with freebsd (date command options are diff)
...
date still issues warning and ignores TZ
- Updated tests to work inside bsd jails (127 addresses are an issue)
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
2012-08-29 09:46:05 -04:00
Dave Peticolas
b42e835aab
Always load group_vars and host_vars.
2012-08-13 21:08:05 -07:00
Dave Peticolas
08272dc25d
Remove unused imports.
2012-08-09 21:35:22 -07:00
Michael DeHaan
1c9b43df1b
more whitespace
2012-08-06 21:00:21 -04:00
Petros Moisiadis
2ac4acbf97
fixes for tests
2012-08-01 22:17:16 +03:00
Will Thames
845a7ac5ae
test_one not working as tests after skipped test failing, because
...
on_skipped callback being passed an extra item parameter that it wasn't
expecting.
Fixed it so that on_skipped in TestCallbacks accepts and ignores the
extra parameter
Extra parameter was added in 4b9b9a8a5b
but not really clear why from commit message
2012-08-01 12:35:17 +10:00
Michael DeHaan
867b2437cc
consolidate output code in callbacks.py, from utils, remove extra functions
2012-07-15 10:12:49 -04:00
Michael DeHaan
279b5965b8
Much streamlining around setup steps in playbooks, now only run setup once per play.
2012-07-14 12:24:19 -04:00
Michael DeHaan
efac68b636
Remove the -D module debug flag, which no longer is functional due to sudo pty requirements, and replace with -v/--verbose.
...
This flag will show playbook output from non-failing commands. -v is also added to /usr/bin/ansible, but not yet used.
I also gutted some internals code dealing with 'invocations' which allowed the callback to know what module invoked
it. This is not something 0.5 does or needed, so callbacks have been simplified.
2012-06-19 21:57:43 -04:00
John Kleint
70837469c6
Properly template list of hosts in playbooks.
...
In playbooks, hosts can be a YAML list. We templated the list before
converting it to a semicolon-separated string, which actually templated its
repr. This converts to a string first. A basic unit test is included.
2012-05-31 16:06:21 -04:00
Michael DeHaan
d4f660edc3
Do not run unit tests against the EVENTS code because it is subject to change and that does not mean anything is broken.
...
If we want to test playbooks, it's best to test the result of a playbook to make sure it does the correct thing. Also
remove playbook2/3 yml which were not used.
2012-05-09 23:21:44 -04:00
Jeroen Hoekx
cd9f926b5f
Fix correct variable expansion in includes only_if.
...
There's not need to run the complete include through the templating engine.
Several variables were not included before the conditional was evaluated.
2012-05-11 15:55:33 +02:00
Jeroen Hoekx
029fe1273c
Modify /usr/bin/ansible and playbooks to use the new async API.
2012-05-01 18:38:26 -04:00
Michael DeHaan
b9982fc17b
Reinstate --extra-vars, which can do things in playbooks like:
...
ansible-playbook release-my-app.yml --extra-vars="version=123"
And make $version available in the playbook without re-editing the file
2012-04-26 19:57:07 -04:00
Michael DeHaan
c0c691089d
Fix bug in src. Should not code this early :)
2012-04-20 08:09:43 -04:00
Michael DeHaan
3f26a1c7f6
verbose option is not being used, so remove it. debug variable still exists.
2012-04-16 23:47:41 -04:00
Michael DeHaan
08c593bee1
Warn if no hosts matched
2012-04-11 21:05:46 -04:00
Michael DeHaan
b9e3b053f9
Simplify playbook tests so things are not timing dependent in the poll section, which is leading to tests
...
not being consistent between runs, even though there wasn't an error. Now we'll just check the final change
counts, which should be just as solid and lead to less churn in the events file.
2012-04-11 20:27:17 -04:00
Michael DeHaan
e103bdda93
Rename test class to match what it is testing
2012-04-11 20:16:28 -04:00
Michael DeHaan
4792021f47
Fix syntax error in user patch
2012-04-02 20:08:40 -04:00
Michael DeHaan
2511992659
Surface module debug (-D) to /usr/bin/ansible also
2012-03-31 11:45:29 -04:00
Michael DeHaan
6dda6f12dc
Applying callback model to runner, and using that in playbooks, so output can be more immediate in playbooks.
...
(Runner still does not use callbacks for default output)
2012-03-25 19:05:27 -04:00
Michael DeHaan
6ab615c724
Code cleanup for playbooks, also added 'on_skipped' callback
2012-03-23 20:51:26 -04:00
Michael DeHaan
a5f4ca50b8
Ratchet up logging a few notches prior to controlling w/ verbosity settings
2012-03-20 22:29:21 -04:00
Michael DeHaan
b5c62ec068
Enhance logging, way to gate verbosity levels pending.
2012-03-20 21:44:01 -04:00
Michael DeHaan
4de7bbb169
Allow conditional imports, see examples/playbook3.yml comments for a full explanation. Extensive
...
refactoring of playbooks now warranted, which we'll do before we move on. This variable assignment
system makes nearly all possible magic possible, for we can use these variables however we like,
even as module names!
2012-03-19 22:42:31 -04:00
Michael DeHaan
c1fe0dd719
Quote long variables in playbooks when feeding them to the setup command
2012-03-18 19:50:22 -04:00
Michael DeHaan
5371a9e497
Regression tests for playbooks, logging the events they call via callbacks.
2012-03-18 19:25:56 -04:00
Michael DeHaan
b15c8e9cb1
Playbook test upgrades, made some notes about callbacks we need to add. Still need to compare events
...
recieved vs expected so we can be notified if this test breaks, and also to add some more detailed
playbooks that use includes & async, etc.
2012-03-18 18:50:25 -04:00
Michael DeHaan
45abe3c16b
Add unit tests for playbooks, and fix an error caught by one
2012-03-18 18:29:11 -04:00