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.
13 years ago
Jeroen Hoekx
d592e15dcc
Correctly add ungrouped hosts to 'ungrouped' in YAML inventory.
13 years ago
Daniel Hokka Zakrisson
031c75e53a
Update tests to reflect new API
13 years ago
Daniel Hokka Zakrisson
24d73b0fe6
Add tests of iterative templating
13 years ago
Daniel Hokka Zakrisson
05a7a3725b
Add tests of host exclusions
13 years ago
Michael DeHaan
bd893b765b
Merge pull request #459 from dhozac/with_items-variable
...
Allow a variable in with_items
13 years ago
Stephen Fromm
9cf182c225
Add assemble module
...
This adds a module that concatenates (ie. assembles) a file from
fragments in a directory in alphabetical order. It chains the file
module afterward to fix up ownership and permission. This also adds
tests for the assemble module with fragments in assemble.d.
13 years ago
Daniel Hokka Zakrisson
a05da2d312
Allow with_items to specify a variable
13 years ago
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.
13 years ago
Matt Goodall
639763c138
Allow "=" in k-v values.
13 years ago
Michael DeHaan
8e88667f82
Fix hosts being in multiple groups, and duplicate host references in the same inventory file.
13 years ago
Jeroen Hoekx
ecc0b0770c
If /usr/share/dict/words does not exist, use cracklib-small to test large output.
13 years ago
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.
13 years ago
Michael DeHaan
f8807da57b
Merge pull request #363 from jhoekx/template-only-if
...
Fix correct variable expansion in includes only_if.
13 years ago
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.
13 years ago
Jeroen Hoekx
3cbc229990
Support list indexing in varReplace.
13 years ago
Jeroen Hoekx
74e21e6154
Fixup unicode varReplace templating.
...
The original patches should have conflicted?
53bde0bf51
vs efde61e537
13 years ago
Michael DeHaan
36639186e0
Merge pull request #362 from jhoekx/uppercase-vars
...
Allow camelCase variables in varReplace.
13 years ago
John Kleint
83b9a43e60
Add test for large output; fix indentation.
13 years ago
Jeroen Hoekx
dc60f2d844
Allow camelCase variables in varreplace.
13 years ago
Jeroen Hoekx
2bbc05185e
Make no_engine the default templating action.
13 years ago
Jeroen Hoekx
82144fd543
Support nested variables in varReplace.
13 years ago
Jeroen Hoekx
e09572a8e1
Inventory: undefined group -> ungrouped.
...
Also change test name collision.
13 years ago
Jeroen Hoekx
d419a13ca7
Inventory: support list of vars in host.
13 years ago
Michael DeHaan
157d21b1c3
Add tests for new advanced inventory features (groups of groups, group variables) in the default INI format file.
13 years ago
Michael DeHaan
1a00e2635e
Further work on making the YAML inventory parser use the new inventory objects.
13 years ago
Michael DeHaan
256377166a
Reinstate external inventory script support this time using the new more OO-ey inventory system.
...
Next up: YAML format.
13 years ago
Michael DeHaan
0669ce858a
Refactored inventory to make it object oriented, need to make YAML format and executable script
...
format compatible with this still, and add some tests for INI-style groups of groups
and variables.
13 years ago
Jeroen Hoekx
03541baba7
Define 'inventory_hostname' variable for hosts.
13 years ago
Jeroen Hoekx
029fe1273c
Modify /usr/bin/ansible and playbooks to use the new async API.
13 years ago
Jeroen Hoekx
b87710a1df
Introduce group_names in template variables.
...
This is a list of all the groups a host is in.
13 years ago
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
13 years ago
Jeroen Hoekx
cc579a8aa2
Fix tests for facter and the ansible_facts API.
13 years ago
Jeroen Hoekx
2dc9a563ef
Allow modules to return facts.
...
If the module result contains "ansible_facts", that will be added to the setup
cache.
13 years ago
Michael DeHaan
c0c691089d
Fix bug in src. Should not code this early :)
13 years ago
Jeroen Hoekx
903e4f6eae
Support dicts in inventory vars.
13 years ago
Michael DeHaan
30d06dbcea
Don't force down ansible facts back to setup, the setup module won't like parsing them on input and that
...
data is already there.
13 years ago
Michael DeHaan
da0209dbc4
The fetch module really should preserve the whole directory structure being fetched to allow subsequent calls,
...
particularly in playbook, to recreate the host tree structure. Making it thus.
13 years ago
Jeroen Hoekx
6f09b41eb5
Don't test modules that aren't present.
...
Also account for path difference in sleep in different distributions.
13 years ago
Michael DeHaan
3f26a1c7f6
verbose option is not being used, so remove it. debug variable still exists.
13 years ago
Michael DeHaan
9ce27be878
Remove extra_vars tests
13 years ago
Jeroen Hoekx
8c3206c99f
Return a copy of the host variables.
13 years ago
Jeroen Hoekx
961ccdb2f4
List hosts in no group in the ungrouped group.
13 years ago
Jeroen Hoekx
3a24aa9a70
Add YAML inventory format.
...
See test/yaml_hosts for an example.
Hosts can be part of multiple groups.
Groups can also have variables, inherited by the hosts.
There is no variable scope, last variable seen wins.
13 years ago
Jeroen Hoekx
54f4526160
Export SSH port number as host variable.
13 years ago
Jeroen Hoekx
f04041b37d
Ignore port numbers in simple inventory format
13 years ago
Jeroen Hoekx
746f1b92ae
Reimplement the class method on Runner.
13 years ago
Jeroen Hoekx
195e6d617b
Add tests for Inventory class.
13 years ago
Michael DeHaan
08c593bee1
Warn if no hosts matched
13 years ago
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.
13 years ago