Commit Graph

5850 Commits (0719eb3e2d798c6f80223e37dd77bc0ac41c537d)

Author SHA1 Message Date
Brian Coca 1b349fdf34 Merge pull request #13112 from privateip/eapi
add initial support for Arista eAPI
9 years ago
James Cammarata 566144461f Remove internal use of display and use the top-level import 9 years ago
James Cammarata 0fc187893d Catch import warnings in a common location for both get() and all()
Potential solution for #12979
9 years ago
James Cammarata 9f0c2cfda5 Merge pull request #13114 from mgedmin/fix-plugin-loader
Check sys.modules before loading modules
9 years ago
Marius Gedminas 54eae4a793 Check sys.modules before loading modules
Code for a plugin is usually loaded by a PluginLoader(), and henceforth
available from self._module_cache, which prevents duplicate loading.
However there are situations (e.g. where one action plugin imports code
from another one) where the plugin module might be already imported (and
resident in sys.modules), but not present in the PluginLoader's
_module_cache, which causes imp.load_source() to effectively reload the
module, overwriting global class declarations and causing subtle latent
bugs.

Fixes #13110.
Fixes #12979.
9 years ago
James Cammarata a99f2fd52f Save delegated vars in result for use in callback methods
Fixes #13014
9 years ago
Peter Sprygada 2e98f7f429 add initial support for Arista eAPI
This commit adds the shared module support for Arisat EOS devices
running eAPI.  The shared module builds on top of module_utils/urls.py.
9 years ago
James Cammarata e56fd9e95d Make sure pattern cache components are converted to unicode 9 years ago
James Cammarata 0b999c602a Properly figure subset and restrictions into host cache pattern
Fixes #13111
9 years ago
James Cammarata d8fb5efa90 Merge pull request #13102 from Yannig/devel_cache_enhancement
New method template_no_cache for template object.
9 years ago
Yannig Perré 0c360d17cb New parameter for template method.
We do not compute hash when we know that the result does not need to be cached (like with_items loop).
It also result in a small speed improvement.
9 years ago
Etherdaemon 27398131cf Fixes #13010 by updating boto3 methods to update boto3_conn to check for profile_name and if detected, remove from params and set a new variable of profile which is passed into Session separately 9 years ago
James Cammarata 09994c18f3 Correct logic around determining environment variable existence
Fixes #13105
9 years ago
James Cammarata c753ae6e22 Fixing up host pattern caching to avoid bugs
* Always cache and return unique list objects, so that if the list
  is changed later it does not impact the cached results
* Take additional parameters and the type of the pattern into account
  when building the hash string
9 years ago
James Cammarata e8f83dcba3 Revert "Temporarily disable template caching"
This reverts commit 4d1757ce64.
9 years ago
James Cammarata 4d1757ce64 Temporarily disable template caching 9 years ago
Toshio Kuratomi 995db275f8 Update submodule refs 9 years ago
Toshio Kuratomi db5d3f03a9 Fix first_found not finding files in roles (only templates) 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
Brian Coca 37ae243587 made get_file_lines rely on get_file_content which deals with many error
conditions that the former did not.
9 years ago
ghislainbourgeois eb850d7e5b Fix get_dns_facts on inexistent resolv.conf 9 years ago
James Cammarata e36b4e2a13 Merge pull request #13072 from Yannig/devel_cache_optimization
Cache optimization
9 years ago
James Cammarata 76ae577519 Ensure environment is inherited properly (task->block/include->play) 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
Toshio Kuratomi 1a04f354f3 For with_first_found loops, set undefined variables to fall through rather than failing the task 9 years ago
Brian Coca 240acb1924 Merge pull request #13092 from privateip/nxapi
initial shared module support for nxapi
9 years ago
Peter Sprygada f88273eb87 changes the nxapi argument spec to require url_password 9 years ago
Peter Sprygada d3d36eb766 fixes conditional statement for py24 compatibility 9 years ago
Peter Sprygada 64e139adb1 add initial support for Cisco NXAPI
This commit adds the shared module support for Cisco NXAPI.  The shared
module builds on top of the urls shared module.  The urls module provides
the http/s transport.  This module only supports the JSON request message
format.
9 years ago
Rene Moser 1d59caed07 cloudstack: change order of tags handling, fixes update of tag value does not work 9 years ago
Rene Moser 3410a855b0 cloudstack: use jop polling in tag handling, fixes outdated tags returned.
In some cases the async job did not finish fast enough, causing returning an unexpeded result.
9 years ago
Joern Heissler 647b92a79b Use ansible_host in synchronize module
Fixes #13073
9 years ago
Yannig Perré 12a6fb9633 Small speed improvement with huge inventory (100+ hosts). 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
Brian Coca 9a25e16140 set corrected force default 9 years ago
Toshio Kuratomi 47f187b221 Update submodule refs 9 years ago
James Cammarata 59b67a2f68 Reset workers list when recreating processes
Also renames some things to be more accurate
9 years ago
Brian Coca 5b84bd6b5d Merge pull request #13056 from alxgu/sles_sap_family
Add SLES_SAP as a Suse family
9 years ago
Brian Coca 226c7f4c7b Revert "added setting of ansible_ssh_user to current user as backwards compatibilty issue"
scope was wrong, this var should not be 'reset' here.

This reverts commit c271c0eb04.
9 years ago
Brian Coca 9c24f88eca updated forks comment 9 years ago
Rene Moser 768f2fe6d4 template: fix regression bug in template in case force=false
Fixes regression bug, previously reported in #12844 fixed with
4b20884719 re-introduced with
c64ac90560
9 years ago
Alexander Gubin 215fc12234 Add SLES_SAP as a Suse family 9 years ago
Brian Coca 5c7d717f31 made ansibledoc more consistent with term sizes, it now uses display class column calculations
cleared up snippet display
9 years ago
James Cammarata 1027abd596 Cleaning up bugs related to perf improvement changes 9 years ago
James Cammarata f10022dbd2 Fix use of add_tqm_variables 9 years ago
James Cammarata efbc6054a4 Add variable compression option 9 years ago
James Cammarata 63c47fb271 Fixing up performance 9 years ago
Brian Coca c64ac90560 fixed check mode change response in template
fixes #13049
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 88ba46aee0 Revert "fixed append to add"
good change on top of bad
This reverts commit 699f344e17.
9 years ago
Brian Coca 699f344e17 fixed append to add 9 years ago
Brian Coca 8e2f0b3f2c switched host patterns to use sets, simplified logic which now uses buitins 9 years ago
Brian Coca 883f451158 fixed snippet display, short_desc is a string, not a list 9 years ago
Brian Coca 95604573ee improved the message when there is no module path override 9 years ago
Brian Coca f4912dd88a added callback fallback to v1 methods for backwards compat with existing callbacks 9 years ago
Brian Coca e2c56efca6 Merge pull request #12867 from bcoca/callback_whitelist_tweak
make callbacks declare needing whitelisting
9 years ago
Toshio Kuratomi 4f6d4c6bf6 Set task_action when the action does not need to be templated
Fixes #13042
9 years ago
Brian Coca 9753de35a7 Merge pull request #13038 from bcoca/min_forks_to_play
use minimal number of forks
9 years ago
Toshio Kuratomi 586cbb9fda Update core submodule ref 9 years ago
Toshio Kuratomi 483491ddfb template the task_action before checking whether to optimize with_item loops for it.
Fixes the second problem discovered in #12976
9 years ago
Toshio Kuratomi 9e758d3d97 Do not optimize with_items loop if the items are not strings
The code isn't sophisticated enough to understand lists and dicts yet.
This mirrors how 1.9.x handled non-string items so its not a regression.

One portion of a fix for #12976
9 years ago
Brian Coca 931eb16e55 clearer selection of min value
cleanup workers at each run to avoid stragglers
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 Perre e0aa3ff232 Cache against hosts pattern (fix a part of problem describe in https://github.com/ansible/ansible/issues/13023). 9 years ago
Brian Coca b44f1428d0 use minimal number of forks taking serial, forks and play patterns into account 9 years ago
Brian Coca 3c35655b52 removed serial as it is not avialable for fork control
fixes #13037
9 years ago
Brian Coca 0abeff4511 better limiting of forks to lowest actual restriction 9 years ago
nitzmahone 113c4350e3 Force SSL transport for pywinrm updates, get host+group vars
I PR'd a change to pywinrm to allow server certs to be ignored; but it's only on the SSL transport (which we were previously ignoring). For this to work more generally, we're also now pulling the named ansible_winrm_* args from the merged set of host/group vars, not just host_vars.
9 years ago
Lars Larsson 3289670a04 treat forks config parameter as max value instead of always creating that number of workers 9 years ago
Will Thames 91b6004149 Allow blank lines and comments/spaces in galaxy spec files
Fixes #10641 again. (Regression)
Added test to discourage future such regression.
9 years ago
Toshio Kuratomi 07d0d2720c Update submodule refs 9 years ago
Toshio Kuratomi 9ce3adbeb1 remove assigned but unused variables in module_utils.
These were mostly saving exceptions but not using them.  Getting rid of
those will help with eventually running modules via either python2.4 or
python3.x.
9 years ago
Toshio Kuratomi c08648999d Remove some more unused stdlib deps. 9 years ago
Toshio Kuratomi 658ea053ea Cleanup timer callback plugin's overwriting of modules it imported 9 years ago
Eric Johnson dfad7c64fb Allow PATCH to list of valid HTTP methods 9 years ago
Brian Coca 8d3da20302 fixed bsd service_mgr_facts using removed check_init fucntion 9 years ago
Yannig Perré 30f827d92d Fix python3 test. 9 years ago
Abhijit Menon-Sen 7caefa5cd9 Fix typo 9 years ago
Toshio Kuratomi a7d1a39b81 Update core submodule ref 9 years ago
Toshio Kuratomi 2df0022a3e Update submodule refs 9 years ago
Brian Coca eb04650ffb Merge pull request #12162 from bcoca/service_mgr_facts
fact gathering service_mgr info
9 years ago
Brian Coca a1a5dadef6 remove uneeded module 9 years ago
Yannig Perré 130139dc80 Fix unicode issue introduced by previous commit. 9 years ago
Toshio Kuratomi 3219744d32 One more stdlib import in module_utils 9 years ago
Brian Coca d194e2c788 check_systemd is not inline but a private fact function now 9 years ago
Brian Coca e9efd008ed moved distutils import to mac, darn solaris would complain in certain cases 9 years ago
Brian Coca 99d775a0c1 fact gathering service_mgr info
also added dragonfly facts support
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 1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
9 years ago
Toshio Kuratomi 107d025d8a Update extras submodule ref for doc fixes 9 years ago
Toshio Kuratomi 99561e88d4 Update submodule refs 9 years ago
Brian Coca 79bf66336b switched clean_data from hardcoded delimiters to actual currently set jinja2 environment delimiters 9 years ago
Yannig Perré 805f768dab Clear cache when updating template variables. 9 years ago
Brian Coca 467c29e3db show task path on 2 vs 9 years ago
Yannig Perré 87a9485b2f Cache for _do_template call. May result in nice speed improvement (4-5 times faster). 9 years ago
Rene Moser c09a34bb10 cloudstack: clean up unneeded ";" 9 years ago
Brian Coca f528ad1848 added xbps pkg mgr to facts 9 years ago
Brian Coca 13bf62d0e6 remove deprecation for :, add ; functionality (its deprecated but it should work) 9 years ago
Brian Coca d341ba14a5 fixed rekey password handling 9 years ago
Brian Coca 00bc74404a vault noe preserves permissions on edit and rekey and sets a restricitve default umask for all other cases 9 years ago
Brian Coca 7368030651 removed action plugin as service facts and separate modules don't work yet and this forces gathering facts 9 years ago
Brian Coca f5b095f6c8 properly sanitize registered vars 9 years ago
Brian Coca b6c92dacb5 removed key striping as they are read up the chain 9 years ago
Brian Coca 57d3245d0d remove commented out prints 9 years ago
Brian Coca 7ba4f5ee12 removed no_log redundant code 9 years ago
Brian Coca b97887ba41 simplified invocation removal, added no_log awareness 9 years ago
James Cammarata c61499168e Merge pull request #12962 from bcoca/pull_fixes
fixes options for ansible pull
9 years ago
James Cammarata 56e5e72aaa Make handlers obey run_once (or BYPASS_HOST_LOOP)
Fixes #12972
9 years ago
James Cammarata a5bd92ca4b Merge branch 'devel_fix_debug_var' of https://github.com/Yannig/ansible into Yannig-devel_fix_debug_var 9 years ago
Brian Coca 237f8c9df7 removed debug print 9 years ago
James Cammarata 479cbfc63c Don't immediately fail on PlayContext setup
As we may end up skipping the task due to conditionals.

Fixes #12774
9 years ago
Brian Coca 9f148fc046 removed requirement of destination and set documented default 9 years ago
Brian Coca 40d22be2ef fixes options for ansible pull
* remove requirement for host patterns, use the defaults
 * require destination directory (None in cwd is not a good default)
 * fixed usage messages
 * updated default inventory to use , and not deprecated :
9 years ago
Brian Coca b73941b95f updated submodule refs 9 years ago
Toshio Kuratomi 508bffef02 Update extras submodule ref 9 years ago
Brian Coca b8bc15fe02 switched to backticks to allow for non bourne shells to work 9 years ago
Yannig Perré 1febf7cb88 Fix for issue #12952: this code interfere with debug+var and seems to be unnecessary. 9 years ago
James Cammarata 5d92b00d9c Cleanup some include logic
* Properly mark hosts with failures in includes as failed
* Don't send callbacks until we're sure we're done, and also fix how
  we increment stats so failures don't show up as ok's
* Fix a bug in the include file logic where a failed include could lead
  to an infinite loop in the task iteration logic

Fixes #12933
9 years ago
Toshio Kuratomi 56b310b18d Update submodule refs 9 years ago
James Cammarata 299054852a Allow tags to be specified in included file params
Fixes #12940
9 years ago
Brian Coca b2fc5142eb moved sudo -S and -n into configurable flags as they might be absent in much older systems
if password is supplied exsiting -n would get remove from flags
9 years ago
Toshio Kuratomi e3e2db1119 Improve the warning message about duplicate yaml dict keys 9 years ago
James Cammarata 87269599a0 Also consider the full role name when searching for --start-at-task 9 years ago
Toshio Kuratomi acbea65b1d Update core submodule ref to fix doc build 9 years ago
Toshio Kuratomi 2c5da0923a Update submodule refs 9 years ago
Toshio Kuratomi 7334389de6 Merge pull request #12930 from ansible/dict-key-overwrite-warning
Break apart a looped dependency to show a warning when parsing playbooks
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 3fc2209ca0 Fixing retry/until logic and default value for retries
Fixes #12928
Fixes #12929
9 years ago
James Cammarata 57fe0d6aed Merge pull request #12911 from bcoca/manpage_fixes
Manpage fixes
9 years ago
James Cammarata 1dc23ea779 Merge pull request #12866 from bcoca/more_inheritence
More inheritence
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
James Cammarata 2825c188bd Merge pull request #12901 from bcoca/sanitize_results
sanatize results
9 years ago
Jason O'Donnell 9dfa3719be Fixing typo 9 years ago
Jason O'Donnell ac9b35cc2b Found another typo 9 years ago
Jason O'Donnell 80433c2a2d Fxing typo 9 years ago
Toshio Kuratomi de54f26376 Update submodule refs 9 years ago
Brian Coca c271c0eb04 added setting of ansible_ssh_user to current user as backwards compatibilty issue 9 years ago
Brian Coca 4486e136ea Merge pull request #12899 from bcoca/vault_fixes
simplified vault password functions
9 years ago
Brian Coca 5b33b0ddfd Merge pull request #12896 from bcoca/ssh_current_user_config
don't set user to current user
9 years ago
James Cammarata 677a2f95e5 Make sure Base attributes are copied cleanly
Fixes #12882
9 years ago
Toshio Kuratomi 8f77dd1cf2 Update submodule refs 9 years ago
Brian Coca f3a0adcfa5 added info about using -i 'hostname,' to usage/help 9 years ago
Brian Coca 7ebfe72015 added missing string_types 9 years ago
Brian Coca 8ce864db6f sanatize results 9 years ago
Brian Coca 368f4448dc simplified vault password functions
also fixes #12864
9 years ago
Toshio Kuratomi 92dd563a75 Fix invocation from bad merge and note where it would need to go to keep
it out of registered vars as well.
9 years ago
Brian Coca f78c82b9ee don't set user to current user
also remove condition to bypass setting user if user matches current user
this enables forcing user when set to the same user as current user and ignoring .ssh/config
while keeping .ssh/config with current user if nothing is specified.
9 years ago
Brian Coca 25e3fe04a8 finalized changed to use abridtged_result instead of result
removed no longer defined no_log
9 years ago
Toshio Kuratomi b109b83809 Update submodule refs 9 years ago
Toshio Kuratomi ca32d5bacc Potential fix for #12816 9 years ago
James Cammarata 3eea4e23d5 Manually add plugin directories when running the adhoc command
Fixes #12891
9 years ago
Toshio Kuratomi 3812ec8d1d Implement invocation hiding for all callbacks if the verbosity is low 9 years ago
Brian Coca 275764d4a5 avoid showing invokation when no_log is set or verbosity is low 9 years ago
James Cammarata 63ea614b4c Version bump for 2.0.0-0.4.beta2 9 years ago
Toshio Kuratomi 99c6f77e59 Fix callback 9 years ago
Jens Peter Schroer ecae636160 allowing json in lookup template calls 9 years ago
James Cammarata 4fd4f3374a Merge pull request #12879 from larsks/bug/12876
allow include: directive to work during exception processing
9 years ago
Lars Kellogg-Stedman 914f68f9af allow include: directive to work during exception processing
prior to this commit, an attempt to use the `include:` directive would
fail in a `rescue:` or `always:` block if there were failures in the
main block task list.

Resolves #12876.
9 years ago
Toshio Kuratomi ce2b18174e Merge pull request #12878 from ansible/invocation-fix
Invocation fix
9 years ago
Toshio Kuratomi 2e87c1f74e Two fixes to action plugins
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
  module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
  value from the base class run() method into account so that invocation
  makes its way to the output.

Fixes #12869
9 years ago
Brian Coca 5017a96948 Revert "make callbacks declare needing whitelisting"
another premature merge
This reverts commit df8ff85787.
9 years ago
James Cammarata 86de1429e5 Cleaning up FIXMEs 9 years ago
Toshio Kuratomi 1e50d31cdc Update submodule refs 9 years ago
Brian Coca df8ff85787 make callbacks declare needing whitelisting
this will allow for custom or v1 callbacks locally loaded to automatically be triggered as they were in 1.x
9 years ago
Toshio Kuratomi 75cff7129c Fix for invocation not being added to output.
We want invocation to be omitted when we are running async, not when we
aren't running async.
9 years ago
Toshio Kuratomi 6b6d03290a Restore the automatic addition of invocation to the output
Revert "Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data."

This reverts commit 6ce6b20268.

Remove the note that invocation was removed as we've now restored it.

Revert "keyword not in ubuntu 14.04"

This reverts commit 5c01622457.

Revert "remove invocation keyword check"

This reverts commit 5177cb3f74.
9 years ago
James Cammarata 498c27d09a Re-adding role_names magic variable
Fixes #12863
9 years ago
Brian Coca c267c23020 make callbacks declare needing whitelisting
this will allow for custom or v1 callbacks locally loaded to automatically be triggered as they were in 1.x
9 years ago
Brian Coca 54e821ca94 added deprecation warning to comma separated role spec 9 years ago
Brian Coca 09899b7c43 Merge pull request #12783 from larsks/bug/12782
correct value of remote_user for local connections
9 years ago
Brian Coca 9886829e40 Merge pull request #12861 from willthames/galaxy_spec_in_meta_main_fix
Allow meta/main.yml to include roles through spec file
9 years ago
Brian Coca d861e7dd5d moved several directives so they are not settable at play, block, role and task levels 9 years ago
Brian Coca fc3a44485b skip errors on conditional if task is include
fixes #12843
9 years ago
Will Thames 002972c6cf Allow meta/main.yml to include roles through spec file
ansible-playbook now works when run with a playbook
that includes a role that includes another role
specified using csv format

Updated one of the roles used in the tests to fix
broken tests - `make test_galaxy` now works

Fixes #11486. Also addresses the problem alluded to in #10620.
9 years ago
Brian Coca 08c9e70307 made display part of variable manager and corrected reference to it
fixes #12859
9 years ago
James Cammarata 2b3c5aa41e Support cmd param in Tasks by assigning it to _raw_params
Fixes #12856
9 years ago
James Cammarata 0e447e3f41 Merge branch 'devel' of https://github.com/mathieumd/ansible into mathieumd-devel 9 years ago
James Cammarata 4b20884719 Return correct changed flag when using check mode with template and force=no
Fixes #12844
9 years ago
Brian Coca 04aa7701d1 fix prompt, static methods don't get 'self'
fixes #12833
9 years ago
Toshio Kuratomi 42ce3de8d0 Merge pull request #12853 from ansible/winrm-return-bytes
In v2, exec_command should return bytes and the caller will take responsibility for converting to unicode
9 years ago
Toshio Kuratomi 3d57a202b5 And another fix for docs 9 years ago
Toshio Kuratomi 9dc9a606f6 Correct docs build 9 years ago
Toshio Kuratomi 632d356d22 Update submodule refs 9 years ago
Toshio Kuratomi 6e5055e786 Update the use of no_log values to cover everything that heuristic_log_sanitize does.
Fixes #12792
9 years ago
James Cammarata ec56b29ba4 Fix setting of interpreter values for delegated hosts
Fixes #12772
9 years ago
Toshio Kuratomi c845181dc1 In v2, exec_command should return bytes and the caller will take responsibility for converting to unicode 9 years ago
gduke 744679601f Remove mutable default arguments. 9 years ago
Toshio Kuratomi 10e2fc6f60 Update submodule ref 9 years ago
Toshio Kuratomi 1126ce34e3 Merge pull request #12846 from ansible/nolog-for-return-value
Hide values in json returns which were given in parameters marked no_log.
9 years ago
Toshio Kuratomi c2d188baff Hide values in json returns which were given in parameters marked no_log. 9 years ago
James Cammarata 3ddda2f460 Merge pull request #12842 from mcsalgado/include_with_items
Revert back to copying self._task.args
9 years ago
Brian Coca 1ecad5aed2 now galaxy correctly detects empty requirements file
also allow for 'scm' and 'src' not to be populated in requirements entries
9 years ago
Victor Salgado c5c5f3bf7a Revert back to copying self._task.args 9 years ago
Victor Salgado 0e671baa33 Fix typo 9 years ago
James Cammarata b46ce47a84 Don't use local transport for delegated hosts if the inventory_hostname isn't local
For some situations like Vagrant, the remote_addr may be a localhost addr, but ssh
is still desired. This corrects the assumption that any localhost remote_addr should
be using the local connection by checking the inventory_hostname value as well.

Fixes #12817
9 years ago
Toshio Kuratomi 99e7bb35c1 Simplify UnsafeProxy as we don't need to use it for byte strings, only text 9 years ago
James Cammarata 3c87c44af5 Fixing bug in includes caused by 892d9b8
Fixes #12837
9 years ago
Toshio Kuratomi 31ebafcbdd Update submodule refs 9 years ago
Toshio Kuratomi f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 9 years ago
Brian Coca de3ca57a33 avoid relative shlex import
fixes #12777
9 years ago
James Cammarata e5b6d802bf Removing some cruft related to _local_action value on Task, which was removed
Fixes #12819
9 years ago
Mathieu 260a3e5ce7 Fixes #11055 - Set locale via LC_ALL 9 years ago
Toshio Kuratomi 923fc9fb15 Cleanup pyflakes warning (real error) 9 years ago
Toshio Kuratomi 7aa9f6754a Cleanup more pyflakes warnings (2 real problems) 9 years ago
James Cammarata 1fa975d81a Simplify group_by by removing BYPASS_HOST_LOOP from the action
Fixes #12825
9 years ago
Toshio Kuratomi 0888d78b84 Cleanup some pyflakes warning (1 real error) 9 years ago
Toshio Kuratomi c6d44738ad Clean up some more pyflakes warnings 9 years ago
Toshio Kuratomi 3da8bab3ff Cleanup pyflakes warning (real error) 9 years ago
Toshio Kuratomi a526eae543 Clean up a few more pyflakes warnings 9 years ago
Toshio Kuratomi a17ae6f07e Clean up pyflakes warnings in inventory 9 years ago
James Cammarata 892d9b8dfb Move post_validate for tasks after checking for an include
Simplifies logic and prevents us from accidentally post_validating
an include that would otherwise be skipped due to tags causing a
problem because of potentially missing variables.

Fixes #12793
9 years ago
James Cammarata 1cfd941179 Adding a v2 callback for task includes 9 years ago
Toshio Kuratomi dc33d30c6d Update submodule refs 9 years ago
Toshio Kuratomi b67e51ea06 Information on when to use to_str() and what a native string is 9 years ago
Toshio Kuratomi 39d9bc3564 Update submodule refs 9 years ago
Toshio Kuratomi 6ce6b20268 Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data. 9 years ago
Brian Coca 1280e2296c changed warning to debug and expanded info on what is really happening, it was a bit misleading 9 years ago
Brian Coca 2d1d21228a updated skippy to match default output 9 years ago
James Cammarata 0bbe9d5bd0 Make hostvars json/yaml serializable in filters
Fixes #12615
9 years ago
James Cammarata a88c59f451 Reset basedir for plays that are not from a PlaybookInclude
Fixes #12524 (again)
9 years ago
James Cammarata 0aa018337a Fixing logic in json cache plugin get()
Fixes #12722
9 years ago
James Cammarata 5f617c601b Remove obsolute tag evaluation in free strategy
Fixes #12784
9 years ago
Brian Coca 6c8cf8acb7 now profile_tasks callback handles handlers correctly
fixes #12762
9 years ago
James Cammarata 1ab0e0e228 Disable RuntimeWarnings during all() plugin loading
Fixes #12778
9 years ago
Brian Coca 71ffb86c30 don't let cowsay issues stop execution
fixes #12773
9 years ago
Brian Coca 6d87bd405d Merge pull request #12765 from bcoca/lookup_inventory_hostname
implemented inventory_hostname lookup in v2
9 years ago
Toshio Kuratomi a567f28657 Update submodules for docs fixes# Please enter the commit message for your changes. Lines starting 9 years ago
Toshio Kuratomi 5d8ab9b01b Update module refs 9 years ago
Toshio Kuratomi b23a083776 Make vault use a mapping of cipher name to classes instead of formatting the name for safety. 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
Lars Kellogg-Stedman aa0b7536c9 correct value of remote_user for local connections
When using 'local' connections, privilege escalation would fail if
ansible_ssh_user was in the current context to the same value as
become_user.

This commit ensures that for 'local' connections we reset remote_user to
the local username.

This fixes #12782.
9 years ago
Toshio Kuratomi 28c933ce5e properly fail_json when we don't have ssl on a non-redhat distro 9 years ago
Marius Gedminas 98958ec990 Simplify join expression 9 years ago
Marius Gedminas 56184a3d8c Python 3: avoid %-formatting of byte strings
This is needed for Python 3.4 compatibility; Python 3.5 can use
`b'%s\n' bytestring` again.
9 years ago
Brian Coca 9b088a1e40 implemented inventory_hostname lookup in v2 9 years ago
Brian Coca aee6de5a76 group_names should not include implied 'all', fixes #12763 9 years ago
James Cammarata dce58a78c9 Make random cowsay truly random
Also adds a cowsay whitelist config option, because there are some
truly NSFW stencils that come with cowsay by default.
9 years ago
Marius Gedminas 4fb6f62f1b Fix Unexpected Exception: global name 'os' is not defined
I inadvertently introduced it in
ca826508d9 and didn't notice, because
there are no unit tests for playbook_executor.py.  Sorry!

(The "from ansible.errors import *" was used *only* to get the 'os'
module, which makes go "what?")
9 years ago
Marius Gedminas ab569cea22 Move to_str alias into ansible.utils.unicode
@abadger suggested on IRC that it's useful enough to go into
ansible.utils.unicode.
9 years ago
Marius Gedminas ca826508d9 Python 3: fix AnsibleError formatting
If you convert the error string to bytes and embed it inside another
error string, you get

  Prefix:

  b'Embedded\nerror\nstring'

which is not what we want.

But we also don't want Unicode in error messages causing unexpected
UnicodeEncodeErrors when on Python 2.

So let's convert the error message into the native string type (bytes on
Python 2, unicode on Python 3).
9 years ago
Toshio Kuratomi 5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
9 years ago
Toshio Kuratomi 85abd61001 Add some more info to docstring 9 years ago
James Cammarata d923d05a33 Reworking the way all() works in plugin_loader
* Don't throw away the full path of the module code being loaded,
  as this can cause conflicts when files of the same name are being
  instantiated
* Generalize the module loading code

Fixes #12738
9 years ago
James Cammarata 45b803efb4 Properly use test_loader from SharedPluginLoaderObj 9 years ago
Toshio Kuratomi c8ad55103e Update extras modules ref to fix docs 9 years ago
Toshio Kuratomi e00eeba9c3 Update submodule refs 9 years ago
James Cammarata 91b0b4d40c Check is_directory() before not is_file() in inventory basedir
Fixes #12742
9 years ago
Brian Coca c57200925f made syslog import optional as intel's edison custom compiles python w/o it 9 years ago