Commit Graph

20 Commits (6a77533b57595a6624e47524b4d8e653be5cee68)

Author SHA1 Message Date
Martin Krizek 7346b699ee
Use templated loop_var/index_var when looping include_* (#58866)
Fixes #58820
5 years ago
Matt Martz 6996926d89
Expose loop_control.loop_var as ansible_loop_var (#54240)
* Expose the loop_var as ansible_loop_var

* Add docs

* fix assert test

* Indicate version added
6 years ago
Brian Coca b793f08a92
fixes for stripping (#52930)
function changed to do in place replacement, should be less expensive even with copy as it avoids 'sub copies', can compose with module_args_copy to create replacement for old behavior

  attempt to fix #52910

* handle lists and subdicts correctly
* added  missing exception case, which was not noticed since 'cleaning' was not working
* added comments to clarify exceptions
6 years ago
Brian Coca 30da7a363c
allows loop pause for subseconds (#50461)
* allows loop pause for subseconds
* skip test on os x and bsd since date commands lacks nano

fixes #49951
6 years ago
Matt Martz 9007dbec2f
Add info about loop based on jinja2 loop var (#42134)
* Add info about loop based on jinja2 loop var

* ansible_loop

* Update test count

* Add extended loop_control that defines whether ansible_loop should be added

* Extended needs to be defaulted

* Revert "Update test count"

This reverts commit f1e93ee469825f4cdcd90fb28667d29aa088275c.

* Add docs about loop_control.extended

* Add revindex and revindex0

* Document ansible_loop in special vars

* Add changelog fragment

* Add tests, change items to allitems so that dot notation works, fix logic error with previtem
6 years ago
Matt Martz f6ecdf0b87
Handle sets differently than lists in wrap_var. Fixes #47372 (#47510) 6 years ago
Toshio Kuratomi ccabc2bff5 Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba.

The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform.  Tests need to be rewritten
6 years ago
Matt Martz c58de75f38 Handle sets differently than lists in wrap_var. Fixes #47372 6 years ago
Matt Martz 02f4d0a57f
Ensure that an empty literal list with loop skips the task (#47129) 6 years ago
Matt Martz 2ac647def8
Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes #45189 (#45231) 6 years ago
Matt Martz a7f45c0660 Add basedir to ansible_search_path before running loops. Fixes #43302 (#43431) 6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Adam Miller 98a198a777
Handle incorrect data type in list lookup plugin (#35483)
handle incorrect data type in list lookup plugin
Fixes #35481
test to ensure that loops properly handle incorrect datatypes

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Toshio Kuratomi 03a6d72633 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.
7 years ago
Brian Coca b47d2e07e1
remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix
7 years ago
Martin Krizek 9fced4f0a9
Add integration test for #36430 (#36432) 7 years ago
Andrew Gaffney e9b0a4ccb4 Add support for defining index var for task loops 7 years ago
Toshio Kuratomi e8cfe05e37 Test behaviour of loop keyword plus lookup plugins
We introduced the new loop keyword as a replacement for with without
adding tests that it behaved as we expected.  This test asserts that
behaviour.

Incidentally, it also shows how to use parameters with lookups and loops
now.
7 years ago
Matt Clay 6bbd92e422 Initial ansible-test implementation. (#18556) 8 years ago
Matt Clay 75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 8 years ago