Commit graph

18130 commits

Author SHA1 Message Date
jonjozwiak
60e98a3635 Fix ec2_win_password to allow blank key_passphrase (#28791)
(cherry picked from commit 74f950936a)
2017-10-09 16:42:34 +10:00
Toshio Kuratomi
991d9961ed Change ping docs to refer to win_ping (#31444)
(cherry picked from commit 4804e99b44)
2017-10-08 08:19:00 -07:00
Brian Coca
058ed81aa0 revert ocalhost getting 'all' vars (#31425)
back to previous implicit localhost behaviour

fixes #31420

(cherry picked from commit a9942353fe)
2017-10-06 19:11:17 -04:00
Brian Coca
4f4905c88a fix 'return false' from parse
this was abandoned early on the manger side  but seems like we left behind on plugin side.
more flexible extensions with yaml plugin
validate data correctly for yaml/constructed
fixed issue with only adding one child to keyed, the group only got the host that forced it's creation

fixes #31382
fixes #31365

(cherry picked from commit e4c61ea9a1)
2017-10-06 13:26:03 -04:00
Strahinja Kustudic
3af3bb42e0 Do not run systemctl daemon-reload in check mode
(cherry picked from commit 7417282d37)
2017-10-06 08:58:50 -07:00
Trishna Guha
e886da782b nxos_snmp_* fixes : Fixes #30997, #30999 (#31000) (#31414)
* add codeblock to handle 5K platform for nxos_snmp_host

* fix get_snmp_traps for 5K platform

* Make shippable happy

(cherry picked from commit 48f4643a66)
2017-10-06 18:34:01 +05:30
Trishna Guha
6e03cfac6f Fixes #30846 (#30862) (#31408)
(cherry picked from commit 0218fdcd80)
2017-10-06 17:26:11 +05:30
Jordan Borean
cb39aed465 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors

(cherry picked from commit c4b51009f0)
2017-10-06 15:24:20 +10:00
Brian Coca
d2c19eb2f1 better chown errors
(cherry picked from commit a6e27a903a)
2017-10-05 18:41:28 -04:00
Eduardo Suarez-Santana
9bcb6f4372 Fix rpm_key absent. (#31045)
When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
(cherry picked from commit 4337b7a777)
2017-10-05 11:50:09 -07:00
John R Barker
bd460eee9a data should be redacted in docker_secret (#31366)
(cherry picked from commit e859d0da9c)
2017-10-05 14:09:05 -04:00
Toshio Kuratomi
bc6483c96a Revert "enable run_command to use non /bin/sh shells"
This breaks output from commands in current playbooks.  Since this
change fixed a smaller use case we're going to revert this for 2.4.1 and
revisit a different fix for non /bin/sh shells for 2.5.x

This reverts commit 55135c0825.
2017-10-05 10:23:28 -07:00
Toshio Kuratomi
b15ff222b1 Revert "only set executable from shell if not set already"
Reverted as this is a fix for 55135c0825
which is being reverted for breakage

This reverts commit e506b5da14.
2017-10-05 10:23:28 -07:00
Rob
19c6fe9a78 [cloud] Only get rules if listener in elb_application_lb been identified in compare_rules (#30604)
* Only get rules if listener has been identified in compare_rules

* Always cast the listener port to an integer.

(cherry picked from commit 7cdaa3089ed2053f6fcfcea524a0322f40a2a822)
2017-10-05 11:57:25 -04:00
Sam Doran
71e0540016 Make ansible_selinux facts a consistent type (#31065)
* Make ansible_selinux facts a consistent type

Rather than returning a bool if the Python library is missing, return a dict with one key containing a message explaining there is no way to tell the status of SELinux on the system becasue the Python library is not present.

* Fix unit test

(cherry picked from commit e7902d888c)
2017-10-05 09:19:56 -04:00
Trishna Guha
ecce2f826f nxos_config and nxos_pim_interface fix (#31343)
* fixes #31080 (#31081)

(cherry picked from commit 266c2f5831)

* nxos_config intended_config docfix (#31337)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 9f72b32c5d)
2017-10-05 17:06:16 +05:30
Brian Coca
8ccb719dfc restore connection options from cli
fixes #30720

(cherry picked from commit bed7cd8b11)
2017-10-04 23:14:56 -07:00
Toshio Kuratomi
8281627d43 We want the ini and env vars to both override in the same order
There's an ssh version and a generic version.  We want the ssh version
to override the generic version in both cases.

(cherry picked from commit 52497920fa)
2017-10-04 13:07:20 -07:00
Sloane Hertel
72148b358d Allow any_errors_fatal to be set in playbook - fixes #30691 (#30839)
* Allow any_errors_fatal to be set in playbook.
* Default to the config file value for any_errors_fatal only if it isn't already provided.
* add _get_attr method

(cherry picked from commit aa658c64ec)
2017-10-04 12:56:18 -07:00
Brian Coca
dff33071d0 check type to avoid typeerror tb
fixes #31290 by giving more meaningful message

(cherry picked from commit 8aa33419c9)
2017-10-04 15:14:48 -04:00
Martin Krizek
c9af0bfea8 yum: fix name parsing out of envra (#31247)
(cherry picked from commit 115b4fdc9b)
2017-10-04 21:08:34 +02:00
Brian Coca
7d69946d42 correctd inventory_file to return full path
fixes #31294

(cherry picked from commit dbae704d3c)
2017-10-04 11:54:25 -04:00
Brian Coca
280e9d7bb7 dont follow symlinks for inventories
now symlink dir is checked for locality of group/host_vars

fixes #31195

(cherry picked from commit f00d47fac0)
2017-10-04 11:05:09 -04:00
Brian Coca
8b39280d8d turn all inventory cache 'off by default'
(cherry picked from commit 852d457549)
2017-10-04 10:52:01 -04:00
Brian Coca
833858dc31 updated constructed docs to clarify use of ext
(cherry picked from commit 46621a3ddd)
2017-10-04 08:47:47 -04:00
Trishna Guha
43d24e284c Fixes nxos_igmp_interface idempotence issue for N1 images (#31220) (#31288)
(cherry picked from commit 1378861fe7)
2017-10-04 13:02:25 +05:30
Trishna Guha
6999b1168f Fixes #30769 - nxos_vtp_version errors out on N1 images. (#30770) (#31285)
* Fixes #30769

* add the same fix for 2 more vtp modules

(cherry picked from commit a12a05c219)
2017-10-04 12:09:25 +05:30
Sam Doran
e157082f5e Correctly write SELinux config file (#31251)
* Add new lines to end of config file lines

* Properly write out selinux config file

Change module behavior to not always report a change but warn if a reboot is needed and return reboot_required.

Improve the output messages.

Add strip parameter to get_file_lines utility to help with parsing the selinux config file.

* Add return documentation

* Add integration tests for selinux module

* Use consistent capitalization for SELinux

* Use atomic_move in selinux module

* Don't copy the config file initially

There's no need to make a copy just for reading.

* Put message after set_config_policy in case the change fails

* Add aliases to selinux tests

(cherry picked from commit 00df1fda10)
2017-10-03 23:42:33 -04:00
Jordan Borean
39196a7f2f win_become: move error handling to Ansible outside of shell (#31227)
* win_become: move error handling to Ansible outside of shell

* trimmed the output so double newlines don't get set

* added test for non-zero exit code

* missed issue URL on test

* changed exit to SetShouldExit

(cherry picked from commit e61c2799ff)
2017-10-04 13:07:36 +10:00
Sam Doran
88a2c3c047 Update elasticsearch_plugin.py (#28936)
* Update elasticsearch_plugin.py

Change module to work with Elasticsearch 2.x and 5.x automatically.
Update examples and docs.
Supersedes #21989

* Check system paths for elasticsearch-plugin binary

Use get_bin_path from basic.py for searching paths.

* Create a copy of PLUGIN_BIN_PATHS rather than modifying the global

* Use provided plugin_bin path first before trying other places

Change global PLUGIN_BIN_PATHS to a tuple

(cherry picked from commit a5ee865634)
2017-10-03 22:30:30 -04:00
Daniel Roberts
6a1dffc507 fix monit version check
it was erroneously checking > 3.18 instead of > 5.18

Fixes #30614

(cherry picked from commit 34878926ca)
2017-10-03 15:18:53 -07:00
Abhishek Shukla
4283a689d9 BugFix code breaks, if include_vars dir is file instead of directory (#31157)
(cherry picked from commit d0c003ab0f)
2017-10-03 15:12:59 -07:00
Dustin Spicuzza
59beba32be win_reg_stat actually sets properties to be a dictionary, not a list (#31252)
(cherry picked from commit 8f62be7b7c)
2017-10-04 06:20:49 +10:00
Jordan Borean
df4daeb9a9 win_copy: fix for copying encrypted file without pass (#31084)
* win_copy: fix for copying encrypted file without pass

* fix pep8 issue

* reduced the diff and fixed some minor issues

(cherry picked from commit bba941cd5b)
2017-10-03 12:52:43 -07:00
Brian Coca
fa131f9a07 make pipelining actually backwards compatible
restore ssh specific setting the global, in the future these will be separate.

(cherry picked from commit 2d70dc7f21)
2017-10-03 14:35:28 -04:00
Adrian Likins
74e0643dbb Handle vault decrypt --output=- (#31066)
In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
(cherry picked from commit 278ff19bea)
2017-10-03 14:20:31 -04:00
Brian Coca
f09c1211a7 set _hosts on access if None (#31111)
set _hosts on access if None to bpyass srlz10n issues to fix #30903

(cherry picked from commit cf3414d7d7)
2017-10-03 10:03:51 -07:00
Adrian Likins
b81270f7d5 Fix flush_cache on redis cache
Fix a del on non existent self.cache.

Fixes #31148

(cherry picked from commit dae0ad1ce6)
2017-10-03 12:54:58 -04:00
Brian Coca
c6691eef52 remove unused ssh pipelining setters
fixes #31125

(cherry picked from commit 101377768b)
2017-10-03 09:22:49 -04:00
David Moreau-Simard
447d1cffb0 Fix backwards compatibility of constants.get_config
get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.

(cherry picked from commit 9b693235f0)
2017-10-03 09:19:28 -04:00
Jordan Borean
737a0d6015 win_dotnet_ngen: fix after broken in 2.4 (#31076)
* win_dotnet_ngen: fix after broken in 2.4

* added description to return values

(cherry picked from commit 12a4dca447)
2017-10-03 06:39:51 +10:00
Jordan Borean
310610de47 win_msg: added doc about msg limit and included an explicit check for better error handling (#31078)
(cherry picked from commit 67fd98da09)
2017-10-03 06:34:28 +10:00
Dave Grochowski
fd31896906 [cloud] Fix handling of encrypt option in aws_s3 module (#30822)
(cherry picked from commit e67e7785d3ae785e4aa532a17261b9ae113c8960)
2017-10-02 14:36:41 -04:00
Julien Palard
6a1a6ee690 yaml inventory: Better error reporting on typo. fixes (#31118)
(cherry picked from commit 5802ec04bf)
2017-10-02 09:10:45 -07:00
Brian Coca
ad0761b0a8 avoid include_Xs conflating vars with options (#30954)
* avoid include_Xs conflating vars with options

* avoid frozenset so serialization wont complain

* dded missing set

* updated as per feedback

(cherry picked from commit dea872e4a6)
2017-10-02 09:09:21 -07:00
Brian Coca
5de7121941 corrected yaml extensions ini setting
(cherry picked from commit 44d2f21e02)
2017-10-02 10:03:19 -04:00
Brian Coca
a81dc232e3 remove action plugin only fields from 'file' calls (#31047)
* remove action plugin only fields from 'file' calls

fixes #30556

* Add a test for #30556
(cherry picked from commit ac9278ff0f)
2017-09-29 17:13:58 -07:00
jhawkesworth
6d82ef8378 win_chocolately document improvedments, mention win_hotfix and use of become (#31085)
(cherry picked from commit 04afacc2ee)
2017-09-30 08:23:30 +10:00
Damian Zaremba
1407410362 module_utils.urls - Encode the proxy connect as binary (#30811)
* module_utils.urls - Encode the proxy connect as binary

Under Python3 the sendall method expects binary not a string.

Prior to this change the below exception was being thrown;
Traceback (most recent call last):
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 1044, in fetch_url
    client_key=client_key, cookies=cookies)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 951, in open_url
    r = urllib_request.urlopen(*urlopen_args)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 524, in open
    req = meth(req)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 729, in http_request
    s.sendall((self.CONNECT_COMMAND % (self.hostname, self.port)).decode())
AttributeError: 'str' object has no attribute 'decode'

Encoding the value is inline with the lines below (Proxy-Authorization etc) which are being sent as binary.
(cherry picked from commit 92f777e815)
2017-09-29 14:33:06 -07:00
Brian Coca
8cee2a8d93 removed typo from dig docs
(cherry picked from commit 43cbcbcc75)
2017-09-29 11:25:03 -04:00