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
Michael DeHaan
e103bdda93
Rename test class to match what it is testing
13 years ago
Michael DeHaan
245aa9bf8e
Some tweaks to the fetch module. 'err' return was for stderr, so that should be empty string.
...
Some minor code shortening. Added a test to TestRunner.
13 years ago
Michael DeHaan
51e4faf7aa
Update test file -- we probably should not include the poll as the number of polls is changing between test
...
runs (that's ok, it's not intended to be realtime accurate)
13 years ago
Michael DeHaan
1d75a29ec9
Allow variables coming in from the playbook and the API to be expressed as dictionaries throughout their full life cycle
...
such that nested data can be made available in templates and playbooks.
13 years ago
Michael DeHaan
eed4a2b717
Update tests to use 127.0.0.2 to bypass the smart "use local connection" code, and also to reflect
...
that commands now trigger change events.
13 years ago