Commit graph

29786 commits

Author SHA1 Message Date
Eric Beahan
d94ac763b6 removing folded style formatting for synopsis (#22746)
(cherry picked from commit e539726543)
2017-05-12 12:02:07 -04:00
Toshio Kuratomi
40ea76cf5a Add bugfixes to changelog 2017-05-12 05:44:28 -07:00
Toshio Kuratomi
cdd6ab000b Fix template not showing a diff with a directory
Template can take a directory as the destination.  When that's the case,
we need to diff between the source and the file inside of the directory.
That happened when the directory was specified with a trailing slash but
not when it was specified on its own.  This change fixes that.

Fixes #24413

(cherry picked from commit 548cacdf6a)
2017-05-11 20:37:55 -07:00
Toshio Kuratomi
58438762a1 Fix import of shlex_quote
the backport here 1f3f4cf702 forgot that
in ansible-2.3, the six library in ansible.module_utils is only 1.4.
1.4 doesn't have shlex_quote.  Importing it from ansible.compat works
for ansible-2.3.
2017-05-11 17:30:11 -07:00
Toshio Kuratomi
41e3027fda Fix pam_limits writing text to a file opened in binary mode
Fixes #24392

(cherry picked from commit 16325f6f15)
2017-05-11 17:17:53 -07:00
Dylan Silva
6f92ca058a Downgrading module from core to community (#24463) (#24512) 2017-05-11 13:10:19 -07:00
Brian Coca
5a47644dc6 added bugfix to changelog 2017-05-11 15:48:19 -04:00
Brian Coca
1f3f4cf702 deal with null/none connections
fixes #23621
pushed 'connection resolution' to play_context
override fieldattribute getter

(cherry picked from commit c50cf22d52)
2017-05-11 15:47:09 -04:00
Matt Davis
5f0be9dcd0 slightly increase win_async_wrapper fire and forget sleeptime
* should fix Shippable timeouts when AWS CPU credits are low- right on the bubble of failure w/ 5s execution
(cherry picked from commit ead23783be)
2017-05-09 11:23:05 -07:00
James Cammarata
5a3f52d988 New release v2.3.1.0-0.1.rc1 2017-05-09 08:47:02 -05:00
John R Barker
15f635f7c3 Reference correct variable and key for role expiry (#23397) (#24405)
Previously, this module could throw the following error message:
    NameError: global name 'current_roles_attrs' is not defined

The referencing key should also match the name of the column, which is
rolvaliduntil, not rol_valid_until
(cherry picked from commit c5adf08c40)
2017-05-09 14:06:28 +01:00
John R Barker
b87ffb2082 Check if api_key and app_key before proceeding (#24336) (#24403)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

Fixes https://github.com/ansible/ansible/issues/24325

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e342b281d8)
2017-05-09 13:27:30 +01:00
Matt Davis
787303284f fix spurious warnings with ansible_winrm_kinit_X args (#24380)
* added to pywinrm arg whitelist
* clarified error text on kinit_mode error
* fixes #23822
(cherry picked from commit 98ff93b2db)
2017-05-08 11:31:03 -07:00
James Cammarata
a1886911fc Fixing security issue with lookup returns not tainting the jinja2 environment
CVE-2017-7481

Lookup returns wrap the result in unsafe, however when used through the
standard templar engine, this does not result in the jinja2 environment being
marked as unsafe as a whole. This means the lookup result looses the unsafe
protection and may become simple unicode strings, which can result in bad
things being re-templated.

This also adds a global lookup param and cfg options for lookups to allow
unsafe returns, so users can force the previous (insecure) behavior.

(cherry picked from commit 72dfb1570d22ac519350a8c09e76c458789120ed)
2017-05-08 11:11:47 -05:00
Martin Kopta
ab399146b4 fixed yum.parse_check_update regex (#24331)
Output of `yum check-update` can contain lines with long package names and long
repository label names, which will be broken into multiple lines, which need to
be sanitized. The solution to this has been fixed and refactored in 2.3 in form
of parse_check_update(), but it still contains subtle bug, which makes such
multi-lines invisible to later logic (such packages aren't included in
parse_check_update()) output. The problem is caused by using '\1' in re.sub(),
instead of proper r'\1', which literally puts unicode symbol \1 into resulting
output.
(cherry picked from commit c4ad0f86c7)
2017-05-08 10:53:08 -04:00
Adrian Likins
572c07ddb3 Fix vaulted vars templating
Use the default repr of AnsibleVaultEncryptedUnicode.data instead
of a custom one, since jinja templating ends up using the repr()
results.

Fixes #23846, #24175

(cherry picked from commit 7fe2064162f0cd34b68814ecff1fd276ac24740c)
2017-05-08 10:16:35 -04:00
Toshio Kuratomi
2cab2118a1 Give user whatever information we have from ssh-keyscan
ssh-keyscan isn't very verbose about errors.  Give the user whatever
information we have available even if it isn't much.  At least they will
know how we were running ssh-keyscan and why there's an error now.

Fixes #19440

(cherry picked from commit 4bf8071889)
2017-05-05 08:35:36 -07:00
Dane Summers
f57d7bb016 Fixes #23285 (#24291)
Makes subversion module --check fail when modified files are in
repository.
(cherry picked from commit 4bd04c299b)
2017-05-04 10:09:16 -07:00
Joris (J.J.M.) Weijters
4a7230aa3c adjusted descriptions in DOCUMENTATION, and fixed type in RETURN
(cherry picked from commit 2a7ce1059d)
2017-05-04 07:39:06 -07:00
Matt Martz
228553f931 Switch last remaining decode to to_text (#24269) 2017-05-03 16:51:51 -05:00
Brian Coca
77fa3f1598 include_vars to delegated only if delegate_facts (#24259)
* include_vars to delegated only if delegate_facts

fixes #24172

* since code is now same, simplified

(cherry picked from commit b731c2d809)
2017-05-03 16:30:25 -04:00
Raúl Cuza
5c8e11ac9f Add ansible-vault encrypt_string doc (#24147)
* Add documentation on 'ansible-vault encrypt_string'
2017-05-03 12:20:39 -04:00
Ganesh Nalawade
c249662e10 Fix junos_rpc and junos_user broken issues (#24238) (#24246)
* Fix junos_rpc and junos_user broken issues

Add persistent connection related changes.

* Fix CI issues

(cherry picked from commit a42b892f70)
2017-05-03 19:58:24 +05:30
Ganesh Nalawade
ec3a5b0e17 Fix netconf port validation and minor doc change (#24210) (#24239)
* Fix netconf port validation and minor doc change

Add check to confirm if `validate_*` funcion is
callable.

Add `config_format` in `junos_facts` documentation

* Fix review comments

(cherry picked from commit 73c24001d9)
2017-05-03 16:02:21 +05:30
Toshio Kuratomi
af018b75f0 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8

(cherry picked from commit 3428f42120)
2017-05-01 08:57:31 -07:00
Matt Martz
778173ec07 Fix password prompt matching (#24081)
* Fix password prompt matching

* Add some tests for check_password_prompt

* Prevent pep8 line ends with a space error

(cherry picked from commit 040fb4435a)
2017-05-01 11:18:38 -04:00
Brian Coca
8a604185fd make 2.4 compatible
fixes #24148
2017-05-01 11:18:38 -04:00
Toshio Kuratomi
98d223a51b Facts Timeout was not settable via ansible.cfg
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):

* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
  calling setup)
* from the default value

The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.

This change should fix setting via ansible.cfg and adds unittests for
all three cases

Fixes #23753

(cherry picked from commit d088030fa6)
2017-05-01 08:00:11 -07:00
Nathaniel Case
0467017a70 Remove provider requirement from nxos_vrf (#24118)
Fixes #23920
(cherry picked from commit dce2d5eea9)
2017-05-01 09:33:32 -04:00
Alberto Murillo Silva
776551afa5 Fix ClearLinux pretty name
ClearLinux has changed its pretty name in os-release file
from: 'Clear Linux Software for Intel Architecture'
to: 'Clear Linux OS for Intel Architecture'

This patch makes the SEARCH_STRING 'Clear Linux' rather than
the full name to make it compatible with the old and new name.

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
(cherry picked from commit bb234b9206)
2017-05-01 08:53:23 -04:00
Nick Piper
cf224ab31b Minor typo correction varibles -> variables
No impact as variable wasn't used.
(cherry picked from commit 403c142750)
2017-05-01 08:45:01 -04:00
Nathaniel Case
41a70bf9ca Print specific error for BadHostKeyException (#24120)
(cherry picked from commit f9ec06d1dc)
2017-04-28 14:00:53 -04:00
Ganesh Nalawade
6915e026ed Fix exception in junos_package (#24107) (#24116)
(cherry picked from commit 06732acd4c)
2017-04-28 19:49:00 +05:30
Alex Willmer
20c5aee565 Rename fact returned by docker_network to avoid restricted prefix (#23919)
This fixes #23918
2017-04-28 08:47:07 -05:00
Trishna Guha
e509122aad Remove idle ShellError exception and get_exception() method from nxos modules (#24091)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit aa1f922606bd7b884c8920e4b402788665bc4116)
2017-04-28 10:50:38 +05:30
Ganesh Nalawade
ab79e96c3c Fix exception issue in junos_config (#24066)
ParseError execption is added to ElementTree
in py2.7. Prior to py2.7 need catch ExpatError
execption
(cherry picked from commit 7d710882a8)

* Fix python version check issue (#24063)

Fix python version check issue
(cherry picked from commit 1f7c2c63c2)
2017-04-27 20:52:26 +05:30
Nathaniel Case
b4380432f6 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests

(cherry picked from commit fc0bf87c20)
2017-04-27 11:09:38 -04:00
Matt Clay
126878488f Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.

(cherry picked from commit d662f6f0db)
2017-04-27 11:22:44 +08:00
Toshio Kuratomi
4b2d80f662 Add changelog entry for fetch parameter change 2017-04-26 09:28:29 -07:00
KeepZero
9b00648f21 Set validate_checksum default yes of fetch to match the doc
(cherry picked from commit 98e7d4b49d)
2017-04-26 09:27:34 -07:00
Patrick Ogenstad
456ec66b0a asa_command: set default_output to text (#23979)
(cherry picked from commit 9a0a7f78d7)
2017-04-26 09:47:35 -04:00
Matt Clay
19c4e1a992 Use Shippable image: drydock/u16pytall:master
* Use Shippable image: drydock/u16pytall:master
* Do not install python 3.6 on Shippable.
2017-04-26 15:49:21 +08:00
Brian-Williams
c60b3166b1 Change wait_for time to utc (#23987)
(cherry picked from commit 8466c808d9)
2017-04-25 18:05:10 -04:00
Brian Coca
d1c14e8aa4 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control

(cherry picked from commit e29dc49a49)
2017-04-25 14:51:22 -04:00
Ganesh Nalawade
6ada5cc074 Fixes #23960 junos_config fail with config in xml (#23962) (#23978)
If config is in xml format append it to <configuration>
tag as a instance of Element class.
(cherry picked from commit 15c19367d6)
2017-04-25 22:50:35 +05:30
René Moser
f20cd780a4 exoscale: fix TXT type records handling (#23956)
(cherry picked from commit 3959597f7d)
2017-04-25 13:08:02 +02:00
Trishna Guha
107308f6df Set terminal width for network *_command modules to avoid paging (#23728) (#23952)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit f354bd1eab)
2017-04-25 14:33:59 +05:30
Indrajit Raychaudhuri
8c6a2a848c pacman: Fail fast when 'rc != 0'
We fail-fast and display 'stderr' in case 'pacman' returns with 'rc != 0'.
There is no point computing 'module._diff' in such case anyway.

Fixes #23910
2017-04-25 02:07:06 +02:00
Kai
58666c0ca4 Fix systemd in chroot (#23904)
* Fix systemd in chroot

The 'request ignored' message is in stderr, not stdout.

* Check both stdout and stderr for systemd message

Some versions of systemd report to stderr, others to stdout. Also check
whether output could be a valid normal response to avoid false positives.

(cherry picked from commit cb13aea88b)
2017-04-24 19:54:50 -04:00
Brian Coca
476e8c7136 avoid hosts 'pre templated warnings' (#23878)
* avoid hosts 'pre templated warnings'

fixed is_template failing on undefined
fixes #23057

* py3 compat

(cherry picked from commit a108f0fcd3)
2017-04-24 15:19:50 -04:00