Commit Graph

5521 Commits (7334389de60c8cae6430de8560c47e2522fb0574)

Author SHA1 Message Date
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
James Cammarata ee559e03f7 Merge pull request #12725 from mgedmin/py3k
Python 3: there's no basestring
9 years ago
James Cammarata e6d3c6745f Revert to using local file/dir tests in inventory instead of loader's
Fixes #12719
9 years ago
Brian Coca c637d60a8d fixed deprecation message 9 years ago
Brian Coca f5227d494b added missing cachefile and changed str(e) to to_bytes(e) 9 years ago
Marius Gedminas 9ba6c087d3 Python 3: there's no basestring 9 years ago
Marius Gedminas f03da5be42 Python 3: there's no iteritems() 9 years ago
James Cammarata 2d77c643e4 Merge pull request #12723 from mgedmin/py3k
Make ansible.vars.unsafe_proxy Python 3 friendly
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 426187489f Add variable for format parameter 9 years ago
Toshio Kuratomi 8277747a04 Fix password lookup when password file exists and the password is not encrypted 9 years ago
James Cammarata cd2cb178ae Totally rework the way UnsafeProxy does things 9 years ago
Toshio Kuratomi 15d7f53846 AnsibleModules.log() fix for python3
Also add unittests for AnsibleModules.log()

Fixes #12586
9 years ago
Toshio Kuratomi b49e0995cb Fix typo 9 years ago
Toshio Kuratomi b58d7470d4 Cleanup logic and be more paranoid about passwords with spaces 9 years ago
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
9 years ago
Toshio Kuratomi b441bcb678 Fix display when run through a testing framework that overrides stderr/stdout 9 years ago
James Cammarata d15fcf05f0 Fix bug in the way temp vars were created for templating vars_files
Fixes #12711
9 years ago
Brian Coca f5f3bf06e4 Merge pull request #12550 from redrampage/remove-pw-salt-deletion
Removed deletion of salt by 'password' lookup
9 years ago
James Cammarata 73661d1761 Merge branch 'devel' of https://github.com/ansible/ansible into devel 9 years ago
Charles Paul 3d533cb423 fixing calls to fail_json 9 years ago
Brian Coca 50372eecc9 Merge pull request #12455 from privateip/devel
added methods for retrieving vapp and vm
9 years ago
James Cammarata 82e76e42e5 Tweak to the way serial percentages are handled 9 years ago
James Cammarata 63e288354e Fix bug in way omitted values were set 9 years ago
James Cammarata 4c85ae0712 Merge branch 'serial_should_be_string' of https://github.com/klshxsh/ansible into klshxsh-serial_should_be_string 9 years ago
klshxsh ac00c9ced7 changed 'string' to 'percent' for _serial
Note that this allows both integers (e.g. 3) and percentages (e.g. "30%")
Also changed default back to 0 rather than '0'
9 years ago
James Cammarata eb60ce1b6e Merge pull request #12703 from keitwb/inventory_file_var
Adding the inventory_file var back
9 years ago
James Cammarata 71a1a3c903 Submodule pointer update 9 years ago
Ben Keith 1f82971283 Adding the inventory_file var back 9 years ago