Commit Graph

122 Commits (13e8732598404d59d4044dd5a6781b7447fae49b)

Author SHA1 Message Date
Brian Coca bbdfaf0522 move hostvars.vars to vars
this fixes duplication under hostvars and exposes all vars in the vars dict
which makes dynamic reference possible on 'non hostvars'
9 years ago
Yannig Perré a4674906c6 Merge role params into variables separately from other variables
Fixes #13617
9 years ago
James Cammarata 4426b7f6e0 fix sorting of groups for host vars
Fixes #13371
9 years ago
James Cammarata a183972477 Don't use play vars in HostVars
Fixes #13398
9 years ago
James Cammarata cc36eedf76 Ensure port is (re)set for delegated-to hosts
Fixes #13265
9 years ago
James Cammarata fbc9553bd4 Use text_type instead of unicode 9 years ago
James Cammarata c6a30f7000 Make sure the uuid in vars is string 9 years ago
James Cammarata dfa576b037 Merge pull request #13307 from Yannig/devel_fix_big_include_vars
Fix for https://github.com/ansible/ansible/issues/13221
9 years ago
James Cammarata 5b6162a166 Re-adding role_name/role_uuid variables 9 years ago
Yannig Perré 5227c6bb52 Do not copy variable_manager each time. Instead, keep host and local variable_manager sync.
Fix https://github.com/ansible/ansible/issues/13221
9 years ago
James Cammarata 91500f8f5f Fix include param precedence in variable manager 9 years ago
James Cammarata 180159b01d Adding vars back in and trying to add a little more speed by avoiding copies 9 years ago
James Cammarata f10d2c57c8 Restoring templating of hostvars returned by __getitem__ 9 years ago
James Cammarata 9f31c073fe Fixing a few bugs in the HostVars performance areas
* Also refresh inventory in the HostVars manager process when things
  are changed via add_host/group_by
* Raise j2undefined rather than return it
9 years ago
James Cammarata 5cbeab5a3c Performance improvements for HostVars and some bugfixes 9 years ago
nitzmahone 3bb1f7a561 hostvars should return j2 undefined as instance, not type
Looks like someone forgot to create an instance of undefined here- we were returning the undefined type object, which broke all the undefined checks.

Added an integration test around add_host that will catch this (separate PR to follow)
9 years ago
Toshio Kuratomi 62979efa14 Finish up plugin porting to global display
Also remove display = display which does nothing
9 years ago
James Cammarata 566144461f Remove internal use of display and use the top-level import 9 years ago
James Cammarata 09994c18f3 Correct logic around determining environment variable existence
Fixes #13105
9 years ago
James Cammarata ccbcfcddfc Move where we add environment and make it conditional on not existing
Also displays a warning now, because users should not be using that variable
name as it causes a collision with the internal variable of the same name.
9 years ago
James Cammarata 937584cd52 Ensure 'environment' is set in the magic variables
Fixes #13033
9 years ago
James Cammarata 7e04947599 Be more selective about what variables we cache during templating
Fixes #13087
9 years ago
James Cammarata dd4ca66e1e Make sure hostvars cache is recreated during serialization 9 years ago
James Cammarata 5040abaaf2 Merge branch 'devel_cache_for_do_template_call' of https://github.com/Yannig/ansible into Yannig-devel_cache_for_do_template_call 9 years ago
James Cammarata 63c47fb271 Fixing up performance 9 years ago
Brian Coca 483c25a609 Revert "switched host patterns to use sets, simplified logic which now uses buitins"
need this to be lists, for order and other considerations
This reverts commit 8e2f0b3f2c.
9 years ago
Brian Coca 8e2f0b3f2c switched host patterns to use sets, simplified logic which now uses buitins 9 years ago
Yannig Perre ccbdd6229a Use static vars when computing host vars known to be static (inventory_hostname, inventory_dir etc.). 9 years ago
Yannig Perré 30f827d92d Fix python3 test. 9 years ago
Yannig Perré 4a8d1703d4 New patch against hostvars.py. With this patch, Ansible run lose 50% of time.
Little rewrite of previous patch to use sha1 signature.
Use fail_on_undefined to compute sha1 signature.
9 years ago
Toshio Kuratomi 4203850d1a Break apart a looped dependency to show a warning when parsing playbooks
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
9 years ago
James Cammarata cace91df56 Allow hostvars cache to be invalidated so hostvars contain all hosts after add_host
Fixes #12925
9 years ago
Brian Coca 7ebfe72015 added missing string_types 9 years ago
Brian Coca 8ce864db6f sanatize results 9 years ago
James Cammarata 498c27d09a Re-adding role_names magic variable
Fixes #12863
9 years ago
Brian Coca 08c9e70307 made display part of variable manager and corrected reference to it
fixes #12859
9 years ago
Toshio Kuratomi 99e7bb35c1 Simplify UnsafeProxy as we don't need to use it for byte strings, only text 9 years ago
Toshio Kuratomi f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 9 years ago
James Cammarata 0bbe9d5bd0 Make hostvars json/yaml serializable in filters
Fixes #12615
9 years ago
Toshio Kuratomi baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 9 years ago
Brian Coca aee6de5a76 group_names should not include implied 'all', fixes #12763 9 years ago
Marius Gedminas e511d6d458 Make UnsafeProxy work on Python 3
Instead of str and unicode we have to deal with bytes and str.
9 years ago
Marius Gedminas af6a316d9b Remove unused import
Fixes ImportError: No module named '__builtin__' on Python 3.
9 years ago
James Cammarata cd2cb178ae Totally rework the way UnsafeProxy does things 9 years ago
James Cammarata d15fcf05f0 Fix bug in the way temp vars were created for templating vars_files
Fixes #12711
9 years ago
Ben Keith 1f82971283 Adding the inventory_file var back 9 years ago
Matthew Jones 7da478a4f4 Fix an issue where cache plugins weren't updated
The first call to persisting facts would work due to the assignment of a
MutableMapping calling __setitem__ but subsequent module fact data would
not be propogated to the fact cache plugins because update() doesn't
invoke __setitem__.  This changes the behavior a little bit and ensures
set() is called on cache plugins.
9 years ago
James Cammarata d91b3c6b9d Make sure magic variables are available when templating vars_files
Also does some reorganization/cleanup on the magic vars/delegated
variable generation portions of VariableManager to make the above
possible.

Fixes #12633
9 years ago
James Cammarata 3bd71d0619 Use delegated_to field for play context remote_addr, if none other exists
Fixes #12527
9 years ago
James Cammarata bb1101498d Clean up typo from cdc6c52 9 years ago