5031104c3a
Finishing touches on template cleanup.
2013-10-19 11:40:48 -04:00
35cb9dc22f
Work in progress about cleaning up template code.
2013-10-19 11:39:52 -04:00
baa13a5cc7
Merge pull request #4395 from erjohnso/devel
...
adding Google Compute Engine modules and inventory plugin
2013-10-17 07:30:55 -07:00
7ecb5fbc9c
Handle comment on inventory group line.
2013-10-17 13:16:35 +03:00
44279ce34f
Allow leading ranges in the inventory host entries.
2013-10-17 13:16:35 +03:00
76ed19d279
Fix TestInventory class by explicitly using /bin/bash
2013-10-15 21:34:36 +02:00
3ad61ef310
copy: Add testcase for recursive copy.
2013-10-15 18:40:40 +03:00
43df00550d
Merge pull request #3827 from mscherer/disable_callbacks
...
add a way for callback to disable itself
2013-10-12 07:03:06 -07:00
2032489617
Prune legacy tests -- many of these are not part of the official API or documented syntax.
2013-10-11 19:31:26 -04:00
e8b043332f
Remove some obsolete tests (mechanism of error detection suboptimal, replacements pending)
2013-10-11 19:28:53 -04:00
add45d2ca9
Fixup legacy var detector.
2013-10-11 19:16:36 -04:00
709ffda3d1
Tweak only_if deprecation detector.
2013-10-11 19:12:25 -04:00
25dc0ef8d7
Remove out of date tests.
2013-10-11 19:09:10 -04:00
800f12618e
Remove out of date tests.
2013-10-11 19:08:53 -04:00
61525a97df
Add regex (search, match, regex) jinja2 filters. Fixes #3725
2013-10-11 08:03:04 -05:00
9ca824c16d
adding Google Compute Engine modules and inventory plugin
2013-10-07 21:01:37 +00:00
8fc46a3a5a
Return inventory objects in the order they are presented. Additionally, fix host slicing such that it works on Python terms with
...
zero indexed lists and a non-inclusive final element.
2013-10-07 15:06:15 -04:00
cc0c908cee
Added validate option to lineinfile
...
The validate option is constructed similarly to the template command's
validate option. TestRunner.py has been updated to include two new
tests, one for passing and one for failing validation.
2013-10-06 13:51:27 -04:00
535ce97067
Add fileglob Jinja2 filter. Fixes #3563
2013-09-30 12:55:13 -05:00
ef28d62846
Update TestUtils.py
...
tests shouldn't be making symlinks to system dirs, also fixes unit test report on OS X.
2013-09-28 11:01:21 -04:00
d4dec5f577
Allow creating empty inventory
...
Instantiating the Inventory class with host_list=None now results in an
empty inventory instead of an error.
2013-09-25 15:00:35 +02:00
399d57a651
add more tests :
...
- test part of ansible.runner.filter_plugins.core
- test ansible.utils.unfrackpath
2013-09-21 13:00:11 +02:00
3b801dec72
Merge branch 'failed_when' of https://github.com/hnakamur/ansible into hnakamur-failed_when
2013-09-16 07:35:34 -05:00
aac3090909
Merge branch 'play_remote_user' of https://github.com/bcoca/ansible into bcoca-play_remote_user
2013-09-16 05:55:14 -05:00
2357194b39
Add failed_when module variable.
...
Implementation note: Ternery operator trick for python prior to 2.5 is used.
(test and [when_true_value] or [when_false_value])[0]
http://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python#comment1466794_394887
2013-09-10 08:34:01 +09:00
8d0487c31e
Removing broken tests for now
2013-09-09 15:16:17 -05:00
d47c48e30a
Added remote_user to plays
...
Still compatible with user: but deprecating it so we can have
a matching remote_user: in tasks, cannot be user: because of the
module of the same name. #3932
Signed-off-by: Brian Coca <briancoca+dev@gmail.com >
2013-09-07 16:34:22 -04:00
a0b73b18c3
add one last test, for combined range, which make ansible.inventory.expand_hosts
...
covered to 100%
2013-08-23 13:06:31 +02:00
64d35cb3b6
test that using non ordered range of char send a exception
2013-08-23 12:58:10 +02:00
4f69b63fec
add test for incorrect format in range host
2013-08-23 12:51:17 +02:00
835fdd1ec2
add test for missing end in host range
2013-08-23 12:42:26 +02:00
2aea8a6368
add a test to verify ansible detect invalid range
2013-08-23 12:29:38 +02:00
7fec9c3eba
add a test to cover bound stepping in inventory
2013-08-23 12:00:39 +02:00
157b697a83
Merge branch 'always_run-6' of https://github.com/stoned/ansible into stoned-always_run-6
2013-08-22 12:10:28 -05:00
ddd582269c
increase test coverage of inventory by around 5% according to nose
2013-08-21 08:03:41 +02:00
f0743fc32a
Introduce the 'always_run' task clause.
...
The 'always_run' task clause allows one to execute a task even in
check mode.
While here implement Runner.noop_on_check() to check if a runner
really should execute its task, with respect to check mode option
and 'always_run' clause.
Also add the optional 'jinja2' argument to check_conditional() :
it allows to give this function a jinja2 expression without exposing
the 'jinja2_compare' implementation mechanism.
2013-08-20 23:09:44 +02:00
e3adfbf5f8
Add tests for undefined variable detection
...
Tests `test_playbook_undefined_varsX_fail` check if ansible detects
undefined variables when `error_on_undefined_vars` is enabled. These
tests fail without "Improve behavior with error_on_undefined_vars
enabled" patch.
Tests `test_playbook_undefined_varsX_ignore` check if ansible ignores
undefined variables when `error_on_undefined_vars` is disabled.
Also modify PlayBook._run_task_internal() so error_on_undefined_vars is
testable.
2013-08-20 00:40:49 -05:00
b655d5798b
add tests for the -i option when used with raw string for ipv4
...
and ipv6 addresses.
2013-08-19 15:27:21 -05:00
498a550f01
add test for the disabling of callback plugins
2013-08-15 00:05:33 +02:00
4bdbe4dc4f
Remove some test prints
2013-08-10 17:37:04 -04:00
76fd769704
Merge pull request #3685 from mspaulding06/indexed_items
...
Indexed items lookup plugin
2013-08-03 11:36:51 -07:00
3ebbb56479
Merge pull request #3654 from MaxIV-KitsControls/devel
...
Fix nested loop for more than 3 elements
2013-08-01 17:11:26 -07:00
b7154cf2cf
Add tests for indexed_items lookup plugin
2013-07-28 14:16:25 -07:00
09ef7751e1
Fix nested loop for more than 3 elements
...
- combine flatten list for each nested level instead once at the end
2013-07-24 14:19:13 +02:00
a1503c4d59
stringify conditional before handing it to Jinja2 for evaluation.
...
This should fix simple conditionals like:
when: ansible_selinux
While here add tests for ansible.utils.check_conditional() in
"jinja2_compare mode".
2013-07-23 22:24:53 +02:00
88720516a1
Merge branch 'changed_when' of git://github.com/stoned/ansible into changed_when
2013-07-21 10:14:03 -04:00
4a732c1e9f
Enabled the use of extra vars in playbook file paths when including playbooks from other playbooks.
2013-07-18 22:45:18 +02:00
eb45f07ae3
Introduce 'changed_when' keyword to override a task's changed status with the evaluation of a Jinja2 expression
2013-07-14 21:07:45 +02:00
baf868f825
Add test for 'ignore_errors:'
2013-07-01 02:31:16 +02:00
b32131c867
expanduser on each component of plug-in paths
...
ansible.constants was calling expanduser (by way of shell_expand_path)
on the entire configured value for the library and *_plugins
configuration values, but these values have always been interpreted as
multiple directories separated by os.pathsep. Thus, if you supplied
multiple directories for one of these values, typically only the first
(at least on *nix) would have e.g. "~" expanded to HOME.
Now PluginLoader does expansion on each individual path in each of
these variables.
2013-06-22 17:01:12 -05:00