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?")
2015-10-15 10:41:00 +03:00
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.
2015-10-15 10:27:38 +03:00
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).
2015-10-15 09:38:14 +03:00
Toshio Kuratomi
5617f6aad4
Update synchronize to use the correct host when delegating
...
Fixes #12752
2015-10-14 18:57:10 -07:00
Toshio Kuratomi
85abd61001
Add some more info to docstring
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
Toshio Kuratomi
c8ad55103e
Update extras modules ref to fix docs
2015-10-14 08:44:37 -07:00
Toshio Kuratomi
e00eeba9c3
Update submodule refs
2015-10-14 08:06:55 -07:00
James Cammarata
91b0b4d40c
Check is_directory() before not is_file() in inventory basedir
...
Fixes #12742
2015-10-14 11:03:10 -04:00
Brian Coca
c57200925f
made syslog import optional as intel's edison custom compiles python w/o it
2015-10-14 09:12:02 -04:00
James Cammarata
ee559e03f7
Merge pull request #12725 from mgedmin/py3k
...
Python 3: there's no basestring
2015-10-13 16:52:46 -04:00
James Cammarata
e6d3c6745f
Revert to using local file/dir tests in inventory instead of loader's
...
Fixes #12719
2015-10-13 12:04:01 -04:00
Brian Coca
c637d60a8d
fixed deprecation message
2015-10-13 11:40:21 -04:00
Brian Coca
f5227d494b
added missing cachefile and changed str(e) to to_bytes(e)
2015-10-13 11:15:10 -04:00
Marius Gedminas
9ba6c087d3
Python 3: there's no basestring
2015-10-13 09:56:12 +03:00
Marius Gedminas
f03da5be42
Python 3: there's no iteritems()
2015-10-13 09:47:16 +03:00
James Cammarata
2d77c643e4
Merge pull request #12723 from mgedmin/py3k
...
Make ansible.vars.unsafe_proxy Python 3 friendly
2015-10-13 02:45:55 -04:00
Marius Gedminas
e511d6d458
Make UnsafeProxy work on Python 3
...
Instead of str and unicode we have to deal with bytes and str.
2015-10-13 09:41:08 +03:00
Marius Gedminas
af6a316d9b
Remove unused import
...
Fixes ImportError: No module named '__builtin__' on Python 3.
2015-10-13 09:37:48 +03: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
James Cammarata
cd2cb178ae
Totally rework the way UnsafeProxy does things
2015-10-12 18:13:09 -04:00
Toshio Kuratomi
15d7f53846
AnsibleModules.log() fix for python3
...
Also add unittests for AnsibleModules.log()
Fixes #12586
2015-10-12 13:30:27 -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
Toshio Kuratomi
b441bcb678
Fix display when run through a testing framework that overrides stderr/stdout
2015-10-12 10:06:13 -07:00
James Cammarata
d15fcf05f0
Fix bug in the way temp vars were created for templating vars_files
...
Fixes #12711
2015-10-12 12:17:45 -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
James Cammarata
73661d1761
Merge branch 'devel' of https://github.com/ansible/ansible into devel
2015-10-12 11:30:03 -04:00
Charles Paul
3d533cb423
fixing calls to fail_json
2015-10-12 08:50:18 -05:00
Brian Coca
50372eecc9
Merge pull request #12455 from privateip/devel
...
added methods for retrieving vapp and vm
2015-10-12 09:37:47 -04:00
James Cammarata
82e76e42e5
Tweak to the way serial percentages are handled
2015-10-12 09:00:43 -04:00
James Cammarata
63e288354e
Fix bug in way omitted values were set
2015-10-12 09:00:27 -04:00
James Cammarata
4c85ae0712
Merge branch 'serial_should_be_string' of https://github.com/klshxsh/ansible into klshxsh-serial_should_be_string
2015-10-12 08:28:07 -04:00
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'
2015-10-12 12:41:00 +01:00
James Cammarata
eb60ce1b6e
Merge pull request #12703 from keitwb/inventory_file_var
...
Adding the inventory_file var back
2015-10-11 16:04:34 -04:00
James Cammarata
71a1a3c903
Submodule pointer update
2015-10-10 22:31:54 -04:00
Ben Keith
1f82971283
Adding the inventory_file var back
2015-10-10 21:54:28 -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
d24532757c
remove fix for local_action/connection local that is now not needed
2015-10-09 16:53:17 -04:00
klshxsh
4a5e52b2d2
The serial keyword can be specified as a percentage, e.g '30%' or a number e.g. '3'; therefore it needs to be a string to allow both types
2015-10-09 21:34:37 +01: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
abf2e13955
Revert "Track local_action internally to prevent it from being overridden"
...
This reverts commit 49ca0eb797
.
2015-10-09 13:01:32 -04:00
Brian Coca
101c8785ec
removed changes to make local action equate connection=local and brought it back to equate delegate_to=localhost
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