Commit Graph

681 Commits (a44b62a2dd0e4df114b251dd291da97f9d68a8f6)

Author SHA1 Message Date
Arne Jørgensen a17b664b38 Fix lastpass lookup error
Fixes #42062.

(cherry picked from commit 15fb9d3bc0)
6 years ago
Josue David Hernandez e68541fa88 set ansible_os_family from name variable in os-release for clearlinux… (#49906)
* set ansible_os_family from name variable in os-release for clearlinux OS (#49639)

* set ansible_os_family from name variable in os-release for clearlinux system

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add os_family for clear linux and clear linux mixes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
(cherry picked from commit 9202ef60b0)

* Adding Changelog fragment

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
6 years ago
Matt Martz 2bd8bba297 [stable-2.7] Fix reverse_inventory order to work on python3 (#49895) (#50048)
* [stable-2.7] Fix reverse_inventory order to work on python3 (#49895)
(cherry picked from commit a0d71e7)

Co-authored-by: Matt Martz <matt@sivel.net>

* Clarify the change made to reverse_inventory
6 years ago
Felix Fontein 4561a5007b openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.

(cherry picked from commit 5c5cd2dc4d)
6 years ago
Felix Fontein 7ced444af8 openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.

(cherry picked from commit a5bf71ac6a)
6 years ago
Adam Miller 755761e3a4 Backport/2.7/50242 firewalld missing port protocol (#50493)
* Fix firewalld module failing on missing protocol. (#50242)

Under Python 3.7 at least, the split of the port field fails
ungracefully if there is no slash. The fix also addresses the
case of an empty protocol after the slash.

(cherry picked from commit 69deb73803)

* add changelog for #50242 (#50480)

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit b81a74f551)
6 years ago
Adam Miller 853d464ed1 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ca084889c7)
6 years ago
René Moser aeb9b9d37f vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment

(cherry picked from commit e761ea3f9d)
6 years ago
Simon Dodsley 44248c0ba2 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict

(cherry picked from commit 507f89e693)
6 years ago
Michael Rose 1b7908c233 influxdb_user: Fixed unhandled exception on invalid login credentials
(cherry picked from commit 498fbc88aa)
6 years ago
Matt Martz 4730aaedb0 [stable-2.7] Do not filter out exception, warnings, deprecations on failure when using debug (#47588)
* Do not filter out exception, warnings, deprecations on failure when using debug. Fixes #47576

* Add changelog fragment
(cherry picked from commit 40e5d2c)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Dag Wieers 39af3b0b60 win_updates: Correctly report changes on success (2.7 backport) (#50225)
* win_updates: Correctly report changes on success

* Add changelog fragment
6 years ago
Dag Wieers 05322334b0 win_firewall_rule: Remove invalid 'bypass' action (2.7 backport) (#50222)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
6 years ago
Miguel Duarte Barroso 27eb7b97a1 os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and
the state is absent, the module is not properly exited, leading
to a playbook execution failure.

Fixes issue #50057

(cherry picked from commit 4951e5a5b7)
6 years ago
Brian Coca 0ba93e7375 dont think all files are valid cause libs present (#50103)
verify_file was improperly always returning true if pyvimomi and requests libs were correct
  moved library checking to parse, avoid unneded errors unless the file is actually meant for
  this plugin

(cherry picked from commit 49993a55e5)
6 years ago
Ganesh Nalawade 56481b5f1b Fix mandatory statement error for junos modules (#50074)
* Fix mandatory statement error for junos modules

Fixes #40267

*  Add error regex in junos terminal plugin to error out
   in case of commit fails

*  If commit fails add logic to discard changes before existing
   else next task will result in error

* Add integration test

* Minor update

(cherry picked from commit cc8e90395a)
6 years ago
Jordan Borean b6eebb0aa3 win_copy - fix remote dir copy when it contains an empty dir (#50126)
(cherry picked from commit 65ce1b727e)
6 years ago
Brian Coca 8490588afa allow openstack invetnory to work cacheless
fixes #45431

(cherry picked from commit a47671aad1)
6 years ago
Jordan Borean 3244f9592b win_lineinfile - fix malformed returned json (#50066)
(cherry picked from commit efda3eaf1c)
6 years ago
Jordan Borean 6a76fe38e6 dnf - fix conf_file loading (#50515)
(cherry picked from commit 63e454a4b2)
6 years ago
Gregory Storme 44087c7554 [stable-2.7] fix memtotal_mb rounding on VMWare and swaptotal_mb conversion from KB to MB (#50055)
* fix facts memtotal_mb rounding on VMWare and swaptotal_mb conversion from KB to MB

(cherry picked from commit cc3e43cb20)

* add changelog fragment
6 years ago
Jérémy Lecour aa10266d55 [backport 2.7] Lineinfile must not insert lines multiples times with insertbefore/insertafter (#50084)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must
not be added again.
insertafter/insertbefore options are used only when a line is to be
inserted, to specify where it must be added.

(cherry picked from commit 31c11de2af)

* Implement the change in behaviour mentioned in the previous commit

(cherry picked from commit a4141cfa2e)

* Fix comment to reflect what the code does

(cherry picked from commit 150f5cb232)

* Set the correct return message.

In these cases, the lines are added, not replaced.

(cherry picked from commit 3216c31401)

* Add a changelog

(cherry picked from commit c39cf6b332)
6 years ago
Deepak Agrawal 913b1b0194 Backport/2.7/49922: network_cli - ansible_command_timeout not working as expected (#50068)
* network_cli - ansible_command_timeout not working as expected (#49922)

* fix for command_timeout

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>

* fix ci warning

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>

* fix review comments

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>

(cherry picked from commit 0f2f38b044)

* changelog entry for 2.7 backport

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>
6 years ago
Nathaniel Case bfa41db5f0 [2.7] Don't fail if a remote_addr with a '/' hits ansible_connection (#49781) (#50037)
* [2.7] Don't fail if a remote_addr with a '/' hits ansible_connection (#49781)

* Fail if a remote_addr with a '/' hist ansible_connection

This is _probably_ a CIDR block, but anything with a slash will fail,
so no need to try to parse to make sure

* Locks are now per-socket_path.

Locks use the same value as socket_path. Locks are also cleaned up in
shutdown like sockets.
(cherry picked from commit 61a649c)

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

* Add changelog
6 years ago
Felix Fontein 47228b8cf1 [2.7] certificate_complete_chain: fix stacktrace on parsing error (#49988)
* Fix stacktrace when fail_on_error is False and a file cannot be parsed. (#49987)


(cherry picked from commit 65d5f1a4ef)

* Add changelog.
6 years ago
Michael Rose 898ec291b0 Backport/2.7/49084 (#49973)
* influxdb_user: Fixed default password behavior (#47040)

(cherry picked from commit 1eed8900ed)

* Amends #47040 - influxdb_user - Prevents potential accidental password changes to blank (#49084)

* Amends #47040 - Prevents potential accidental password changes to blank

* Added changelog fragment

(cherry picked from commit b422c59ada)
6 years ago
Adam Miller a9fd20318c add changelog for pr #49912 (#49962)
Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 16f48bb4be)
6 years ago
Dave Bendit 5a7f7f1183 [docker_container] Fixes idempotency checks for network_mode (#49797)
Fixes #49794
6 years ago
Alexander Bethke f78a5f6332 Add changelog fragment for backported flatpak bugfixes 6 years ago
Sam Doran 17109ecedd [stable-2.7] Reboot - Fix command not found, add Apline support, fix Solaris command (#49272)
* Fix various bugs related in reboot

- Use format strings for consistency and improve debug log messages
- Use local variables instead of class attributes in order to be thread safe
- Run setup module to get distribution and version
- Run find module to get full path of shutdown command
- Use ansible_os_family and ansible_distribution to find commands and args
- Use same command for all Solaris/SunOS distributions
- Move delay calculations to properties
- Reliably check for module run failure
- Fix bug in run_test_command() that accidentally made the method work properly
- Use better exceptions rather than Exception
- Use dict literals rather than constructors
- Correct _check_delay() so it always returns a value, not None
- Don't store and return result in run_test_command() because it's not used anywhere
- add test for post reboot command that fails
- test negative values for delay parameters.
(cherry picked from commit c1589c33c4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Thomas Picariello 2f622fc336 Do not try to encode metadata if it is None (#46739)
* Do not try to encode metadata if it is None

* Add changelog fragment

* Fix fragment missing EOF line
6 years ago
Toshio Kuratomi a771ed93ab New release v2.7.5 6 years ago
Toshio Kuratomi 012d38eae6
[stable-2.7] openstack: fix parameter handling when cloud provided as dict (#42899) (#49745)
* [stable-2.7] openstack: fix parameter handling when cloud provided as dict (#42899)

* openstack: fix parameter handling when cloud provided as dict

If a cloud is provided as dictionary:

 * Do not assert that 'interface' parameter is None. Instead,
   assert that it is 'public'.
 * Assert that 'auth_type' parameter is not set.

Fixes #42858

* os_user: Include domain parameter in user lookup

If a "domain" parameter is provided, use it in looking up
whether the user already exists.

Fixes #42901

* os_user: Include domain parameter in user deletion

If a "domain" parameter is provided, use it in deleting
the user also.

Fixes #42901
(cherry picked from commit e25dac9)

Co-authored-by: Carsten Koester <carsten@ckoester.net>

* Add changelog for openstack fixes
6 years ago
Felix Fontein 2566219fc8 [2.7] docker_swarm: fix minimal API version (#49709)
* docker_swarm: fix minimal API version (#49691)

* Reduce minimally required docker API version to 1.25, with selective features requiring 1.30.

* Adjust test requirements.

* Forgot some imports.

(cherry picked from commit 495a426039)

* Add changelog for docker swarm minimum api fix
6 years ago
Brian Coca 0954942dfd ensure ssh retry respects no log (#49569) (#49724)
* ensure ssh retry respects no log (#49569)


(cherry picked from commit ba4c2ebeac)
6 years ago
Dario Zanzico 961382bf5e docker_swarm_service: ensure idempotency when the user parameter is None (#49235)
* ensure idempotency for user set to None

* Update `user` documentation and add changelog fragment

* clarify changelog fragments and parameters documentation

* use restructuredtext syntax in changelog fragment

(cherry picked from commit b183eb4464)
6 years ago
Abhijeet Kasurde d28a903fb3 VMware: update docs and return docs for vmware_host_service_facts (#49736)
Follow up of 45155

(cherry picked from commit be21140384)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Brian Coca 35f349ae10 match interpreter on stdout also (#49446)
fixes #46980

(cherry picked from commit 758ac1846b)
6 years ago
Dag Wieers 5b349773b0 mail: Fix new breakage on python 2.7 (backport) (#49222)
* mail: Fix new breakage on python 2.7

* Add changelog fragment

* Add basic SMTP testing

* Add SMTP integration tests using starttls and TLS
6 years ago
Dag Wieers 2ba095f89e aci_rest: Fix ignoring custom port 6 years ago
Yuwei Zhou 0dda61c258 Fix if the route table changed to none (#49533) (#49703)
* Fix if the route table changed to none (#49533)

(cherry picked from commit 5a59748e6c)

* add changelog
6 years ago
lrrb 06ffe7b5d8 fix: Make sure that the files excluded when extracting the archive are not checked (#45122) (#49700)
*  fix: ensure than all item of a list of excluded files aren't checked  (#45122)

* fix: ensure than list of excluded files aren't checked
* test: exclude a list of files

(cherry picked from commit 4f9f1754b4)

* added changelog
6 years ago
Toshio Kuratomi ad45bd72c1 Fix for a caching traceback
When the user specified caching plugin doesn't initialize correctly, we
were falling back to a dict.  however, dicts do not have the same
update() method as the FactCache.  We use the update method when we
update a cache with a subsequent value.  So when that combination of
things happened, the code would traceback.

In devel, we made this change to fix things: https://github.com/ansible/ansible/pull/49516
but that involves several deprecations.  So we're doing this smaller
hack in 2.7 to fix the traceback without introducing those deprecations
in a stable release.
6 years ago
Matt Martz dc9bb38d72 [stable-2.7] Make squash deprecation messages less misleading (#49551)
(cherry picked from commit 69d230f)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Thomas Picariello 768ad30fbc Fix google auth scoping for unscoped credentials (#46740)
* Fix google auth scoping for unscoped credentials

* Add changelog fragment

(cherry picked from commit c8ecac8dc2)
6 years ago
Matt Martz acdd4cbfcd [stable-2.7] Support version 3 of the redis python library (#49445)
* Support version 3 of the redis python library. Fixes #49341

* Document 2.4.5 minimum redis-py version
(cherry picked from commit 77de219)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Josue David Hernandez 1af07cc38f Fix for changes in clearlinux (#49344)
* Fix for changes in clearlinux

clearlinux is now providing /etc/os-release file and ansible is identifying as NA
then this change allow ansible to find it

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add changelog fragment for clearlinux changes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
(cherry picked from commit 6d42c5020a)
6 years ago
Abhijeet Kasurde e0f910abcb Handle special service where package is not available (#45155)
There are several services e.g. vmware-fdm, which does not have package name and
package description which will raise a error if queried for.

(cherry picked from commit b3b65d16b8)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Yuwei Zhou bc80087cca azure_rm_image: fix creation of image with data disks (#49394) (#49518)
* azure_rm_image: fix creation of image with data disks (#49394)

(cherry picked from commit 79c0e30c5a)

* Create 49394_azure_image.yml
6 years ago
mattandes 9cc7f7bcf2 Fix win_nssm credentials quoting (#48761)
* Fix win_nssm credentials quoting

Fix credential quoting for win_nssm after changes to the way nssm command is invoked in Ansible 2.7.1.

* Updating nssm command to update credentials to use Argv-ToString to properly escape password variable.

* Adding changelog fragment for fix of #48728.

(cherry picked from commit 15c5dbcc20)
6 years ago
Sam Doran 91b2347344 [stable-2.7] Use IndexError in exception (#49488)
(cherry picked from commit 6200d32c0d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Peter Sprygada 799f8e97b3 fixes an issue with dict_merge in network utils (#41107)
This change address a problem where the dict_merge function would fail
due to the value being a nested dict.  This will now recursively pass
the value back through the dict_merge function.
Merge to devel https://github.com/ansible/ansible/pull/41107

(cherry picked from commit 2a4be2748f)

Update changelog

Fix review comments
6 years ago
Abhijeet Kasurde 35d84ccc3a VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 1b04571ea0)
6 years ago
Vinay Dandekar aed38b12cd [aws] Revert back to getting the AWS role name from the URI (#49427)
* Revert back to getting the AWS role name from the URI with a small change (#49113)

- The role name and instance profile name _can_ be different
- Change the delimiter to `:` for keys that are discovered through the JSON parsing (which is not a valid delimiter for AWS IAM role names), this delimiter is still converted to underscore
- Now checks for the existence of that delimiter to remove the cases where the JSON keys are appended to the role name to find the role name

(cherry picked from commit ff9b86f560)

* Changelog update
6 years ago
Corey Wanless 949b8e991e [Backport 2.7] sets admin_password to no_log in na_ontap_cifs_server (#49412)
* sets admin_password to no_log

(cherry picked from commit 1d321cef6e)

* adds change log for ontap cifs server no_log
6 years ago
John R Barker 69e1d0f425 Backport/2.7/48933 (#49400)
* comparing StorageConnection.password breaks idempotency (#48933)

(cherry picked from commit 5cd31578cc)

* changelog
6 years ago
Adam Miller 12e088ff93 dnf module load/init dnf pkg mgr plugins properly (#49278)
* dnf module load/init dnf pkg mgr plugins properly

Fixes #45940

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 378cc9668c)
6 years ago
Pilou 2aa0f366d2 templar: ensure that exceptions are handled, fix 'AttributeError' (#48792)
* templar: ensure that exceptions are handled

* Fix AttributeError: object has no attribute 'message'

'message' attribute is deprecated since Python 2.6 and not available
with Python 3.

Simple reproducer:

    - hosts: localhost
      vars:
        not_json: "{{ 'test str' | from_json }}"
      tasks:
        - command: "echo {{ not_json }}"

(cherry picked from commit 62c05033d6)
6 years ago
joaocpinto 91d3857c36 Cast int for expire field to avoid call failure to sensu API (#33239)
(cherry picked from commit bbab4c1b49)

* Cast int for expire field to avoid call failure to sensu API (#33239)

* Add changelog
6 years ago
Dusan Matejka f017c3fa8d added changelog fragment 6 years ago
Felix Fontein 35fd7394b3 Add changelog. 6 years ago
Felix Fontein 1deb2300a4 ACME: improve error handling (#49266)
* Improve error handling: when parse_json_result is False, still return the error message.

* Remove content body from info dict.

* Add changelog.

(cherry picked from commit b842b1b97e)
6 years ago
Sam Doran 832aa98ace [stable-2.7] Improve log message in paramiko_ssh connection plugin (#49004) (#49318)
* [stable-2.7] Improve log message (#49004)

This is the only connection plugin that doesn't state explicitly what it is in the log.
(cherry picked from commit 8f9ced4005)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Add changelog
6 years ago
Ganesh Nalawade 47e0d29a59 Fix iosxr netconf plugin response namespace (#49238)
* Fix iosxr netconf plugin response namespace

*  iosxr netconf plugin removes namespace by default
   for all the responses as parsing of xml is easier
   without namepsace in iosxr module. However to validate
   the response received from device against yang model requires
   namespace to be present in resposne.
*  Add a parameter in iosxr netconf plugin to control if namespace
   should be removed from response or not.

* Fix CI issues

* Fix review comment

(cherry picked from commit 829fc0feda)
6 years ago
AlanCoding fb39299578 Fix error where pod has error and no containers
(cherry picked from commit 865430e3e0)
6 years ago
Trishna Guha 6ba1330191 changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Adam Miller eafc7fc531 require git when trying to use it in ansible-galaxy cli (#49212)
* require git when trying to use it in ansible-galaxy cli

Previously we weren't setting `required=True` when calling
`get_bin_path` and the path would return `None`, this would cause
a traceback when attempting to ' '.join() to create a string
representation of the failed command for error output

Fixes #49200

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 81540bd754)
6 years ago
Abhijeet Kasurde 6dba96c8cc Added changelog after review 6 years ago
Martin Krizek 5340549506 Warn about falling back to jinja2_native=false (#49063)
(cherry picked from commit abdf46803b)
6 years ago
Martin Krizek 660f46be13 Fix using vault encrypted data with jinja2_native (#49025)
Fixes #48950

(cherry picked from commit d4568d97d4)
6 years ago
Jonathan Hanson ba45d8a248 Fix type in ansible-galaxy info output (#49096)
Changed from 'intalled_version' to 'installed_version'

(cherry picked from commit 12a573a7db)
6 years ago
Toshio Kuratomi 81879e9792 New release v2.7.4 6 years ago
Jordan Borean 86947e6b9a powershell - add bootstrap wrapper to packaging manifest 6 years ago
Toshio Kuratomi c3c4bd2cfb New release v2.7.3 6 years ago
Sviatoslav Sydorenko cee7642188 [stable-2.7] pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403) (#49132)
* [stable-2.7] pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403)

* Fix the mistake replace from distribute to setuptools

* Add a testcase for this bug
(cherry picked from commit 93c5781)

Co-authored-by: Zhikang Zhang <zzhang63@ncsu.edu>

* Add a change note
6 years ago
Matt Davis 2f8d3fcf41
split PS wrapper and payload (CVE-2018-16859) (#49143)
* prevent scriptblock logging from logging payload contents
* added tests to verify no payload contents in PS Operational event log
* fix script action to send split-aware wrapper
* fix CLIXML error parser (return to -EncodedCommand exposed problems with it)
6 years ago
Felix Fontein 29e2454f7c docker_container: fix init option idempotency with old docker-py versions (#49078)
* Don't check options for idempotency which are not supported.

This check should be superfluous if every option would adhere to
the convention that options not specified should have value None.
Unfortunately, some options (such as init) which correspond to
container properties have an explicit default set.

(cherry picked from commit 9caaf7b109)
6 years ago
Martin Krizek 316d3abb42 Properly handle FieldAttribute.default if callable (#48992)
* Properly handle FieldAttribute.default if callable

Fixes #48673

* Add changelog...

* Add integration test

* Add aliases file

(cherry picked from commit 48ffd8789f)
6 years ago
Zeng Jie b7349b2ad4 Fix dictionary iteration exception reported in #48096 (#48836)
(cherry picked from commit a9c2bc955c)
6 years ago
Jordan Borean 7e32f1ffb0 [ec2_group] fix comparison of determining which rules to purge - 2.7 (#48967)
* Added changelog fragment

* Fix comparison of determining which rules to purge by ignoring descriptions (#48443)

AWS uses rule type, protocol, port range, and source as an idempotent identifier.
There can only be one rule with that unique combination. Rules that differ only by description are allowed but overwritten by AWS.
Add a test

Co-authored-by: Will Thames <will@thames.id.au>
(cherry picked from commit 54a2f21f93)
6 years ago
Abhijeet Kasurde 24eb3c5c60 [Backport 2.7] wait_for: Add note about path and port (#49118)
Document that Path and Port are mutually exclusive parameters in the wait_for module.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 70f992c618)
6 years ago
Anton Nikulin 02a8121dea [stable-2.7] FTD HTTP Api plugin bug fixes (#47747) (#48982)
* FTD modules: upsert functionality and bug fixes (#47747)

* FTD modules: bug fixes and upsert functionality

* Fix sanity checks

* Fix unit tests for Python 2.6

* Log status code for login/logout

* Use string formatting in logging

(cherry picked from commit 9770ac70f9)

* Add changelog entry
6 years ago
Jordan Borean 845776ed6a win_security_policy - add warning when using this module ot edit rights (#48850)
(cherry picked from commit 9b0dd5224b)
6 years ago
Adam Miller 64cea41f6b dnf to support modularity module appstream specs
Fixes #48743

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 4a06e95671)

fix up sanity tests and with_modules conditional

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 23b60035a1)

fix yamllint sanity

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 2b878546d3)

fix group-missing/invalid-group detection

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 41176b5e0f)
6 years ago
nervo 1cba0a753a Sysvinit - Enabling a service should use "defaults" if no runlevels are specified 6 years ago
Brian Coca 1469ec4487 better handling of bad type in config (#48821)
* better handling of bad type in config

 fixes #22468, fixes #22476


(cherry picked from commit 87e44a7ed1)
6 years ago
Brian Coca f8339bd9c0 fix bug in config mgr
- use function that creates config slots as needed

(cherry picked from commit 652da82558)
6 years ago
Maciej Delmanowski a22a283156 Add changelog fragment about 'apt_key' no TTY fix 6 years ago
John R Barker 6b3619da9e Backport/2.7/46044 Make puppet module useable on puppet 6 (#48871)
* Make puppet module useable on puppet 6 (#46044)

The unused ignorecache setting has been removed and so you
can't run puppet through this module anymore.

See PUP-8533 / https://tickets.puppetlabs.com/browse/PUP-8533
(cherry picked from commit 475d69da69)

* changelog
6 years ago
Dave Bendit 51a3d60991 [docker_network] Add handling for Python booleans in driver_options
Fixes #26708
6 years ago
René Moser de12161dea cs_template: fix KeyError on state=extracted (#48675)
* cs_template: fix KeyError on state=extracted

* add changelog

(cherry picked from commit c7c3ca1c41)
6 years ago
Adam Miller 295174b3fd make yum update_only option actually work (#47942)
* make yum update_only option actually work

Fixes #40615

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

* fix changlog fragment for sanity check

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

* only attempt an update when there are packages to update

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

* fix logic to properly handle the precedent of operations

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

* remove q debug statements

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 34fc66185e)
6 years ago
Toshio Kuratomi fa0af52765 New release v2.7.2 6 years ago
Felix Fontein ce9f2e6147 docker_container: fix tests and idempotency for init and shm_size (#48551)
* Fix tests: use same command if not testing command option.

* Fix idempotency of init option.

* Fix shm_size idempotency (it is included in inspect results from docker API version 1.22 on).

* Add changelog.

(cherry picked from commit b1acabcd03)
6 years ago
Jiri Tyr 476673f3e4 [stable-2.7] Support .yaml extension for meta file (#46505)
(cherry picked from commit e4cadddd70)
6 years ago
Felix Fontein 28290ee1e5 [2.7] docker_container: make condition less specific (#48593)
* docker_container: make condition less specific (#48590)

* Code seems to have changed from 409 to 400, so let's not check the code.

* Unpause container before removing it.

* Improve code.

* Same for stop_container.

(cherry picked from commit f3a3f42490)

* Add changelog.
6 years ago
Mariusz Mazur 642cd53857 k8s_facts: fix handling of unknown resource types (#47857)
(cherry picked from commit a5c8e952e8)
6 years ago
Ali 84db20ea07 Updated documentation for the k8s module
(cherry picked from commit 0b15e1df9c)
6 years ago
Jose Delarosa dc21c0c0b0 Do not reboot after updating BIOS configuration
(cherry picked from commit 2b74a17996)
6 years ago
René Moser 99104c25ed vultr_server_facts: add tests and changelog for firewall group fix in #48342 (#48411)
(cherry picked from commit 9050c7abeb)
6 years ago
Dario Zanzico a08d0eab32 clarify port.mode paramter requiremets, fail if unmet (#47938)
* clarify port.mode paramter requiremets, fail if unmet

* changelog fragment

* shorten too long line

* remove unnecessary indentation

* test version on docker_version for better maintainability

* normalize imports

* changelog fragment: minor_changes -> bugfixes

* rollback e96a7e57dfefd566fa47cf465a759637affd4795

* typo

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

(cherry picked from commit 89bcd3ff1e)
6 years ago
Felix Fontein b126a21963 Docker volume fix labels (#48536)
* Add integration test for labels (which fails).

* Changing labels from list to dict.

* Add changelog.

(cherry picked from commit feb60b947c)
6 years ago
Abhijeet Kasurde 709845436e Update plugin filter documentation (#46665)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6d36849f72)
6 years ago
Andrea Tartaglia 50e6361c3f (Backport) ec2_instance, ebs_optimized not sub-option of network (#48467)
* ec2_instance: ebs_optimized is not sub-option of 'network' (#48341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI

(cherry picked from commit b7d9feb7dc)

* Added changlog fragment for PR #48341

* fixed yaml errors in changelog
6 years ago
Eric Matysek 483226cdce Fix consistency issue in grafana_dashboard module. (#47459)
* Move check for 'dashboard' key to before the create/update if statement.
* Add changelog fragment for PR #47459

(cherry picked from commit 880762e07e)
6 years ago
Daniel Shepherd 1abd90e3e6 Backport/2.7/47695 - pamd fixes (#48307)
* pamd: fixes for multiple issues (#47695)

* Providing fix for #47083 in pamd.py

* Providing fix for #47197

* Fixing pep8 errors

* update regex to account for leading dash and VALID_TYPES with dashes as well

* use a results dictionary and clean up unnecessary items

* remove unnessecary return value. action is already reported in invocation output

* make naming consistent across action returns

* fix comparison so it checks equality instead of identity and indentation in update_rule()

* make sure file always has EOF newline

* updated regex to skip spacing between path and args and add rule arg regex to capture complex args

* new module argument parsing code in function and DRY changes

* remove unused has_rule method on PamdService class

* fix error in parse_module_arguments()

* updated args_present action to make it handle key value args and fail on complex bracketed arguments

* pep8 and other fixes so units still work

* suggested change - make version removed 2.8

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

* add more error proof test to if statement

(cherry picked from commit ef690e928f)

* add changelog fragment for backport

* add action return value back for backport
6 years ago
Strahinja Kustudic f027f44ce4 [stable-2.7] Fix pip idempotence in check mode
PIP package names must be case insensitive, and must consider hyphens
and underscores to be equivalent
(https://www.python.org/dev/peps/pep-0426/#name), because of this the
module didn't work correctly in check mode. For example if the passed
package name had a different case or an underscore instead of a hyphen
(or the other way around) compared to the installed package, check mode
reported as changed, even though packages were installed. Now the module
ignores case and hyphens/underscores in package names, so check mode
works correctly.
(cherry picked from commit b89b688)

Co-authored-by: Strahinja Kustudic <kustodian@gmail.com>
6 years ago
Felix Fontein 33ccd3b78d [2.7] Fix advertise addr (#48405)
* Fix advertise addr (#47608)

* Fix issue #46326

* Update example to create a default swarm

(cherry picked from commit 87de2dde9f)

* Add changelog.
6 years ago
Christopher Gadd 264bc930ef [stable-2.7] make password locking in user module idempotent (#43671)
* Simplify logic and add FreeBSD & NetBSD

* Remove incorrect flag for lock and unlock on FreeBSD

* Add tests and changelog

Co-authored-by: Chris Gadd <gaddman@email.com>
(cherry picked from commit f75a84e382)

Co-authored-by: Christopher Gadd <gaddman@email.com>
6 years ago
Stefan Siegel 8cd7970b98 [stable-2.7] Always use /proc/sys/kernel/random/boot_id to confirm reboot on Linux (#47017)
* Always use /proc/sys/kernel/random/boot_id to confirm reboot on Linux

/proc/sys/kernel/random/boot_id is available since kernel 2.3.16 and
should be safe to rely on.

The previously used method by checking the system boot time using who -b
turned out to be unreliable: Some systems lacking an RTC report the Unix
epoch as boot time, but the code trying to detect that did't always
work.

Closes #46562

* Change DEFAULT_BOOT_TIME_COMMAND

- change to usinsg /proc by default
- add BOOT_TIME_COMMANDS for BSD, Solaris, and macOS
(cherry picked from commit ae7b9ea8cd)

Co-authored-by: Stefan Siegel <ssiegel@sdas.net>
6 years ago
Sam Doran 985d0b8ac5 [stable-2.7] Prevent duplicate entries in rhsm_repository module (#48107)
* Complie regular expressions for better performance

* Skip on empty lines

This fixes a bug where the previous repo would be inserted in the result twice since an empty line did not match any of the conditions that would exit the loop iteration.
(cherry picked from commit 1e3b704ff1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Martin Krizek 9138a95402 [stable-2.7] user: fix removing the expiry time when it's 0 (#47115)
* user: fix removing the expiry time when it's 0

* Improve tests and add changelog

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit 41dfc5162f)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
6 years ago
Adam Miller 4156d01c01 yum also parse obsolete package output (#45365)
* yum also parse obsolete package output

This is a rebase of the patch originally proposed in
https://github.com/ansible/ansible/pull/40001 by machacekondra

Fixes #39978

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

* properly parse the obsoletes, provide a new output entry, add changelog

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

* make pep8 happy

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

* remove q debugging output

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 091fb1dc3f)
6 years ago
Jose Delarosa 7f29557016 Provide flexibility when retrieving facts (#46148)
* Provide flexibility when retrieving facts

* Check if keys exist before trying to read

(cherry picked from commit 81640a2c67)
6 years ago
Konstantin Shalygin 0ee072fffc mail: fixed STARTTLS module working with python 3.7.0 (#47412)
(cherry picked from commit 8c9070ec05)
6 years ago
Deepak Agrawal 71ee1adf0b Backport/2.7/48148: net_put module leaves empty files behind (#48151)
* cleanp net_put temp file (#48148)

(cherry picked from commit d2c7665be9)

* add changelog entry
6 years ago
René Moser b000c1633d vultr: fix for API returned unexpected empty list (#48036)
* vultr: fix for API returned unexpected empty list

* add changelog

(cherry picked from commit 788247583b)
6 years ago
Jordan Borean 90fe1be33a win_uri: stop output from mixing with module result (#48140)
(cherry picked from commit 8a9d7b3695)
6 years ago
Adam Miller 3a14fe35e9 Correct yum and dnf autoremove behavior (#47902)
* Correct yum and dnf autoremove behavior

Sanity check args passed to autoremove

Fixes #47184

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

* fix docs

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 1c777976c5)
6 years ago
Sam Doran bab062d639 [stable-2.7] User module - allow bang and exclamation in password field without warning (#46498)
* Allow bang and exclamation without warning

Allow the password field to be ! or * without warning when using this feature to create accounts that are locked.

Add documentation  and tests to cover this.

* Use set() rather than braces for Python 2.6
(cherry picked from commit 066af3b6ca)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Chris Archibald 12271999e2 Backport/2.7/47621 (#48129)
* NetApp bugfix for na_ontap_snapmirror (#47621)

* Bug fixes for Snapmirror

* Bug fixes for Snapmirror

(cherry picked from commit 8f3e297d7d)

* add fragment
6 years ago
Chris Archibald 23851bc8fe Fix argument_spec for modules that are using the old version (#47693) (#48127)
* Fix argument_spec for modules that are using the old version (#47693)

* Use correct argument spec

(cherry picked from commit 0cf88809ef)

* Add fragment
6 years ago
Matt Martz 0be3307bac [stable-2.7] Fix return statement where we short circuit _get_delegated_vars (#48102)
(cherry picked from commit cb5626c)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Dag Wieers 5dfd7c181f [2.7] aci_iplpg: Support missing aep (#48115)
* aci_iplpg: Support missing aep

* Adapt integration tests to fix

* Add changelog fragment

* Fix PEP8 issue
6 years ago
Dag Wieers c78945d184 Add changelog fragment 6 years ago
Jesse Pretorius d4152e161d Add issue 47301 changelog fragment 6 years ago
Dag Wieers ac2c1a89a8 aci_switch_leaf_selector: Support empty policy_group 6 years ago
Felix Fontein b0b9b4f7dd docker_container: fix container removal when auto_remove is used (#48061)
* Fix container removal when auto_remove is used.

(cherry picked from commit af2b477950)
6 years ago
John R Barker 9ac8763df2 ldap_attr bugfix (#48009) (#48106)
* ldap_attr bugfix (#48009)

(cherry picked from commit ee13bc248b)

* changelog
6 years ago
Felix Fontein 0742f00c29 docker_container: fix paused and add some tests (#47900)
* cleanup is already tested.

* Add test for paused.

* Add recreate and restart tests.

* timeout is a common docker option

* Implement paused and fix paused test.

* Add changelog.

* Improve paused test.

(cherry picked from commit 65768b996d)
6 years ago
Artem Goncharov 953568e213 fix missing exceptions openstack modules (#48088)
* Fix missing exceptions (#45775)

* Replace non-existing OpenStackCloudTimeout exception. Fixes: #45151

* Replace OpenStackCloudURINotFound that doesn't exist in the 'exceptions' module

(cherry picked from commit eb39c461ce)

* add changelog
6 years ago
Felix Fontein fb551bf62c docker_container: simplify minimal required version per option handling (#47711)
* Store parsed docker-py / docker API versions in client.

* Began refactoring 'minimal required version' for docker_container options.

* Removing some fake defaults.

* Added changelog.

* Improve tests (check older docker versions).

* Fix comparison. The breaking point is not docker-py 2.0.0, but 1.10.0.

(Verified by testing with these versions.)

* Move docker-py/API version detection to setup_docker.

* Add YAML document starter.

* docker_network requirement for docker-py was bumped to 1.10.0 in #47492.

(cherry picked from commit 3cca4185be)
6 years ago
Felix Fontein 5153286719 docker_container: fix ipc_mode and pid_mode idempotency (#47997)
* Fix ipc_mode and pid_mode idempotency when container names are used.

* Add changelog.

* Update pid_mode documentation.

(cherry picked from commit 35809e99bc)
6 years ago
Trishna Guha c63c4273df changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Trishna Guha ff467a2bdf Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Felix Fontein 080aa35c5b ACME: add support for POST-as-GET if GET fails with 405. (#44988)
* Add support for POST-as-GET if GET fails with 405.

* Bumping ACME test container version to 1.4. This includes letsencrypt/pebble#162 and letsencrypt/pebble#168.

* Also use POST-as-GET for account data retrival.

This is not yet supported by any ACME server (see letsencrypt/pebble#171),
so we fall back to a regular empty update if a 'malformedRequest' error is
returned.

* Using newest ACME test container image.

Includes letsencrypt/pebble#171 and letsencrypt/pebble#172, which make Pebble behave closer to the current specs.

* Remove workaround for old Pebble version.

* Add changelog entry.

* First try POST-as-GET, then fall back to unauthenticated GET.

(cherry picked from commit 92d9569bc9)
6 years ago
Abhijeet Kasurde 949ffe6da7 VMware: Handle exception for no snapshot while cloning (#47924)
Handle exception when there is no snapshot available in virtual machine or template while cloning using vmware_guest.

Fixes: #47920

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 487f2f25ce)
6 years ago
Abhijeet Kasurde 2f55215db2 VMware: improve readability and fix privileges names on scenario_clone_template (#47960)
(cherry picked from commit 89f03314ce)
6 years ago
Brian Coca 71ad7da2f8 remove redundant md5 hashing
(cherry picked from commit d590f10d32)
6 years ago
Abhijeet Kasurde c18eb52ade VMware: Fix documentation for cloning template (#47847)
Fixes: #46700

(cherry picked from commit ab0d90f882)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jacob e6ed883ffd [backport 2.7] Fixes HTTP redirect issue (#45513) (#47822)
* Fixes HTTP redirect issue (#45513)

(cherry picked from commit e701b5a412)

* add changelog fragment
6 years ago
Michał Siemek 951572bec1 [backport 2.7] Check if `enabled_snat` is set in modules arguments (#46754) (#47807)
* Check if `enabled_snat` is set in modules arguments (#46754)

If `enabled_snat` is not set at all in module arguments but Neutron
policy sets it by default in Openstack, then `os_router` will attempt to
recreate otherwise perfectly good router.

Follow up for https://github.com/ansible/ansible/issues/44432#issuecomment-428531031

(cherry picked from commit c2b7174d31)

* Add changelog entry
6 years ago
Jacob 01c0a6d699 [backport 2.7] Fix idempotency issues in set_bios_attributes (#47802)
* Fix idempotency issues in set_bios_attributes

- Added check to see if attribute even exists, if not, it exits.
- Then checks if attribute is already set to value we want to update
  it to. If yes, then it exits and changed=False
- Otherwise updates the attribute and changed=True

(cherry picked from commit 1c37471274)

* add changelog fragment
6 years ago
Toshio Kuratomi 8a240ed54d [stable-2.7] Fix password lookup for FIPS
Fixes #47297
(cherry picked from commit 9906daa)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Abhijeet Kasurde 1293076d7b plugin_filter: check for type error (#46664)
* Parsing plugin filter may raise TypeError, gracefully handle this exception
and let user know about the syntax error in plugin filter file.

* Test for plugin_filtering

Fixes: #46658

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit b32b4111b2)
6 years ago
Martin Krizek 44088ef64d yum: fix 'package == version' syntax (#47744)
(cherry picked from commit 4b8f2c99d2)
6 years ago
Abhijeet Kasurde 009a3b34bc VMware: correct logic to pass ESXi SSL thumbprint (#47600)
Due to refactoring of task_error and wait_for_task method,
SSL thumbprint was lost in error message. This fixes the
retry mechanism of AddHost task.

Fixes: #47563

(cherry picked from commit e7c83d6aa9)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 08324198da docker_container: improve race condition behavior for detach:no, auto_remove:yes behavior (#47712)
* Don't die when get_container is called for container which is terminating during get_container call.

If it terminates between client.containers() and client.inspect_container(),
the module will fail with an error such as
    Error inspecting container: 404 Client Error: Not Found ("No such container: xxx")

* Add changelog.

(cherry picked from commit b9706e2ff5)
6 years ago
John R Barker 5bacb732ce Backport/2.7/44324 Fixes #30599 ini_file module: Options within no section managed (#47741)
* Addresses comments in #38971 (#44324)

* Controlled params within no section

* Added tests to control params within no section

* Cleaning output_file before creating no-section params and check the content

* addresses comment in PR "s/hate/beverage/g"

(cherry picked from commit d3fe6c01f2)

* 44324-ini_file
6 years ago
Abhijeet Kasurde f94ee89545 VMware: restore timeout in set_vm_power_state operation (#47723)
'state_change_timeout' parameter was removed, this introduced
regression.

Fixes: #47722

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a87a62ba8a)
6 years ago
Matt Martz 414ee4759d [stable-2.7] Add missing self._supports_async to uri action plugin (#47677)
* Add missing self._supports_async to uri action plugin. Fixes #47660

* Additional changes needed to support async

* Missed a call to execute_module
(cherry picked from commit 3633e21)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Ondra Machacek 6cf1814105 ovirt_host_pm: Fix to powermanagement module (#47659)
This PR is fixing following issues:

 1) Don't try to check password.
 2) Check options.
 3) Order wasn't adding at the end, as doc says.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Jim Gu 853236d650 VMware: Avoid misleading PyVmomi error if requests import fails
* Avoid misleading PyVmomi error if requests import fails

Requests is imported by the VMware module_utils as an external
dependency; however, because it is in a try/catch block containing the
imports for PyVmomi, if requests fails to import properly, Ansible will
instead complain about PyVmomi not being installed.

By moving the import outside of the try/catch block, if requests fails
to import, an error like the following will be returned:

    ImportError: No module named requests

This should result in less confusion.

* catch requests ImportError

Signed-off-by: Jim Gu <jim@jimgu.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 99ee30768a)
6 years ago
Abhijeet Kasurde b8cc4a3046 doc: Scenario guide for VMware HTTP API usage (#47686)
This adds scenario guide for using VMware HTTP API using uri module.

(cherry picked from commit e5318c5c4f)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ondra Machacek 0dc15986c2 ovirt_host_network: Fix type conversion
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Martin Krizek f17cd83826 2.7: adds 'success_msg' to valid args for assert module (#47030) (#47584)
* adds 'success_msg' to valid args for assert module (#47030)


(cherry picked from commit 0661f2f213)

* Add changelog
6 years ago
Nathaniel Case ffe80a14f6 [2.7] ios check_rc: Default to sending text of exception, not the whole exception (#47300)
* Default to sending text of exception, not the whole exception
(cherry picked from commit 6a866a5)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
6 years ago
Florian Apolloner be05dcdbfb Backport/2.7/46157 (#47558)
* Changed django_manage to return changed as boolean consistently (#46157)


(cherry picked from commit ecdcb6a09f)

* Added changelog for previous change.
6 years ago
Toshio Kuratomi c963ef1dfb New release v2.7.1 6 years ago
Will Thames 1c9551f93d Use kubeconfig if either context or kubeconfig is set (#47373) (#47496)
* Use kubeconfig if either context or kubeconfig is set (#47373)

kubeconfig should be loaded if *either* or both of context
or kubeconfig is set (this allows picking a context and default
kubeconfig or picking a kubeconfig with default context)

Fixes #47149

(cherry picked from commit 00ccad9764)

* Add changelog for k8s auth config fix
6 years ago
Dag Wieers 136da25bbf WinRM/PSRP: Ensure shell returns UTF-8 output (#47404)
* WinRM/PSRP: Ensure shell returns UTF-8 output

This PR makes UTF-8 output work in PSRP shells.

* Add win_command and win_shell integration tests

* Fix tests

* more test fixes

(cherry picked from commit 691ff4b9e6)
6 years ago
Jordan Borean 1626b4c5cb psrp - fix unicode handling in Python 2 (#47461)
* psrp - fix unicode handling in Python 2

* skip psrp become test when on Server 2008

(cherry picked from commit f28b7c7ab1)
6 years ago
Adam Miller 96b57a5c7a dnf properly gpg check local packages based on param (#47455)
* dnf properly gpg check local packages based on param

Fixes #43624

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 079705f8da)
6 years ago
Adam Miller 916b1e34bd don't restrict disable_excludes choices incorrectly (#47453)
* don't restrict disable_excludes choices incorrectly

Fixes #47085

(cherry picked from commit 0e3e646189)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Matt Martz 8a40514d2b [stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372 (#47510).
(cherry picked from commit f6ecdf0b87)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Matt Martz 376b199c05 [stable-2.7] Ensure we don't overwrite roles from include/import_role when loading the play (#47512)
* Ensure we don't overwrite roles from include/import_role when loading the play. Fixes #47454

* Add changelog fragment
(cherry picked from commit d5e4f37)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Nathaniel Case 18f07e828e [2.7] escape default prompt detection in telnet action plugin (#46573) (#47440)
* [2.7] escape default prompt detection in telnet action plugin (#46573)

This change fixes an issue with the default prompt handling.  The value
needs to be escaped otherwise it does not work when converted to bytes.
(cherry picked from commit 9180d2c)

Co-authored-by: Peter Sprygada <privateip@users.noreply.github.com>

* Add changelog
6 years ago
Ondra Machacek a9128b9fb0 ovirt_vm: Check next_run configuration update if exist
This PR fixes the update check method so it now check also the next_run
configuration of the virtual machine if it exists.

So if previously the VM was updated with new parameters, and then reset
back, the module didn't set the parameters to be set back in next_run.
This PR fixes it so the next run configuration is set back with proper
parameters.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1639894
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Sviatoslav Sydorenko 702820d673 [stable-2.7] Fix problem where pip module cannot accept multiple extras (#47449)
* [stable-2.7] Fix problem where pip module cannot accept multiple extras

PR #46937
Fixes #46519
(cherry picked from commit b697da3)

Co-authored-by: Zhikang Zhang <zzhang63@ncsu.edu>

* Add changelog
6 years ago
Nathaniel Case 238939b523 [2.7] fix error checking if netns exists (#47397) (#47441)
* [2.7] fix error checking if netns exists (#47397)

This patch fixes an error that occurs when attempting to see if the
netns already exists on the remote device.  This change will now execute
`ip netns list` and check if the desired namespace is in the output.

Signed-off-by: Peter Sprygada <psprygada@ansible.com>
(cherry picked from commit 299a5e4)

Co-authored-by: Peter Sprygada <privateip@users.noreply.github.com>

* Add changelog entry
6 years ago
Dan b5a887aa5e Fix nxos_ospf_vrf module auto-cost idempotency and module check mode (#47190)
* fixing idempotency and check mode

* modified to avoid repetitive code

(cherry picked from commit dcb35c4270)
6 years ago
Trishna Guha 039cde8460 Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Felix Fontein f0a706e4a0 docker_container: fix interaction of detach:no with auto_remove:yes (#47396)
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.

* Add tests.

* Added changelog.

(cherry picked from commit 3afdb28209)
6 years ago
Felix Fontein cb347c2096 [2.7] Fixes #33045: get existing containers in a network via inspect_network (Rebased #33048) (#47472)
* Fix #33045: get existing network via inspect_network (Rebased #33048) (#43997)


(cherry picked from commit 2939f68897)

* Add changelog.
6 years ago
Felix Fontein f4081c2d97 docker_container: warn if ipvX_address is used for networks but not supported by docker-py (#47395)
* Only add parameters which are actually used.

* Fail if ipvX_address is used when not supported.

* Added changelog.

(cherry picked from commit 4ffe3b14d4)
6 years ago
bverschueren 719b99a96e ovirt_host_network: check for empty user_opts (#46695)
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Nijin Ashok c91139bde3 ovirt_vm: Fix issue in SSO option
Currently the module will disable the SSO if we didn't pass any
value for SSO option. The PR fixes the same.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Felix Fontein 1d60d34b82 Fix option change detection / force support for docker_volume. (#47390) 6 years ago
Dusan Matejka 816eee2c1e [2.7] zabbix_host: backport of #46521 (#47477)
* zabbix_host: fix link template error (#46521)

* add host interface before link template

(cherry picked from commit 5a35907b71)

* added changelog
6 years ago
Ganesh Nalawade 47f2352d33 Fix prompt mismatch issue for ios (#47004)
* Fix prompt mismatch issue for ios

Fixes #40884 #44463 #46082

*  If the command prompt is matched check if data is
   still pending to be read from buffer.
*  This fix adds a new timer `buffer_read_timeout`
   which will be trigerred after command prompt
   is matched and data is attempted to be read from channel.
   If not data is present of channel the timer will expire
   and response we be returned to calling function.

* Update doc

* Fix review comments

* Update changelog

* Fix unit test CI failure

(cherry picked from commit 335a979f1d)
6 years ago
Adam Miller 2d39ad036e fix yum proxy username/password handling (#47435)
* fix yum proxy username/password handling

Fixes #46249

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit e4a4357322)

* add backport changelog
6 years ago
Ondra Machacek c204214df4 ovirt_vm: Fix initialization of cloud init
Fixes: https://github.com/ansible/ansible/issues/45900

This PR fixes the case when the cloud_init_persist was used, but we
still sent use_cloud_init=False, which is in oVirt API evaluated as not
to use cloud_init in first VM execution. This patch is changing it to
send just None, instead of False.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Nijin Ashok 025c183307 ovirt_vm: Fix issue in setting the custom_compatibility_version to NULL
Currently there is no way to reset the custom_compatibility_version to
NULL. If we provide a empty string('') to custom_compatibility_version,
it will fail with error "IndexError: list index out of range" at _get_minor
function.

To reset the custom_compatibility_version, we have to pass None value to
types.Version. The PR fixes the same.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Toshio Kuratomi 3b2a0de548 [stable-2.7] Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba.

The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform.  Tests need to be rewritten.
(cherry picked from commit ccabc2bff5)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Yuwei Zhou ab1834f035 Fix auto scale create with fix date without recurrence (#47186) (#47258)
* Fix auto scale create with fix date without  recurrence (#47186)

* Fix auto scale create with fix date without  recurrence

* fix indent

(cherry picked from commit 9258ffa478)

* Create azure_rm_autoscale-fixed_date.yml changelog
6 years ago
Will Thames bac6f99608 Ensure that k8s_facts always returns resources key (#46733) (#47253)
* Ensure that k8s_facts always returns resources key (#46733)

Fix bug returning `items` key if NotFound exception is hit

(cherry picked from commit b772485d97)

* Add changelog for k8s_facts fix
6 years ago
Daniel Shepherd 1a4604361f pamd: add delete=False to NamedTemporaryFile() (#47281)
* add delete=False to NamedTemporaryFile and remove print statement from module

* add changelog fragment

* use module.tmpdir from (#47133) and add changelog fragment for it as well

(cherry picked from commit c67ab296bb)
6 years ago
Martin Krizek b618339c32 2.7: user: do not pass ssh_key_passphrase on cmdline (#47445)
* user: do not pass ssh_key_passphrase on cmdline

CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit a0aa53d1a1)

* Ignore user module use of subprocess.

(cherry picked from commit 8d00afc013)

* Fix python3 problem in user module cve fix

(cherry picked from commit 9088671c4e)

* Fix changelog entry for user module CVE fix

(cherry picked from commit 210a43ebeb)
6 years ago
Adam Miller b14c45a16c Handle dnf immutable mutable datatypes (#47434)
* Handle dnf immutable mutable datatypes

In DNF < 3.0 are lists, and modifying them works
In DNF >= 3.0 < 3.6 are lists, but modifying them doesn't work
In DNF >= 3.6 have been turned into tuples, to communicate that
modifying them doesn't work

Further explanation of this is available via Adam Williamson from
the Fedora QA Team.

    https://www.happyassassin.net/2018/06/27/adams-debugging-adventures-the-immutable-mutable-object/

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 70025e7b56)

* add backport changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Toshio Kuratomi 7812c065f4 Revert "Fix prompt mismatch issue for ios (#47004)"
This reverts commit 17cd01589a.

This commit was not passing CI.  Reverting
6 years ago
Dag Wieers 44ae37d78b mail: Fix regression when sending mail without SSL (v2.7) (#47019)
* mail: Fix regression when sending mail without SSL (v2.7)

When this module was refactored in #37098 the non-SSL use-case was broken.

The main cause is that we have no way to do integration tests for testing SMTP.

This is a back-port to v2.7 of #46403

* Add changelog fragment
6 years ago
Matt Martz 0e933f76ba [stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372.
(cherry picked from commit c58de75f38)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Pablo ce16286dee [stable-2.7] Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler

Fix #47287
(cherry picked from commit 6497049)

Co-authored-by: Pablo <pablorf.dev@outlook.com>
6 years ago
Ganesh Nalawade 17cd01589a Fix prompt mismatch issue for ios (#47004)
* Fix prompt mismatch issue for ios

Fixes #40884 #44463

*  If the command prompt is matched check if data is
   still pending to be read from buffer.
*  This fix adds a new timer `buffer_read_timeout`
   which will be trigerred after command prompt
   is matched and data is attempted to be read from channel.
   If not data is present of channel the timer will expire
   and response we be returned to calling function.

* Fix unit test failure

* Update to make buffer timeout float

* Update doc and fix review comment

* Fix CI issues

* Update doc

* Fix review comments

* Update changelog

(cherry picked from commit 335a979f1d)
6 years ago
Martin Krizek 57c25636d8 2.7: yum/dnf: fail when space separated string of names (#47109) (#47414)
* yum/dnf: fail when space separated string of names (#47109)

* yum/dnf: fail when space separated string of names

* Groups allow spaces in names

(cherry picked from commit e8b6864e21)

* Add changelog
6 years ago
Jonathan Oddy d130c166ad Fix AWS EC2 inventory plugin caching of groups (#46961)
* Fix AWS EC2 inventory plugin caching of groups

* Added changelog fragment for aws_ec2 caching fix

* Store the AWS query results

The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.

* Remove unused functions

(cherry picked from commit 7ba09adee1)
6 years ago
Dag Wieers 5a0e016b4b psexec: Handle socket errors (Connection timeout) (Backport) (#47407)
* psexec: Handle socket errors (Connection timeout)

This ensures we get a nicer error message from psexec.

* Add changelog fragment
6 years ago
Jordan Borean a636562818 psexec: better error on import failure (#47327)
(cherry picked from commit 013c44484a)
6 years ago
Felix Fontein 69568b4ca8 [2.7] docker_container: fix memory_swappiness documentation (#47378)
* Documentation for docker_container: fix documentation for memory_swappiness. Default value will not equal 0, it will be inherited from the host machine (#47296)


(cherry picked from commit 4c2efa4b67)

* Add changelog.
6 years ago
Nathaniel Case 7d936c12fd [2.7] Update some cliconf plugins (#47141) (#47310)
* [2.7] Update some cliconf plugins (#47141)

* Add `check_all` to many community cliconf plugins
(cherry picked from commit 7844a40)

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

* Add changelog entry
6 years ago
Matt Martz f1db8985e3 [stable-2.7] Don't use the task for a cache, return a special cache var (#47243)
* Don't use task to cache loop results, use hostvars. Fixes #47207

* Avoid a race condition, supply _ansible_loop_cache through get_vars directly

* Add tests

* Add changelog fragment

* Remove unnecessary copy

* Remove unnecessary host from _get_delegated_vars signature.
(cherry picked from commit 77d32b8f57)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Martin Krizek 46c217feda Do not strip new lines in native jinja (#46751)
* Do not strip new lines in native jinja

* Add changelog/fragment

(cherry picked from commit 541255a2d8)
6 years ago
Felix Fontein f7c5c466be Add changelog. 6 years ago
Per-Henrik Lundblom d82c5fb55f [aws] ec2_vol_facts: only access volume tags when set (#46801)
(cherry picked from commit e744c83808)
6 years ago
Jordan Borean 7690659f7f openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
6 years ago
Dani Hodovic 28ed7f722e docker_service: parse scale parameter correctly to 2.7 (#47239)
* fix: Parse docker_service scale parameter to int (#45508)

* Changelog: add fragment for docker_service scale fix
6 years ago
Fran Fitzpatrick 24d7ccd182 Backport: junos terminal regex prompt fix to v2.7 (#47203)
* Fix junos terminal regex (#47096)

Fix junos stdout regex

Change at hing

(cherry picked from commit fc341e01fa)

* Changelog: adds fragment for junos fix terminal
prompt regex

* Proper yaml formatting
6 years ago
Jordan Borean 20fc17a55f postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
6 years ago
Matt Martz 20c1cf41a4 [stable-2.7] Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060)
(cherry picked from commit c3d5779)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Brian Coca b2381cfac9 fixes to ansible-doc (#47209)
* Adoc fixes (#47137)
* removed hardcoded loader/plugins list
* updated a few errors to keep orig object
* fix httpapi/cliconf listing
* ansible-doc fixes
* show undocumented as UNDOCUMENTEd
* added missing undoc

(cherry picked from commit fce9673ac1)

* An earlier optimization of ansible-doc -l caused failures. (#47012)
The optimization quickly searches the plugin code for short_description
fields and then uses that in the -l output.  The searching was a bit too
naive and ended up pulling out malformed yaml.  This caused those
plugins to be omitted from the list of plugins of that type with
a warning that their documentation strings were wrong.

This change makes the documentation parser aware that the documentation
string could have a relative indent for all of its fields which makes it
robust in the face of this particular problem.

* Don't search for space after short_description:

Any whitespace would be valid.  In particular newline

(cherry picked from commit 61ae6424a3)
6 years ago
Jonathan Oddy 60e7f43998 [stable-2.7] Restore SIGPIPE handler to DFL on POpen
Python sets the SIGPIPE handler to SIG_IGN. On execv() signal handlers are
reset to their defaults, EXCEPT those that are SIG_IGN which are left ignored.
In Python 3 subprocess.popen explicitly resets the SIGPIPE handler to SIG_DFL,
but unfortunately in Python 2.7 it does not. This leads to subprocesses being
executed with SIGPIPE ignored. This is often a problem with bash scripts which
rely on SIGPIPE to terminate commands in a pipe, but can easily be a problem
with other applications.

This implements the Python 3 behaviour for Python 2.7 by using a preexec_fn.
(cherry picked from commit f2dccb9)

Co-authored-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
6 years ago
Ganesh Nalawade da07b58c3b Fix in confirmed_commit capability in netconf_config modules (#46964)
* Fix in confirmed_commit capability in netconf_config modules

Fixes #46804

*  If confirm value is greater than zero or confirm_commit option is set and confirmed-commit
   capability is not supported but Netconf server only in that case fail the module

* Update confirm-commit flag

* Update changelog

(cherry picked from commit 5394638047)
6 years ago
Gustavo Muniz do Carmo 977f094741 Fix iterator to list conversion in ldap_entry module
PR #45778 fixes #45417

(cherry picked from commit 7a747341fb)
6 years ago
Zim Kalinowski f16bb4daf4 Fixing assigning ssl certificate to http listener in app gateway (#45… (#46027)
* Fixing assigning ssl certificate to http listener in app gateway (#45830)

* fixed ssl certificate reference

* modified test

(cherry picked from commit 83645963fb)

* added chagelog
6 years ago
Brian Coca e841e7b53d use ansible json encoder for results in callbacks (#46830)
* use ansible json encoder for results in callbacks

(cherry picked from commit 643ff29d2d)
6 years ago
Brian Coca 97a3e59ce8 better information for user from inventory plugins (#46766)
* better information for user from inventory plugins

 - use foreman as example



(cherry picked from commit 9e0c2a658f)
6 years ago
Matt Martz 30c1a1933e [stable-2.7] Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833).
(cherry picked from commit a06a5ded61)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Peter Oliver dcc37b6eb9 Locate prtdiag even when absent from /usr/bin (#44113)
* Locate prtdiag even when absent from /usr/bin

On Solaris 8 hosts, this prevents fact collection from aborting with:

    Argument 'args' to run_command must be list or string

* Lint fix.

* Style: pass /usr/platform/.../sbin as optional path to get_bin_path().

(cherry picked from commit 40fb992a6f)
6 years ago
Abhijeet Kasurde c982295f6c VMware: Refactor disc logic (#39285)
* Refactoring related to network device
* Assign unique random temporary key while creating SCSI or/and IDE controller devices
* Add testcase for this change

Fixes: #38679

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit fd985db72d)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dominik Holler 9a2e192e8a Fix os_router ignores enable_snat: no (#45921)
If enable_snat is False, this should be used to build the
request, because the default value in the OpenStack Networking
API is True.

Fixes the issue #45915.

(cherry picked from commit 452a4ab781)
6 years ago
Adam Miller f5df17ca51 yum module properly check for None config_file (#46641) (#46820)
* yum module properly check for None config_file (#46641)

* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

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

(cherry picked from commit fb6e91bf98)

* add changelog for 2.7 backport

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Ryan Brown d46ed88fa3 [aws] Fix IAM role name parsing to come from the ARN (#46076)
* [aws] Change IAM role name parsing to come from the ARN (#45534)

(cherry picked from commit fe6b7f6b5d)

* Changelog
6 years ago
Adam Miller 4fe7671d34 yum module handle list optional empty strings properly (#46634) (#46819)
* yum module handle list optional empty strings properly (#46634)

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ad405fc21e)

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca f3b5e0359f manage levels for 'multiple included lists' (#46359)
* manage levels for 'multiple included lists'

fixes #46343

(cherry picked from commit 80d977bac6)
6 years ago
Sloane Hertel e9d42babbf [aws_ssm_parameter_store] use describe_parameters paginator (#45632) (#45666)
* [aws_ssm_parameter_store] use describe_parameters paginator (#45632)

Fix the service reaching an internal limit while processing the results and returning unexpected data
(cherry picked from commit 7aaa5da41d)

* changelog
6 years ago
Andrea Tartaglia ebc35bd79f [2.7] nmcli: backport of #42415 (#46814)
* nmcli: fix vlan connection modification Fixes #42322 (#42415)

* ensure optional items are set to empty strings rather than not presented
fix syntax of vlan modification command

* extended tests for nmcli

(cherry picked from commit fb72a5424c)

* Changelog fragment for nmcli fix
6 years ago
Ganesh Nalawade 42183e562a Fix netconf module_utils dict changed size issue (#46778)
Fixes #46755

Use list() to copy the keys of attribute dict
while iterating over attribute dict.

(cherry picked from commit 58aaf53271)

Update Changelog
6 years ago
Sam Doran 4546057fc8 Backport #46360 for 2.7 - Fix for ignore post_reboot_delay (#46510)
* win_reboot: Fix for ignore post_reboot_delay (#46360)

* win_reboot: Fix for ignore post_reboot_delay

This fixes an issue where win_reboot would be ignoring the provided
post_reboot_delay (and on Windows timing/waiting is everything!)

This must be backported to the v2.7 branch.

* Merge post-reboot handling into run()

(cherry picked from commit 8c64b4af7c)

* Add a changelog for the win_reboot fix
6 years ago
Nilashish Chakraborty 0e48544ae1 Backport 2.7: Return correct version on installed VyOS (#39115) (#46730)
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f681)

* Added changelog
6 years ago
Felix Fontein 4ffc75ab44 docker_container: fix problem with published_ports idempotency (#46595)
* Fix comparisons for expected_ports (set vs dict).

* Added changelog.

(cherry picked from commit c5ea3d058e)
6 years ago
Felix Fontein 10fd0251e8 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.

(cherry picked from commit 8afe46dc02)
6 years ago
Daniel Jakots a0f38bdab5 Register missing parameter reboot_timeout (#46585)
(cherry picked from commit 753711cd12)
6 years ago
Vlad Mencl 83194a0a99 module/systemd: fix logic determining if a service needs to be enable… (#46318)
* module/systemd: fix logic determining if a service needs to be enabled (#46245)

* modules/systemd: fix logic: allow scope to default to 'system'

Fix logic introduced in 7ea909418e5: if 'scope' param is not specified,
it defaults to system, but the value of module.params['scope'] is None,
not 'system' - so allow for that.

* modules/systemd: fix logic: disabled means disabled

Fix logic determining whether a service with both systemd and initd files is enabled or disabled.

In situations where systemd thinks service is disabled, but rc.d symlinks mark it as enabled,
this module wrongly assumes the service is enabled.

Fix this logic: disabled means disabled

Only when the output from does NOT include disabled, consider the status of rc.d symlinks.

This essentially replicates the fixes done to the systemd handling in the "service" module in 3c89a21e0c

Fixes #22303

Fixes #44409

(cherry picked from commit ef131c7556)

* backport/2.7/46245: add changelog fragment
6 years ago
Daniel Jakots 26de4f9749 Add support for OpenBSD (#46147)
(cherry picked from commit 2769a4e2cc)
6 years ago
René Moser 083d2a6ad7 [2.7] backport cs_instance fixes (#46274)
* cs_instance: doc: fix typo in examples (#46035)


(cherry picked from commit c09b785a66)

* cs_instance: fix host migration without volume (#46115)


(cherry picked from commit e7926cf9f4)

* add changelog fragment
6 years ago
Felix Fontein c481a5bf4a [2.7] route53: fix CAA record ordering for idempotency (#46227)
* [aws] route53 module: fix idempotency for CAA records  (#46049)

* Fixing record order for CAA records to properly handle idempotency.

* Add integration tests that reproduce CAA failure

(cherry picked from commit a727a1ee67)

* Added changelog.
6 years ago
Felix Fontein 1d01543e34 docker_container: fix various idempotency problems and non-working options (#45905)
* Sorting args.

* Doing comparisons of options with container parameters in a more context-sensitive way.

This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).

* Make blkio_weight work.

* Fix cap_drop idempotency problem.

* Making groups idempotent if it contains integers.

* Make cpuset_mems work.

* Make dns_opts work.

* Fixing log_opts: docker expects string values, returns error for integer.

* Adding tests from felixfontein/ansible-docker_container-test#2.

* Make uts work.

* Adding changelog entry.

* Forgot option security_opts.

* Fixing typo.

* Explain strict set(dict) comparison a bit more.

* Improving idempotency tests.

* Making dns_servers a list, since the ordering is relevant.

* Making dns_search_domains a list, since the ordering is relevant.

* Improving dns_search_domains/dns_servers.

* Fixing entrypoint test.

* Making sure options are only supported for correct docker-py versions.
6 years ago
Nathaniel Case b1b93c7a22 [2.7] Clean up after ansible-connection if failure occurred in start() (#45930)
* [2.7] Clean up after ansible-connection if failure occurred in start() (#45929)
(cherry picked from commit 0d143ed)

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

* Add changelog fragment
6 years ago
Matt Martz cf28d22211 [stable-2.7] Support transfering empty files to target host. Fixes #36725 (#45751)
(cherry picked from commit b6fcbfe)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Pieter Avonts 190cdd3a29 VMware: Rewrite get_resource_pool method for correct resource_pool selection (#39792)
* rewrite get_resource_pool method for correct resource_pool selection
* only keep name if path is given for cluster, esxi_hostname or resource_pool
* Revert "only keep name if path is given for cluster, esxi_hostname or resource_pool"
* This reverts commit 50293ec763c024b0eaceac5d775ccc0ad3ff8bd7.
* if the name argument contains a path, only use the last part for matching
* remove path from cluster argument in tests
* remove find_objs in favour of reusing find_obj with an extra folder argument
* fix find_obj ignoring first if name is not given

(cherry picked from commit 1a810f8f11)
6 years ago
Felix Fontein ccde3dc66b docker_container: fix behavior when image is not specified (#46322)
* Don't simply ignore container in present() if image is not specified.

* Use image from existing container for recreation if not specified.

* Added changelog.

* Improve comment.

(cherry picked from commit 895019c59b)
6 years ago
Tobias Wolf ee523beb8e [rabbitmq_binding] Fix the quoting of vhost and other names (#45109)
* [rabbitmq_binding] Fix the quoting of vhost and other names, which was broken in PR #35651
* Merge missing urllib_parse.quote from PR #42422
* Missed one line, where  also needs to be escaped, i.e., the destination

(cherry picked from commit d5f8738bf2)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jordan Borean 93b75558bb azure_rm_common: use __version__ from module_util (#46184)
(cherry picked from commit 02c11e6b51)
6 years ago
Sam Doran 19fe83d786 Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog

(cherry picked from commit b74279d14c)
6 years ago
Yann Rouillard ac56230d5b Only delete key from redis in-memory cache if present (#35126)
Fixes #35120 : the redis cache plugin keeps key/value
entries in an in-memory cache to avoid hitting the
redis database each time.

The problem is that a cache entry is only set when
a value is get or set but it is always deleted when
trying to delete a value.

When the --flush-cache ansible-playbook option is used,
the redis cache plugin is first asked to remove every
entry corresponding to every hostname present in the inventory.
As no value as been set/get so far, it then tries to delete
an unexisting value from the cache and hence crashes with
a KeyError exception.

(cherry picked from commit ee3dfef016)
6 years ago
Ganesh Nalawade b6276fe4a4 Make default_operation optional in netconf_config module (#46333)
Fixes #46257

*  As per netconf rfc default-operation value is optional,
   hence removing the default value for default_operation
   option.

(cherry picked from commit 5e6eb921ae)

* Update changelog
6 years ago
Johannes Brunswicker 2703be8368 Backport/2.7/42456 - Added SSL Support to consul_kv lookup plugin (#46466)
* Add ssl support to consul_kv lookup (#42456)

* implemented lookup_consul_kv
* added missing version_added for consul_url ini section
* added default value for ANSIBLE_CONSUL_CLIENT_CERT and added some more documentation
* removed trailing whitespaces
* fixed indention
* Fixes in Documentation
* removed trailing whitespace
* removed trailing whitespace

(cherry picked from commit bacbd4e9fc)

* * added changelog fragment
6 years ago
cadl42 3cfbc2791f Ignore empty result of rabbitmqctl list_user_permissions (#35598)
Fix #34863

(cherry picked from commit a7221dd289)
6 years ago
Kévin Subileau f5bc8457e4 win_nssm: add changelog fragment 6 years ago
Sam Doran 8b0c46a51a Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.

(cherry picked from commit 8b1ae30e2e)
6 years ago