Commit graph

20897 commits

Author SHA1 Message Date
Brian Coca
dde882c91f updated pbrun test to match expected output
(cherry picked from commit 04b86df815)
2016-10-17 14:43:02 -04:00
Andrew Gaffney
7ee14f466e Fix search path for relative paths in roles (fixes #17877)
(cherry picked from commit 72f0aaf606)
(cherry picked from commit ef3fa115d3ba319b7f6a7a86a85655d9cf766120)
2016-10-17 11:20:44 -04:00
Brian Coca
9a9f767857 fixes to ansible_search_path
now gets basedir (no need to frontload as dwim already does that)
added comment about basedir to search_path usage to avoid dupes

(cherry picked from commit b14bce867d645af716641a8bf674fa9eba9ddb98)
2016-10-17 11:20:44 -04:00
Brian Coca
d4b8178b4b avoid errors when dynamic role
(cherry picked from commit 6f2936e57b268e9f8a2ed5c23c6af49888f869ae)
2016-10-17 11:20:44 -04:00
Toshio Kuratomi
141ed26e02 Update extras submodule ref to pull in password hiding fix for postgresql_lang and postgresql_ext 2016-10-17 08:12:19 -07:00
Toshio Kuratomi
5bf850568a Update submodule refs 2016-10-16 22:47:47 -07:00
Robin Roth
24d7555d0b Allow unicode inventory filename
Fixes #17932

(cherry picked from commit 3922328954)
2016-10-15 16:55:19 -07:00
Bill Nottingham
d3dd82f3cf Change <support@ansible.com> - it's being retired. 2016-10-15 16:48:22 -07:00
Toshio Kuratomi
e1101f78bd Fixes to handle non-ascii become passwords
Fixes for non-ascii passwords on
* both python2 and python3,
* local and paramiko_ssh (ssh tested working with these changes)
* sudo and su

Fixes #16557

(cherry picked from commit f24c10c32b)
2016-10-15 16:26:23 -07:00
Toshio Kuratomi
3d3ebbf98e Fix become password using non-ascii for local connection
Fixes #18029
2016-10-15 11:27:14 -07:00
Toshio Kuratomi
261013354f unarchive tests now pass on python3
(cherry picked from commit 91c1fdec3d)
2016-10-15 08:51:00 -07:00
James Cammarata
15f4b83564 Don't mark parent role complete for nested include_role calls
The PlayIterator was written without nested roles in mind, but since
include_role can nest them we need to check to see if we've moved into
a new role which is a child via nesting.

Fixes #18026

(cherry picked from commit 0d5206f90c)
2016-10-14 14:37:46 -05:00
Ryan S. Brown
747a5ef791 update extras submodule ref 2016-10-14 12:30:39 -04:00
Brian Coca
c1a34b5eff Better error for bad role def
(cherry picked from commit ff1e52184f)
2016-10-14 11:38:18 -04:00
James Cammarata
b8c25d8f70 Make sure free strategy is returning proper TQM constants
Fixes #18023

(cherry picked from commit 6bdcb3a392)
2016-10-14 09:24:01 -05:00
James Tanner
05dfed7575 Update submodule refs 2016-10-13 19:34:22 -04:00
Brian Coca
b6e317c045 toggle missing handler errors/warnings via config
(cherry picked from commit b169a61c20)
2016-10-13 16:56:31 -04:00
Peter Sprygada
a94db01b89 fixes issue when checking if sessions are supported (#18013)
the supports_sessions() call was sending the command as a string instead
of a list which is required when transport is eapi.  This fixes that bug
(cherry picked from commit 936bca9fc6)
2016-10-13 15:47:58 -04:00
Peter Sprygada
6d909bd65c adds additional exception handling in open() (#18003)
The open() method will now catch a socket.timeout exception and raise
a ShellError.
(cherry picked from commit b1666020a9)
2016-10-13 15:14:04 -04:00
Peter Sprygada
ab3d4731a3 minor fix for checking kwargs in get_config() (#18002)
The get_config() method was checking for a nonexistent kwarg that would
cause an exception.  This fixes that problem.
(cherry picked from commit bce31a11c2)
2016-10-13 15:13:55 -04:00
Brian J. Dowling
ed9d0cdf4a Quick ansible-doc fix -- don't run pager if there was an error (no text)
(cherry picked from commit 2be2f35373)
2016-10-13 15:10:55 -04:00
Brian Coca
cb8c28870c always log unexpected exceptions
(cherry picked from commit 18d3e0533f)
2016-10-13 13:34:11 -04:00
Brian Coca
2accc28d14 restored 'results' filters
tests do not work the same, restoring old filters to keep backwards compat
tests now only implment the new normalized 'tense'

(cherry picked from commit cdb5a222c5)
2016-10-13 13:27:44 -04:00
Nathaniel Case
d8155cc4fa Update submodule refs 2016-10-13 13:09:32 -04:00
Peter Sprygada
edff94f96d adds log message for successful connection and disconnection (#17993)
The network module will now log a message when it connects to a remote host
successfully and specify the transport used.  It will also log a message
when the module discconnect() method is called.
(cherry picked from commit 65ea24f4bb)
2016-10-12 21:48:59 -04:00
Peter Sprygada
1acd258931 fixes issue in eos shared module for earlier versions of EOS (#17980)
Earlier versions of EOS that do not support config sessions would
create an exception.  This fix will now check if the device supports
sessions and if it doesn't, it will fall back to not using sessions
(cherry picked from commit 3badb212fb)
2016-10-12 20:17:13 -04:00
Toshio Kuratomi
7034a34ce4 Update submodule refs 2016-10-12 15:18:04 -07:00
Toshio Kuratomi
4cd32ee1ac Only dispkay failure to use cryptography at a higher verbosity
Fixes #17982

(cherry picked from commit bf3d546d9a)
2016-10-12 10:49:13 -07:00
stephane
9f4a656929 Correct delegated_host_name check
In fb50698da3 a check for delegated_host_name being defined was added. Make this
check safer as it breaks some playbooks.

(cherry picked from commit a32e48555d)
2016-10-11 11:17:32 -07:00
Bruno Rocha
3db274ac21 Fix unbound method call for JSONEncoder (#17970)
* Fix unbound method call for JSONEncoder

The way it is currently it will lead to unbound method error

```python
In [1]: import json

In [2]: json.JSONEncoder.default('object_here')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-872fdacfda50> in <module>()
----> 1 json.JSONEncoder.default('object_here')

TypeError: unbound method default() must be called with JSONEncoder instance as first argument (got str instance instead)

```

But what is really wanted is to let the json module to raise the "is not serializable error" which demands a bounded instance of `JSONEncoder()`

```python
In [3]: json.JSONEncoder().default('object_here')
---------------------------------------------------------------------------
TypeError: 'object_here' is not JSON serializable

```

BTW: I think it would try to call `.to_json` of object before raising as it is a common pattern.

* Calling JSONEncoder bounded `default` method using super()

(cherry picked from commit b06fb2022c)
2016-10-11 08:33:02 -07:00
Ryan S. Brown
3a822faeae Update extras submodule reference 2016-10-07 16:42:46 -04:00
Pavlo Shchelokovskyy
3c9966d6fc Make interprocess polling interval configurable (#16560)
As recently there was back-and-forth with this hardcoded value
(0.001 -> 0.01 -> 0.005), obviousely the optimal value for it depends on
Ansible usage scanario and is better to be configurable.

This patch adds a new config option in DEFAULT section,
`internal_poll_interval`, with default of 0.001 corresponding to the
value hardcoded in Ansible v2.1.
This config option is then used instead of hardcoded values where
needed.

Related GH issue: 14219
(cherry picked from commit aa1ec8af17)
2016-10-06 14:33:09 -05:00
Toshio Kuratomi
2a7f728fdf Remove archive from the 2.2 will be working to get it updated for 2.3 2016-10-06 11:23:19 -07:00
Toshio Kuratomi
aafa7ab471 Update submodule refs 2016-10-06 11:01:16 -07:00
Toshio Kuratomi
f59430aba8 Add a whitelist for checking for six. Use it for digital_ocean.py
(cherry picked from commit 6a61b6d431)
2016-10-06 11:00:26 -07:00
Strahinja Kustudic
448cac16db Moves 'statically included' messages to -vv verbosity (#17918)
(cherry picked from commit 9962245b92)
2016-10-06 08:55:54 -05:00
James Cammarata
ede5eb78ab Sleep briefly while waiting for pending results to reduce CPU churn
(cherry picked from commit e26bce5221)
2016-10-06 08:50:50 -05:00
Peter Sprygada
7063ed8ceb adds new option to get_config to grab config with passwords (#17915)
In order for the config to be returned with vpn passwords, the get_config()
method now supports a keyword arg include=passwords to return the desired
configuration.  This replaces the show_command argument
(cherry picked from commit 087fb4265f)
2016-10-05 22:12:03 -04:00
Nathaniel Case
be6396d5e9 Update submodule refs 2016-10-05 12:21:14 -04:00
James Cammarata
e4efe0b2f1 Move searching for roles in the cur basedir to last
Searching the DEFAULT_ROLES_PATH and the roles basedir should come
before this, and it has been a long standing oversight.

Fixes #17882

(cherry picked from commit 0a86ddc251)
2016-10-05 01:25:48 -05:00
Brian Coca
dea2cabe94 fixed storing of cwd
(cherry picked from commit d9d7e413a5)
2016-10-04 14:25:52 -04:00
Toshio Kuratomi
08b646684b Make ini parsing slightly more robust
Prior to this commit, the ini parser would fail if the inventory was
not 100% utf-8.  This commit makes this slightly more robust by
omitting full line comments from that requirement.

Fixes #17593

(cherry picked from commit 23305540b4)
2016-10-04 11:25:45 -07:00
Brian Coca
255b9364ab better inventory error messages
(cherry picked from commit 74b7590211)
2016-10-04 07:24:12 -07:00
Adrian Likins
9596b9218c Specify run_command decode error style as arg (#17886)
* Specify run_command decode error style as arg

Instead of getting the stdout/stderr text from
run_command, and then decoding to utf-8 with a
particular error scheme, use the 'errors' arg
to run_command so it does that itself.

* Use 'surrogate_or_replace' instead of 'replace'

For the text decoding error scheme in run_command calls.

* Let the local_facts run_command use default errors

* fix typo

(cherry picked from commit d0bdfc2abb)
2016-10-04 06:25:01 -07:00
John R Barker
66ebe7a461 asa_template wasn't ever officially released
asa_template was added during 2.2 development, and removed before 2.2 hit RC1 so no need to give notice of deprecation.
2016-10-04 14:07:55 +01:00
James Cammarata
6a76d7fbef Check for substates in is_failed before checking main state failure
Fixes #17882

(cherry picked from commit d09f57fb3a)
2016-10-04 01:43:27 -05:00
Toshio Kuratomi
b878c47d5e Fix for run_command tests now that it returns native strings
(cherry picked from commit 08a58ae025)
2016-10-03 18:46:55 -07:00
Toshio Kuratomi
f7d3ed6eb3 Update submodule refs 2016-10-03 18:46:36 -07:00
Toshio Kuratomi
8456686f4b Make run_command return native strings
This changes the return value on python3   Return value on python2 was
already byte strings (which is the native str type there.)

(cherry picked from commit ddd20627a4)
2016-10-03 18:46:36 -07:00
Brian Coca
fb4c0a085f no need for warnings in first_found
(cherry picked from commit 125a8d3c65)
2016-10-03 20:23:41 -04:00