Commit Graph

14 Commits (76766aac8b9b1890f6a22deb8a3ba77500b9a245)

Author SHA1 Message Date
James Cammarata 91500f8f5f Fix include param precedence in variable manager 9 years ago
James Cammarata e6d3c6745f Revert to using local file/dir tests in inventory instead of loader's
Fixes #12719
9 years ago
James Cammarata 31d5f88a1d Use the task loop to calculate multiple delegated hosts
Due to the way we're now calculating delegate_to, if that value is based
on a loop variable ('item') we need to calculate all of the possible
delegated_to variables for that loop.

Fixes #12499
9 years ago
James Cammarata ac6f61ec7f Properly handle group/host_var files with dots in them
Fixes #12245
9 years ago
James Cammarata ff9f5d7dc8 Starting to add additional unit tests for VariableManager
Required some rewiring in inventory code to make sure we're using
the DataLoader class for some data file operations, which makes mocking
them much easier.

Also identified two corner cases not currently handled by the code, related
to inventory variable sources and which one "wins". Also noticed we weren't
properly merging variables from multiple group/host_var file locations
(inventory directory vs. playbook directory locations) so fixed as well.
9 years ago
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
9 years ago
Toshio Kuratomi aeff960d02 Cleanup combine_vars
* Dedupe combine_vars() code (removed from VariableManager)
* Fix merge_hash algorithm to preserve the type
* unittest combine_vars and merge_hash
9 years ago
James Cammarata 1163e38d39 Fix unit tests for new magic variable addition 'ansible_version' 9 years ago
James Cammarata 53cd96befe Updating unit tests to account for new magic variable 'vars' 10 years ago
James Cammarata 4fbd4ae18b Update VariableManager test for additional magic variable playbook_dir 10 years ago
James Cammarata 48d62fd934 Cleaning up VariableManager tests (v2) 10 years ago
James Cammarata 1ca8cb8553 Fixing up v2 unit tests 10 years ago
Matt Martz a0fc8bb0bd Testing additions and fixes
* Fix import pathing for units.mock
* Add some additional requirements
* Use compileall to test compatiblity with different python versions
10 years ago
James Cammarata ce3ef7f4c1 Making the switch to v2 10 years ago