Commit Graph

565 Commits (1e50d31cdc08222085d058c5c9cd12cb0a5031d6)

Author SHA1 Message Date
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
2015-10-22 12:30:23 -04:00
Brian Coca 09899b7c43 Merge pull request #12783 from larsks/bug/12782
correct value of remote_user for local connections
2015-10-22 08:10:07 -04:00
James Cammarata 0e447e3f41 Merge branch 'devel' of https://github.com/mathieumd/ansible into mathieumd-devel 2015-10-21 13:59:51 -04:00
James Cammarata 4b20884719 Return correct changed flag when using check mode with template and force=no
Fixes #12844
2015-10-21 13:51:39 -04:00
Toshio Kuratomi c845181dc1 In v2, exec_command should return bytes and the caller will take responsibility for converting to unicode 2015-10-21 07:59:46 -07:00
Toshio Kuratomi f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 2015-10-19 18:36:19 -07:00
James Cammarata e5b6d802bf Removing some cruft related to _local_action value on Task, which was removed
Fixes #12819
2015-10-19 16:52:27 -04:00
Toshio Kuratomi 923fc9fb15 Cleanup pyflakes warning (real error) 2015-10-19 12:01:01 -07:00
Toshio Kuratomi 7aa9f6754a Cleanup more pyflakes warnings (2 real problems) 2015-10-19 12:01:01 -07:00
James Cammarata 1fa975d81a Simplify group_by by removing BYPASS_HOST_LOOP from the action
Fixes #12825
2015-10-19 14:57:07 -04:00
Toshio Kuratomi 0888d78b84 Cleanup some pyflakes warning (1 real error) 2015-10-19 11:42:46 -07:00
Toshio Kuratomi c6d44738ad Clean up some more pyflakes warnings 2015-10-19 11:35:10 -07:00
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
2015-10-19 13:42:17 -04:00
James Cammarata 1cfd941179 Adding a v2 callback for task includes 2015-10-19 13:42:17 -04:00
Toshio Kuratomi 6ce6b20268 Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data. 2015-10-19 09:08:25 -07:00
Brian Coca 2d1d21228a updated skippy to match default output 2015-10-18 11:00:50 -04:00
James Cammarata 0bbe9d5bd0 Make hostvars json/yaml serializable in filters
Fixes #12615
2015-10-18 10:09:05 -04:00
James Cammarata 0aa018337a Fixing logic in json cache plugin get()
Fixes #12722
2015-10-17 11:50:14 -04:00
James Cammarata 5f617c601b Remove obsolute tag evaluation in free strategy
Fixes #12784
2015-10-17 11:29:39 -04:00
Brian Coca 6c8cf8acb7 now profile_tasks callback handles handlers correctly
fixes #12762
2015-10-16 18:01:27 -04:00
James Cammarata 1ab0e0e228 Disable RuntimeWarnings during all() plugin loading
Fixes #12778
2015-10-16 15:34:49 -04:00
Brian Coca 6d87bd405d Merge pull request #12765 from bcoca/lookup_inventory_hostname
implemented inventory_hostname lookup in v2
2015-10-16 15:05:23 -04:00
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. 2015-10-16 08:21:28 -07:00
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.
2015-10-16 11:17:58 -04:00
Brian Coca 9b088a1e40 implemented inventory_hostname lookup in v2 2015-10-15 13:11:42 -04:00
Toshio Kuratomi 5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
2015-10-14 18:57:10 -07:00
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
2015-10-14 17:53:28 -04:00
James Cammarata 45b803efb4 Properly use test_loader from SharedPluginLoaderObj 2015-10-14 17:53:28 -04:00
Brian Coca f5227d494b added missing cachefile and changed str(e) to to_bytes(e) 2015-10-13 11:15:10 -04:00
James Cammarata 426187489f Add variable for format parameter 2015-10-13 02:33:18 -04:00
Toshio Kuratomi 8277747a04 Fix password lookup when password file exists and the password is not encrypted 2015-10-12 15:52:03 -07:00
Toshio Kuratomi b49e0995cb Fix typo 2015-10-12 13:29:04 -07:00
Toshio Kuratomi b58d7470d4 Cleanup logic and be more paranoid about passwords with spaces 2015-10-12 12:55:33 -07:00
James Cammarata 5c5806d669 Fixing bugs related to jfonfile cache plugin
* corrupt/invalid file causes tracebacks
* incorrect initialization of display/_display in BaseCacheModule class
* tweaking the way errors in get() on jsonfile caches work, to raise
  a proper AnsibleError in that situation so the playbook/task is stopped

Fixes #12708
2015-10-12 13:06:41 -04:00
Brian Coca f5f3bf06e4 Merge pull request #12550 from redrampage/remove-pw-salt-deletion
Removed deletion of salt by 'password' lookup
2015-10-12 11:33:19 -04:00
Toshio Kuratomi 45a161b0a1 Merge pull request #12429 from edmstudio/devel
Update synchronize module plugin to work on OS X
2015-10-09 16:05:46 -07:00
Petr Mifek 6e035a3e94 Move nested function test for ipv6 to top level in synchronize module. 2015-10-10 00:01:22 +02:00
Brian Coca 45788fbfad <homer>doh!</homer> 2015-10-09 16:58:01 -04:00
Brian Coca b9d54e9a01 corrects previous fix to deal with missing item key in results dict 2015-10-09 13:01:32 -04:00
Brian Coca bcb173996b Merge pull request #12695 from matburt/fix_cache_plugins_for_v2
Fix an issue where cache plugins weren't updated in certain scenarios
2015-10-09 11:39:58 -04:00
Brian Coca fbf4cafab5 on skipped you 'might' not have an item, changed to getattr to avoid keyerror
fixes #12683
2015-10-09 11:28:11 -04:00
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.
2015-10-09 11:16:41 -04:00
Brian Coca ec02b255c3 Merge pull request #12689 from soarpenguin/bugfix
Remove some warning of undefined name and fix classmethod syntax error.
2015-10-09 11:09:50 -04:00
James Cammarata 770032648a Show -> localhost for local_action tasks 2015-10-09 10:53:53 -04:00
James Cammarata 868819f9fa Make sure shlex split is returning properly encoded strings
Fixes #12676
2015-10-09 09:49:27 -04:00
soarpenguin 5efa4d29e3 fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
James Cammarata 59d655c543 Double echo temp directory name to handle spaces and ~ expansion both
Fixes #12667
2015-10-08 16:22:38 -04:00
Brian Coca dac3684fd1 changed task color to dark gray to keep it from being confused with ignore/skip 2015-10-07 12:12:35 -04:00
Juraci e52950a939 Displaying task_path on task start when verbosity is more than 3 2015-10-07 10:11:50 -03:00
James Cammarata 9e364c2eb5 Don't modify results in callbacks
Fixes #12654
2015-10-06 21:43:43 -04:00