Commit Graph

249 Commits (09e61f29e9b877a314b9fe638a46aceb94243123)

Author SHA1 Message Date
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
Harald Albers 0e4a7a5abc VMware: honor "wait_for_ip_address" when powering on a VM (#45226)
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a9c829bdf2)
6 years ago
Jordan Borean d7e9f24741 winrm: add further conditional to using pexect for kerb auth (#45952)
(cherry picked from commit d6251e5b27)
6 years ago
Matt Martz fe528af1e0 [stable-2.7] Fix issues with PLUGIN_FILTERS_CFG config handling (#45994)
* Ensure that the value of PLUGIN_FILTERS_CFG is treated as type=path, and that we use the standard section of 'defaults' instead of 'default'

* deprecate the default section

* Don't add version_added for the corrected section
(cherry picked from commit 172137c)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Matt Martz 8da4113ec0 [stable-2.7] Support nested JSON decoding in AnsibleJSONDecoder (#45924)
* Support nested JSON decoding in AnsibleJSONDecoder

* Add tests for vault portion of AnsibleJSONDecoder
(cherry picked from commit c0915e2)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Rene Moser f360df4e10 add changelog fragment 6 years ago
Dag Wieers 4b80f8c8e3 Fix calling deprecate with correct arguments (#44726)
This fixes #44702

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Matt Davis 637c9b3c5f fix premature exit when RG doesn't exist (#46013)
* fixes #45941
* corrects regression introduced by #26104; when the resource group doesn't exist, the module exits prematurely with an error instead of creating it.

(cherry picked from commit 3b52d968e6)
6 years ago
Daniel Speichert bc08cf12ea [stable-2.7] Migrate from MySQLdb to PyMySQL (#40123)
* Migrate from MySQLdb to PyMySQL

* Deduplicate driver loading and failure message

* Explain requirements

* Apply requirements docs change to proxysql too

* Add changelog.
(cherry picked from commit d34cf93f1a)

Co-authored-by: Daniel Speichert <DSpeichert@users.noreply.github.com>
6 years ago
Jordan Borean 547be8c957 powershell: do not quote join_path result to reflect ShellBase join_path (#45944)
(cherry picked from commit 198423d6fb)
6 years ago
Sloane Hertel 01b6f02a80 [2.7] ec2_group - fix VPC precedence for security group targets (#45787) (#45815)
* ec2_group - fix VPC precedence for security group targets (#45787)

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes #45782
(cherry picked from commit 8d2df9be52)

* Fix ec2_group for EC2-Classic accounts (#46242)

* Fix ec2_group for EC2-Classic accounts

* changelog

(cherry picked from commit 9efc3dc761)

* Merge changelogs
6 years ago
Felix Fontein ff1aa50fdb Fixing HTTPError case of fetch_url for Python 3 compatibility. (#45628)
* Fixing HTTPError case of fetch_url for Python 3 compatibility.

* Adding unit test.

* PEP8.

* Changelog.
6 years ago
Sam Doran 3a72e271ad Use unicode instead of bytes (#46234)
The stdout and stderr values returned from self._low_level_execute() are text, not bytes. This results in an error in Python 3 since str and bytes cannot be concatenated.

Changing to unicode type allows this to work without error on Python 2 and Python 3.

(cherry picked from commit 77f73f6d2a)
6 years ago
Dag Wieers 07ed487427 reboot: Fix typo and support bare Linux systems (#45607)
* reboot: Fix typo and support bare Linux systems

This fixes a problem for bare Linux systems that do not support 'who -b' or 'uptime -s'.

* Accumulate stdout and stderr information

(cherry picked from commit a7a99c5fd4)
6 years ago
Felix Fontein 8715f96af0 [2.7] docker_container: don't parse/interpret options if state is 'absent' (#45769)
* Don't parse/interpret options if state is 'absent'. (#45700)

* Added changelog.
6 years ago
Matt Martz 2293463320 [stable-2.7] Support empty files with piped transfer_method. Fixes #45426 (#45618)
(cherry picked from commit e68f895)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Anton Nikulin d2c72040b5 [stable-2.7] Store Authorization header inside HttpApi connection plugin (#45598) (#45608)
* Store Authorization header inside HttpApi connection plugin (#45598)


(cherry picked from commit b7263eab1d)

* Add changelog entry
6 years ago
Sam Doran d9bd76dc8a Improve code stability is checksum checking
- use context manager for dealing with the checksum file
- use loop that can tolerate zero, one, or more items return rather than the previous expression which would break if anything other than exactly one item was returned

(cherry picked from commit 03dbb1d9c4)

squash
6 years ago
Sam Doran 9f0f66137f Add documentation on underlying tools in user module (#46455) (#46511)
(cherry picked from commit bcfdc37be0)
6 years ago
Toshio Kuratomi 0a07068054 New release v2.7.0 6 years ago
Toshio Kuratomi 35b290f0c9 New release 2.7.0rc4 6 years ago
Matt Clay 2368c2e30b Revert "winrm: add further conditional to using pexect for kerb auth (#45952)"
This reverts commit 918d45f957.

Unintentionally merged before 2.7.0 final.
6 years ago
Jordan Borean 918d45f957 winrm: add further conditional to using pexect for kerb auth (#45952)
(cherry picked from commit d6251e5b27)
6 years ago
Toshio Kuratomi 2a33276385 New release 2.7.0rc3 6 years ago
Sloane Hertel 98e31e98c8 ec2_group: fix regression for targets that are a list containing strings and lists (#45594)
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.

* Add ec2_group integration tests for lists of nested targets

* changelog

* Add diff mode support for lists of targets containing strings and lists.

(cherry picked from commit d7ca3f2bd3)
6 years ago
Trishna Guha 9b4bb04d07 [2.7]fix nxos_facts indefinite hang for text based output (#45846)
* fix nxos_facts indefinite hang for text based output (#45845)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1b0c4fde86)
6 years ago
Toshio Kuratomi 6fe6d04489 New release v2.7.0rc2 6 years ago
Ryan Brown eb882a144b
Clarify what "performance improvement" means in changelog for deepish-copy (#45606) 6 years ago
Yuwei Zhou e16d36f0f7 Backport: fix the autoscale resource id #45477 (#45532)
* fix the autoscale resource id (#45477)

* fix the autoscale resource id

* Update main.yml

(cherry picked from commit fa04387550)
6 years ago
Harald Albers 9a0f1d8915 VMware: Fix wait_for_task backoff behavior
Signed-off-by: Harald Albers <github@albersweb.de>

(cherry picked from commit 796d8b5dc8)
6 years ago
David Rodríguez c41681b888 [backport-2.7] Fix remote checksums when paths have leading dots (#45287) (#45501)
* Fix remote checksums when paths have leading dots (#45287)

* Fix remote checksums with paths have leading dots

* Fix result recorded from the wrong file

* Add changelog fragment

(cherry picked from commit 600c7ac108)
6 years ago
Matt Martz 99171a9c6f [stable-2.7] Fix logic to not re-download existing files when force=no (#45495) (#45509)
* [stable-2.7] Fix logic to not re-download existing files when force=no (#45495)

* Fix logic to not re-download existing files when force=no. Fixes #45491

* Reduce logic complexity.
(cherry picked from commit 5785de582f)

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

* Backport of get_url fix cannot use result

result was only added in 2.8+
6 years ago
Sloane Hertel 4c080f649b [aws] cloudfront_distribution - fix method name, backport/2.7/45498 (#45512)
* [AWS] cloudfront_distribution - fix method name from 'validate_distribution_id_from_caller_reference' to 'validate_distribution_from_caller_reference' and set distribution_id to the distribution's key 'Id' (#45498)

(cherry picked from commit e5269c047c)

* changelog
6 years ago