Commit graph

992 commits

Author SHA1 Message Date
Mike Wiebe
79ec0ec78f nxos_interface: Fix admin_state check for n6k (#55673)
* Fix admin_state check for n6k

* Fix rx and tx_rate intent check test

(cherry picked from commit bceca72eb7)
2019-05-21 09:37:17 -07:00
Trishna Guha
4f37ce32f3 nxos_vlan fix 2.8 backport (#56211)
* nxos_vlan: vlan names containing regex ctl chars should be escaped (#55463)

The `nxos_vlan` module may raise with regex error `sre_constants.error: multiple repeat` in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g.

```
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active
```

(cherry picked from commit de8ce08fd8)

* fix nxos_vlan mode idempotence bug (#55144)

* fix nxos_vlan mode idempotence bug

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 57e0567310)

* nxos_vlan fix 2.8 backport

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-05-21 09:36:30 -07:00
Mike Wiebe
c8037a541e Fix passwordless workflow (#55441)
(cherry picked from commit 9f830b77fc)
2019-05-21 09:25:59 -07:00
Chris Van Heuveln
a85461e569 nxos_acl: some platforms/versions raise when no ACLs are present (#55609)
* `nxos_acl` may fail with `IndexError: list index out of range` while attempting to delete a non-existent ACL.

The failure occurs when the `acl` var is an empty list.

* nxos_acl: catch 501 'Structured output unsupported' when no ACLs present

With some older image versions, `show ip access-list | json` will raise a 501 error indicating `'Structured output unsupported'` when there are no access-lists configured. This change turns off the `check_rc` and then looks for the failure condition.

* Fix kwarg

* Fix lint issues

(cherry picked from commit 869fdcd7d4)
2019-05-21 07:56:55 -07:00
James E. King III
3a237b505f ec2_instance fix name idempotency (#55224)
(cherry picked from commit 1462fd740b)
2019-05-21 07:53:08 -07:00
Nilashish Chakraborty
058653487c Fix VyOS cli prompt issues (#56389)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 30ccc8e1bd)

Add changelog for vyos prompt issue fix
2019-05-20 22:40:09 -07:00
Abhijeet Kasurde
0cfc338cfe [2.8] VMware: remove duplicate implementation of memory reservation
mem_reservation and memory_reservation has redundant implementation.
Combining them together.

Fixes: #54335

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 193f69064f)
2019-05-20 19:31:10 -07:00
Felix Fontein
a07ed8530f openssl_certificate: fix passphrase handling for cryptography backend (#56155)
* Make sure passphrase is bytes string.

* Fix typo.

* Add more passphrase tests.

* Fix test names.

* Add changelog.

(cherry picked from commit 7a957ba64a)
2019-05-20 19:22:28 -07:00
Dag Wieers
f65a1c4134 Fix non-signature authentication (backport 2.8)
Apparently everyone is using signature authentication these days.
2019-05-20 18:53:29 -07:00
Sumit Jaiswal
b66f77352d Backport PR for fixing NIOS_ZONE module idempotency (#56347)
* To fix the issue where nios_zone module was running second time for same object (#55595)

* fix for 55128 issue

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* review comment fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 661f7be0fe)

* changelog for 2.8

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-05-20 18:17:03 -07:00
Felix Fontein
3fbe6e976c [WIP] [2.8] connection/docker: add support for privilege escalation (#56277)
* connection/docker: add privilege escalation support (#55816)

As described in #53385 (and #31759), the docker connection driver did
not support privilege escalation. This commit is a shameless
cut-and-paste of the privilege escalation support from the `local`
connection plugin into the `docker` plugin.

Closes: #53385
(cherry picked from commit 61e476b908)

* docker connection plugin: make privilege escalation code more similar to local.py (#56288)

* Make more similar to local.py

* Fix typo.

(cherry picked from commit 708bda06aa)
2019-05-20 18:14:28 -07:00
Strahinja Kustudic
cf611c8a8e Backport/2.8/55695 (#56254)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

(cherry picked from commit 0432b7f2522dbf82c4fabdb3fd17f7ac83f34e62)

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

(cherry picked from commit a16128f778b1e7574c5986aed26e146ac0561533)

* Add changelog fragment for sysctl

(cherry picked from commit 3ad9d4d83c1d2bbfccefb8388904c596d98f8731)
2019-05-20 18:10:15 -07:00
Felix Fontein
1769d9aebe oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.

(cherry picked from commit f692261ea0)
2019-05-20 09:31:55 -07:00
Andrey Klychkov
d32543ba10 postgresql modules: missing_required_libs, removed excess param mapping Backport/2.8/55506 (#55806)
* postgresql modules: missing_required_libs, removed excess param mapping (#55506)

(cherry picked from commit 0ff67d0a1c)

* postgresql modules: missing_required_libs, removed excess param mapping
2019-05-20 09:30:57 -07:00
Andrey Klychkov
f7dd79a439 postgresql SSL related tests, Backport/2.8/55288 (#55801)
* postgresql SSL related tests (#55288)

* postgresql SSL tests

* postgresql SSL tests, added link to officiall doc

(cherry picked from commit f8c47262c4)

* postgresql SSL related tests: added changelog fragment
2019-05-20 09:28:34 -07:00
flowerysong
00b4a52633 Fix loading namespaced doc_fragments from collections (#55249)
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry

(cherry picked from commit 2ef8b297ff)
2019-05-20 09:27:38 -07:00
Felix Fontein
4818ec2823 docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.

(cherry picked from commit 95d1564f70)
2019-05-20 09:26:00 -07:00
Jordan Borean
c99ee40812 win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
2019-05-17 23:19:57 -04:00
Yunge Zhu
019573b63d Backport/2.8/55854 (#55856)
* fix cross subs vnet peering (#55854)

(cherry picked from commit fd2ea34444)

* cherry pick cross subs fix
2019-05-17 23:18:46 -04:00
MyronFanQiu
5375c5866d Backport/2.8/55797: A fix for role definition #55797 (#55855)
* a fix by replacing subscription with subscriptions (#55797)
2019-05-17 23:17:56 -04:00
Yuwei Zhou
207fff7d36 Fix the get property (#55745) (#55788)
* Fix the get property (#55745)

(cherry picked from commit c7bf3e035b)
2019-05-17 23:17:06 -04:00
Kevin Breit
d8fb3cc7f0 meraki_ssid - Add examples to documentation (#56425) (#56579)
* Add standalone copy/paste-able examples

(cherry picked from commit 27aca731b3)
2019-05-17 21:15:06 -05:00
Toshio Kuratomi
c4893d73b1 New release v2.8.0 2019-05-16 06:58:30 -07:00
Sandra McCann
2873741074 [2.8]Changelog fix/2.8 (#56461)
* fixed batch of spelling errors

* more spelling errors
2019-05-15 10:50:33 -04:00
Alicia Cozine
d69da31ceb
Backport/2.8/docs other (#56318)
* Correct link to Thomas' GitHub account (#55587) from tstringer to trstringer

(cherry picked from commit 158452661a)

* Add changelog fragments for #44811 (#55427)

(cherry picked from commit 7e0603282d)

* Speed up the Sphinx documentation build (#55593)

* speeds up the docs build by changing the navigation collapse setting

(cherry picked from commit 47a440774f)

* Improve rendering of default lists (#56041)

(cherry picked from commit 53ed1bfc49)
2019-05-13 07:27:55 -05:00
Matt Clay
cd9d6f0958 New release v2.8.0rc3 2019-05-10 10:28:29 -07:00
Abhijeet Kasurde
a9b4313570 [2.8] VMware: Add examples of folder in vmware_deploy_ovf (#56286)
Fixes: #51825

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 748cfd89ab)
2019-05-10 09:24:09 -05:00
Sumit Jaiswal
387093a0d6 Backport PR for fixing net_get and net_put task run failure (#56160)
* Fix net_get and net_put task run failure (#56145)

* net_get and net_put action plugin class need
  to inherit from ActionBase class as the action
  class implements the entire get and put logic

(cherry picked from commit 9271b4e368)

* backport changelog

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-05-09 12:42:17 -07:00
Gonéri Le Bouder
543bfbbe7f vmware: check the SSL certification
If `validate_certs` is enable, we now validate the server SSL
certificate.

(cherry picked from commit 23e63c9237)
2019-05-09 12:40:56 -07:00
Ganesh Nalawade
457efa8136 Fix invalid src option return response for network config modules (#56076)
*  Add changed key in faliure case to maintain backward compatibility

(cherry picked from commit 1a66121f03)
2019-05-09 12:40:19 -07:00
Toshio Kuratomi
22d7b7e5f2 New release v2.8.0rc2 2019-05-01 06:27:52 -07:00
Jordan Borean
17f90a68cc Ansible.Basic - fix when deserialising a json string of an array (#55691)
* Ansible.Basic - fix when deserialising a json string of an array

* Added changelog fragment

(cherry picked from commit 5228133d74)
2019-05-01 06:29:55 -05:00
James Cammarata
f5de633197 Be sure to use the active state when checking for any_errors_fatal
The current code was not properly checking for the active state when
checking any_errors_fatal, so if the error occurred in a sub-block
or included file it is not properly detected.

Fixes #55515
2019-04-30 13:23:08 -05:00
Brian Coca
57935b76d7 allow empty plays again, for now (#55878)
(cherry picked from commit 815a375177)
2019-04-29 19:03:58 -05:00
Toshio Kuratomi
ebaf42bbbe New release v2.8.0rc1 2019-04-25 08:48:56 -07:00
Kevin Breit
5c3c3fc835 meraki_content_filtering - Remove redundant API call with get_nets() (#55531)
* Remove redundant API call with get_nets()

* Add changelog fragment

(cherry picked from commit 56da3825c6)
2019-04-25 09:19:30 -06:00
Kevin Breit
e0a3c6214d meraki_static_route - Remove unnecessary API call (#55528)
* Make module not get all nets every time it's executed with net_id

* Add changelog fragment

* Update changelogs/fragments/meraki_static_route_api_calls.yml

Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>
(cherry picked from commit 7b7d6a1fef)
2019-04-25 09:19:03 -06:00
Matt Davis
74e90f89bd mark entire module result untrusted as template (#55717)
* prevents accidental templating on intra-action postprocessing of an untrusted module result
* makes the view of a module result within an action consistent with the way it would be stored for future use (eg facts, register)

(cherry picked from commit 03cac394cc)
2019-04-24 18:38:32 -06:00
Sam Doran
76f6d21ff3 [stable-2.8] User - Fix shadow file parsing on AIX (#55230)
Implement a new method for shadow file parsing so it can be subclassed.
(cherry picked from commit f27eccabbd)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-04-24 14:45:52 -06:00
Yuwei Zhou
0cfbc1feb8 Create 55681-azure_rm_manageddisk.yaml 2019-04-24 14:45:33 -06:00
Yuwei Zhou
9fd0254954 Delete 55681-azure_rm_manageddisk.yaml 2019-04-24 14:45:33 -06:00
yuwzho
942d38ae24 add fragment 2019-04-24 14:45:33 -06:00
Yuwei Zhou
118f008c59 add resource group test (#55688) (#55701)
* add resource group test (#55688)

(cherry picked from commit 0d3d002505)

* fragment

* Update 55688-azure_rm_resourcegroup.yml

* Delete 55688-azure_rm_resourcegroup.yml

* Create 55688-azure_rm_resourcegroup.yml
2019-04-24 14:44:46 -06:00
Zim Kalinowski
14531144cf Backport/2.8/55693 (#55698)
* adding final functionapp settings (#55693)

(cherry picked from commit 8de2acb819)

* +changelog
2019-04-24 14:41:41 -06:00
René Moser
4cd7c2987f vultr_server: fix idempotency for private network and IPv6 options (#55619)
* vultr_server: fix idempotency for private network and IPv6 options

* add changelog

(cherry picked from commit 1705ef5f26)
2019-04-24 14:40:04 -06:00
zikalino
3044b855b4 adding doc fragment 2019-04-24 14:37:36 -06:00
Zim Kalinowski
7c678aaff8 fix for removing subscripion_id from resource facts (#55203) (#55685)
* adding changelog

* fix for removing subscripion_id from resource facts (#55203)

(cherry picked from commit 48cb681140)
2019-04-24 14:36:56 -06:00
Brian Coca
ebe89926f0 ensure inventory plugin loading rel to play (#51177)
Ensure inventory plugin loading rel to play

  fixes #51033

*  clarify paths
* now adding dirs funciton in loader
* better warnings
* each cli should handle adding dirs depending on context

(cherry picked from commit 780ee45819)
2019-04-24 14:35:24 -06:00
Brian Coca
d73da98ecf Ensure discovery unsafe (#55295)
* Ensure safe discovery by marking it Unsafe

(cherry picked from commit 24b44e1772)
2019-04-23 20:25:31 -06:00
Simon Dodsley
ebd7820a44 Remove unneccessary line in config section of purefa_facts (#55164)
(cherry picked from commit 30a216bf78)
2019-04-23 16:25:41 -06:00
Nathaniel Case
a87b36219b [stable-2.8] Move missing library abort to use rather than import (#55649)
* [stable-2.8] Move missing library abort to use rather than import for netconf (#55384)
(cherry picked from commit b442706)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* Add changelog
2019-04-23 16:25:00 -06:00
Hannes Ljungberg
4dee11336c docker_swarm_service: Use str type for configs/secrets gid/uid (#55591)
* Change type of secrets gid/uid to str
* Add changelog fragment

Co-Authored-By: hannseman <hannes@5monkeys.se>
(cherry picked from commit 14c60e6ec8)
2019-04-23 14:06:25 -06:00
David Hollenberger
3cd3c0d7c6 [2.8] Add variable type for performance_insights_retention_period
(cherry picked from commit 5bda9cbebf)
2019-04-23 13:54:25 -06:00
Abhijeet Kasurde
905b9b162d [2.8] k8s: fix API call to _wait_for_response
(cherry picked from commit 94f295e4a1)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-23 13:53:24 -06:00
Felix Fontein
2e80441948 crypto modules: use module_utils.compat.ipaddress when possible (#55278)
* Use module_utils.compat.ipaddress where possible.

* Simplify reverse pointer computation.

* Use dummy for unused variables.

* Remove from ignore list.

* Adjust fix.

* Fix text handling for Python 2.

* Add changelog.

(cherry picked from commit c8a15b9dbc)
2019-04-23 12:31:24 -06:00
Jordan Borean
d83e722b82 Merge pull request #55493 from jborean93/win_region-psrp-2.8
win_region - fix format issues when using psrp (#55487) - 2.8
2019-04-23 12:26:03 -06:00
Felix Fontein
d83adc4deb docker modules: make sure everything works with older docker-py versions (#55258)
* General test improvements.

* Adjust tests to older docker-py versions.

* docker_swarm_server_info: work around problems with older docker-py versions

* Bump minimal docker-py version for options network_filters and disk_usage.

* More general test improvements.

* Correct usage of docker_image.

* Put files into output directory.

* Speed up test.

* Remove old check.

(cherry picked from commit 12d26eceb1)
2019-04-23 12:24:56 -06:00
Alicia Cozine
65035e2149
Fixed wrong variable specification format in examples (#55252) (#55543)
Signed-off-by: Hideki Saito <saito@fgrep.org>
(cherry picked from commit 83f20e0ea0)
2019-04-22 09:56:55 -05:00
Robert Osowiecki
93758a5141 vsphere_guest: corrected fix #19716 misbehaviour (#55285)
* vsphere_guest: corrected fix #19716 misbehaviour
* creating machines without vm_extra_config is possible
* power state operation on absent machines will fail

* changelog fragment for PR #55285 (vsphere_guest bugfix)
2019-04-17 08:11:57 -07:00
Jordan Borean
45ff67b744 psrp - Fix raw and script tests for connection plugin (#55357)
* psrp - Fix raw and script tests for connection plugin

* Fix error propagation with raw in psrp

* uncomment test

(cherry picked from commit fdf9df89f5)
2019-04-17 06:56:00 -07:00
Mario Lenz
a5a54455a4 [Backport 2.8] Use different headers for each HTTP method (#55299)
* Use different headers for each HTTP method (#55193)

(cherry picked from commit f88b2cbe59)

* add changelog fragment
2019-04-17 06:45:56 -07:00
Andrey Klychkov
8e801d5394 postgresql_idx: improved doc, tests, remove useless lines from code (#55131) (#55209)
* postgresql_idx: improved doc, tests, remove useless lines from code (#55131)

* postgresql_idx: improve doc

* postgresql_idx: improve doc, removed unuseless rows from code

* postgresql_idx: misc doc fix

* postgresql_idx: moved common params where they were

* postgresql_idx: moved common params where they were 2

(cherry picked from commit d790285e80)

* postgresql_idx: added changelog about removing useless lines from code
2019-04-17 06:43:17 -07:00
Jordan Borean
5af5e70f6b psrp - fix test_command rc for win_reboot (#55354)
(cherry picked from commit 49655a452d)
2019-04-16 16:57:20 -07:00
Jordan Borean
33824f313e psrp - Fix fetch for large files (#55351)
* psrp - Fix fetch for large files

* Fix typo

(cherry picked from commit 52946c49a4)
2019-04-16 16:36:29 -07:00
Brian Coca
28348602f8 ensure facts marked as unsafe (#55326)
dont rely on plugin layer to do so

(cherry picked from commit aa8d23b42f)
2019-04-16 15:49:53 -07:00
Matt Martz
ffa7eaa7a7 [stable-2.8] Version in deprecate calls should be a string (#55395)
* Version in deprecate calls should be a string. Fixes #55312. Fixes #55313. Fixes #55314. Fixes #55315. Fixes #55316. Fixes #55317.

* Add changelog fragment
(cherry picked from commit ca83a5c)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-04-16 15:44:36 -07:00
James Cassell
8448967c74 [Backport 2.8] VMware: vmware_tools tls warning fixes
* vmware_tools: remove silence_tls_warnings option

* attempt import of bundled urllib3

(cherry picked from commit 7191d45885)
2019-04-16 15:41:18 -07:00
Kevin Breit
e62f75192d meraki_vlan - Remove unnecessary API calls when net_id is specified (#54939)
* Remove unnecessary API calls when net_id is specified

* Remove temp_get_nets commented out code

(cherry picked from commit fb3cc7f687)
2019-04-16 15:40:03 -07:00
Brian Coca
c975c0e69b Correct plugin loader context for persistent (#54860)
* Correct plugin loader context for persistent

(cherry picked from commit 6579dfda17)
2019-04-16 15:38:42 -07:00
Andrey Klychkov
e4d9a5185d postgresql_slot - sslrootcert fix (#55277)
(cherry picked from commit 4190985995)
2019-04-16 15:16:45 -07:00
Felix Fontein
9cdc204139 openssl_csr: fix idempotency problems (#55142)
* Add test for generating a CSR with everything, and testing idempotency.

* Proper SAN normalization before comparison.

* Fix check in cryptography backend.

* Convert SANs to text. Update comments.

* Add changelog.

(cherry picked from commit cb5c57bcd5)
2019-04-16 15:09:54 -07:00
Abhijeet Kasurde
9e60b212dd [2.8] VMware: get_all_host_objs accepts list of host
vmware_portgroup accepts list of hosts, get_all_host_objs API modified
to accept list of hosts.

(cherry picked from commit 6ff4547489)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-16 15:08:13 -07:00
Felix Fontein
ebc717c337 docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings.

* Add changelog.

* Improve message.

* Improve formatting and formulation of other messages.

* Add test for warning.

* Trying double escaping.

(cherry picked from commit d64b17731d)
2019-04-16 15:07:23 -07:00
Jordan Borean
455aa542d0 win_domain - fix for checking for domain on new host (#55195)
(cherry picked from commit 6039ff9a24)
2019-04-16 15:06:02 -07:00
Toshio Kuratomi
89c3ebf053 New release v2.8.0b1 2019-04-15 12:21:54 -07:00
Martin Krizek
a40c1ed811
setup: properly detect is_chroot on Btrfs (#55089)
* setup: properly detect is_chroot on Btrfs

Fixes #55006

* Use get_bin_path for stat

* Remove comment
2019-04-11 11:24:08 +02:00
Tobias Rüetschi
cd00934375 Add a changelog fragment for PR 55083. (#55130) 2019-04-11 11:21:51 +02:00
Anatoly Pugachev
19f6634353 Add support of facts gathering WWNs on AIX OS (#51704)
* Extend git commit c65909d6db "Add network fact to obtain FC WWN initiator ports"
adding support of enumerating AIX device WWN ports

$ lsdev -Cc adapter -l fcs*
fcs0 Defined   00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1 Defined   00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2 Available 04-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3 Available 04-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

$ lscfg -vpl fcs3 | grep 'Network Address'
        Network Address.............10000090FA551509

* no self in this code

* Two fixes:

- fix run_command execution, passing 'use_unsafe_shell=True' since we have a pipe in it ( | grep )
  if we don't set unsafe shell, it will return error on execution.

- strip new line characters at the end of WWNs.

* fix pep8 , E225 missing whitespace around operator

* use module.get_bin_path() instead of hardcoded values

* move module.get_bin_path() out of for loop

* use python string parsing instead of calling external grep

* use in operator instead of find() for simplicity and readability

* add changelog fragment
2019-04-11 00:13:33 +02:00
Toshio Kuratomi
04e5c550a8 Do not look for a paramiko compat package anymore (#55106) 2019-04-10 14:51:53 -04:00
Matt Martz
e89f8bae86
Extend jinja2 nested undefined support to keys/indices (#55094) 2019-04-10 10:35:31 -05:00
Wilmar den Ouden
877ce12970 VMware: Rename results key to ansible_module_results (#55038)
* Rename results key to ansible_module_results

* Update to a better variable name

* Update example and adds change to porting guide
2019-04-10 19:58:25 +05:30
junji hashimoto
c3e50db1d5 Renamed SafeConfigParser to ConfigParser in gce inventory script (#54974) 2019-04-10 09:52:26 -04:00
Andrea Tartaglia
0303ea2bfa openssl_pkcs12: Add idempotency checks (#54633)
* Added idempotency logic to openssl_pkcs12

Also decoupled the 'parse' and 'generate' function from the file write
as they are now used in different places that do not need the file to be
written to disk.

* Added idempotency tests for openssl_pkcs12

Also adds a new test for pkcs12 files with multiple certificates

* Regenerate if parsed file is invalid

* pkcs12_other_certificates check was wrong

* Updated ca_certificates to other_certificates

ca_certificates is left as an alias to other_certificates;
friendlyname depends on private key, so it will be ignored while
checking for idempotency if the pkey is not set;
idempotency check only checks for correct certs in the stack

* use different keys for different certs

* Added other_certificates in module docs

* Added changelog and porting guide

* removed unrelated porting guide entry

* renamed ca_cert* occurrence with other_cert
2019-04-10 11:43:08 +01:00
Andreas Calminder
7adfb1f714 os_volume: Modify existing volume (#54905)
* add support for: volume resize, check_mode and diff

* add changelog fragment
2019-04-10 10:41:41 +01:00
Adam Miller
a2eb227970 facts: correctly detect xen paravirt vs hvm cpuinfo (#49320)
* facts: correctly detect xen paravirt vs hvm cpuinfo

Fixes #49039

Signed-off-by: Adam Miller <admiller@redhat.com>

* provide default val if we IndexError

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-04-10 00:17:30 -04:00
Matt Davis
97446f0eca
Revert "Add a force_replace_host flag to win_domain_membership (#53542)" (#55056)
This reverts commit 85d836171b.

As discussed in WWG IRC meeting, we don't want Get-ADObject to be a dependency of win_domain_membership, and we need to be able to authenticate to the DC in some configs. We can revisit this change a different way for 2.9.
2019-04-09 13:52:23 -07:00
Sloane Hertel
ba8b5ec0d3
[ec2] Use user_data if specified (#54494)
* Use user_data if specified

* changelog
2019-04-09 15:52:49 -04:00
Adam Miller
d53c3cd4f2
Force pkg_mgr yum for rhel < 8, dnf for rhel > 8 (#54010)
* Force pkg_mgr yum for rhel < 8, dnf for rhel > 8

This solves the scenario in which someone using RHEL or a clone
decides to install dnf, which can break their system in certain ways
under certain scenarios (a dnf bug that's been resolved upstream but
left user systems broken happened recently). Currently Red Hat
provides dnf to RHEL7 in an optional Tech Preview Channel under the
YUM4 branding, as does the CentOS Content Management SIG. There may
be others in the ecosystem I'm not familiar with.

Signed-off-by: Adam Miller <admiller@redhat.com>

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-04-09 14:32:00 -05:00
Sam Doran
3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
2019-04-09 13:17:59 -04:00
Brian Coca
5f69ab7f46 Better test for cache method availability (#54740)
* Better test for cache method availability

  fixes #54737

* try and ignore missing method

* avoid plugin cross contamination

* ammend clog
2019-04-09 09:32:11 -07:00
Benjamin MALYNOVYTCH
9c5275092f mysql_user: fix compatibility issues with various MySQL/MariaDB versions (#45355)
* mysql_user: fix MySQL/MariaDB version check

To handle properly user management, version check needed refacto, as well as the query used to get existing password hash

* mysql_user: break long query in multiple lines

* mysql_user: fix query fetch existing password hash

* mysql_user: MariaDB version check 100.2 != 10.2

* mysql_user: fix existing password fetch

In some cases, both columns (Password and authentication_string) may exist and be populated.
In other cases one exist, but not the second.
This fix should handle properly all situations

* mysql_user: break long queries

* mysql_user: refactor duplicated code

* mysql_user: handle updates from root with empty passwd to new passwd

* mysql_user: GC debug statement and readd trailing new line

* mysql_user: fix pep8 under indentation

* mysql_user: fix privileges management
https://github.com/ansible/ansible/pull/45355#issuecomment-428200244

* mysql_user: raise exception if exception caught doesn't match the one that is managed

* mysql_user: improve plugins output (add msg field with explicit informations)

* mysql_user: fix old / new password hash comparison

* mysql_user: fix reference to old MySQLdb lib

* mysql_user: fix cursor when root password is left empty (mysql DB invisible)

* mysql_user: add changelog

* ALL privileges comparison

* fixed blank line

* added mysql 8 fixes

* fixed version compatibility

* mysql_user: fix MySQL/MariaDB version check

To handle properly user management, version check needed refacto, as well as the query used to get existing password hash

* mysql_user: break long query in multiple lines

* mysql_user: fix query fetch existing password hash

* mysql_user: MariaDB version check 100.2 != 10.2

* mysql_user: fix existing password fetch

In some cases, both columns (Password and authentication_string) may exist and be populated.
In other cases one exist, but not the second.
This fix should handle properly all situations

* mysql_user: break long queries

* mysql_user: refactor duplicated code

* mysql_user: handle updates from root with empty passwd to new passwd

* mysql_user: GC debug statement and readd trailing new line

* mysql_user: fix pep8 under indentation

* mysql_user: fix privileges management
https://github.com/ansible/ansible/pull/45355#issuecomment-428200244

* mysql_user: raise exception if exception caught doesn't match the one that is managed

* mysql_user: improve plugins output (add msg field with explicit informations)

* mysql_user: fix old / new password hash comparison

* mysql_user: fix reference to old MySQLdb lib

* mysql_user: fix cursor when root password is left empty (mysql DB invisible)

* mysql_user: add contrib

* Rename changelogs/fragments/45355-mysql_user-fix-versions-compatibilities to add YML extension
2019-04-09 16:26:45 +01:00
Abhijeet Kasurde
b142b6f0e8 Move changelog entries to fragments directory (#55017)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-09 10:12:46 -04:00
Hideki Saito
377fba3d76 Fix handling of inventory and credential options for tower_job_launch (#54967)
- Fixed issue #25017,#37567
- Add example for prompt on launch
- Add integration test for prompt on launch

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-04-09 14:08:11 +01:00
Raymond Roelands
8edae1bc61 updated tests and changelog for 54516 (#54670)
* updated tests and changelog for 54516

* Handle errors if PG does not support partitioning.

* Check for PG > 10 in tasks

* Show changes for partitioned tables in ansible

* Added documentation in the tests

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Added check for 0 tables after revoking rights

* Added test and moved tests
Added check mode test and moved test right after the change.

* Rebased postgresql_privs.py
2019-04-09 13:30:06 +02:00
Christopher Snyder
09f68fc659 redhat_subscription: Fix usage of ConfigParser (#54815) 2019-04-09 09:36:51 +02:00
Jason Witkowski
87f8e37c2c Fix for neither LaunchConfigName nor LaunchTemplate existing on object (#54692) 2019-04-09 09:00:51 +10:00
Matt Martz
56ae8ebd60 Don't swallow exceptions when processing included files (#54791)
* Don't swallow exceptions when processing included files. Fixes #54786
2019-04-08 12:03:22 -04:00
Felix Fontein
7d27348356 ufw: fix default, direction is not necessary for it (#54799)
* Correct behavior so that direction isn't required for default.
* Add more tests.
* 'disabled' values cannot be changed.
* Include 'not specified' in messages.
2019-04-08 08:49:35 -04:00
Felix Fontein
e079758b31 Move refactoring steps from #54635 to own PR. (#54690) 2019-04-08 12:59:55 +01:00
Robert Osowiecki
1532e31ec0 Allow all of yum version compare operators (#54603)
* Allow all of yum version compare operators

* * yum: name="foo >= VERSION" integration test
* changelog fragment
2019-04-08 10:34:21 +02:00