Commit Graph

258 Commits (432b9cc25bb48b387663cab7528510ce643fb87b)

Author SHA1 Message Date
Abhijeet Kasurde 625159e80a Update plugin filter documentation (#48557)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6d36849)
6 years ago
Felix Fontein 32b3806e0e 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
Felix Fontein d3a2c071ff 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 9f8f6ce682 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
Felix Fontein 74576470c2 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
Felix Fontein a43ea20ea5 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
Martin Krizek 29a851348d 2.6: Backport _cond_not_supported_warn() (#41126) (#48175)
* 2.6: Backport _cond_not_supported_warn() (#41126)

(Partially cherry picked from commit 5f7ffd39dc)

* Fix changelog
6 years ago
Felix Fontein 61f76d7410 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
Jonathan Oddy af00a9da8d 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
Dani Hodovic 31e6ede9ee docker_service: parse scale parameter correctly to 2.6 (#47248)
* fix: Parse docker_service scale parameter to int (#45508)

* Changelog: add fragment for docker_service scale fix
6 years ago
Dusan Matejka 20cbe0b9d3 [2.6] zabbix_host: backport of #46521 (#47476)
* zabbix_host: fix link template error (#46521)

* add host interface before link template

(cherry picked from commit 5a35907b71)

* added changelog
6 years ago
Trishna Guha 6269c94619 Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Jim Gu f50e97210c VMware: Avoid misleading PyVmomi error if requests import fails (#47313)
* 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
Jesse Pretorius 069f526cab Add issue 47301 changelog fragment
(cherry picked from commit 438d96be52)
6 years ago
Abhijeet Kasurde a08aa35831 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
Fran Fitzpatrick dcf812e736 Backport: junos terminal regex prompt fix to v2.6 (#47204)
* Fix junos terminal regex (#47096)

Fix junos stdout regex

Change at hing

(cherry picked from commit fc341e01fa)

* Changelog: adds fragment for junos fix terminal
6 years ago
Dag Wieers c6f712b438 psexec: Handle socket errors (Connection timeout) (Backport) (#47406)
* psexec: Handle socket errors (Connection timeout)

This ensures we get a nicer error message from psexec.

* Add changelog fragment
6 years ago
Jordan Borean 618beca1d5 win_uri: stop output from mixing with module result (#48140)
(cherry picked from commit 8a9d7b3695)
6 years ago
Felix Fontein e9d29eca0c 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
Felix Fontein 3fbeac4cf7 [2.6] Fixes #33045: get existing containers in a network via inspect_network (Rebased #33048) (#47471)
* Fix #33045: get existing network via inspect_network (Rebased #33048) (#43997)


(cherry picked from commit 2939f68897)

* Add changelog.
6 years ago
Felix Fontein 8cff6752e6 Fix option change detection / force support for docker_volume. (#47390) 6 years ago
Jordan Borean 0387649206 postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
6 years ago
Jordan Borean 67d1df0d37 openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
6 years ago
Jordan Borean 92a625b3f1 psexec: better error on import failure (#47327)
(cherry picked from commit 013c44484a)
6 years ago
Abhijeet Kasurde 62a028e7d0 VMware: improve readability and fix privileges names on scenario_clone_template (#47961)
(cherry picked from commit 89f03314ce)
6 years ago
Felix Fontein f09bf0a75b [2.6] docker_container: fix memory_swappiness documentation (#47379)
* 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
Matt Clay 1e521717ae New release v2.6.7 6 years ago
Martin Krizek f50cc0b8cb 2.6: user: do not pass ssh_key_passphrase on cmdline (#47487)
* user: do not pass ssh_key_passphrase on cmdline

* 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)
(cherry picked from commit b618339c32)

* Remove E210
6 years ago
Matt Clay 0f8a689f95 New release v2.6.6 6 years ago
Matt Clay 9b65337e5c
Backport/2.6/44755 - win_nssm: tests and several bug fixes (#47159)
* win_nssm: add failing tests for issue #44079

(cherry picked from commit a5d1241fa1)

* win_nssm: add more failing tests

These tests highlight several issues with this module:
 * Service not started when state=started
 * Errors with app_parameters (see #25265)
 * Exception when passing several dependencies separated by comma as specified in doc

(cherry picked from commit e50234bdb3)

* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue

Fix #44079

(cherry picked from commit 20a0d90ebe)

* win_nssm: fix service not started when state=started

Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.

(cherry picked from commit 8180a7c39b)

* win_nssm: fix incorrect separator in doc for service dependencies

The dependencies parameter works with space as separator, but not with comma as shown in the documentation

(cherry picked from commit ddd4b4bea6)

* win_nssm: fix error with app_parameters parameter

Fix #25265

(cherry picked from commit aba0d48ba5)

* win_nssm: add idempotence tests

(cherry picked from commit 46a5e4f3bf)

* win_nssm: fix several idempotence issues and misbehaviors

Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).

(cherry picked from commit 933a4092bf)

* win_nssm: test parameters with spaces, quotes or backslashes

(cherry picked from commit 51843a7b3c)

* win_nssm: restore comma as separator for service dependencies

Revert commit ddd4b4b

(cherry picked from commit ead882bb9b)

* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict

(cherry picked from commit 862855252b)

* win_nssm: wrong variable in tests

(cherry picked from commit 9b9c839461)

* win_nssm: add changelog fragment
6 years ago
Vlad Mencl abc7d4d50a modules/systemd: fix logic: disabled means disabled (#46317)
* 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 systemctl is-enabled 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

Fixes #39116

* backport/2.6/46245: add changelog fragment
6 years ago
Brian Coca 6da8fedda5 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 78da8341a5 manage levels for 'multiple included lists' (#46359)
* manage levels for 'multiple included lists'

fixes #46343

(cherry picked from commit 80d977bac6)
(cherry picked from commit ef66378953)
6 years ago
Matt Martz d61d285a6f [stable-2.6] 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
cadl42 eb6a2408db Ignore empty result of rabbitmqctl list_user_permissions (#35598)
Fix #34863

(cherry picked from commit a7221dd289)
6 years ago
Sam Doran 5cc5be07fb Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog

(cherry picked from commit b74279d14c)
6 years ago
Sam Doran 4f8c82ca2c 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
Dominik Holler b550320f14 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
Felix Fontein caf7885ef4 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
Felix Fontein c41c3b4160 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 05c6df53f0 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.

(cherry picked from commit 8afe46dc02)
6 years ago
Felix Fontein fac1405bcc [2.6] route53: fix CAA record ordering for idempotency (#46226)
* [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
Jordan Borean 992f4468d6 azure_rm_common: use __version__ from module_util (#46184)
(cherry picked from commit 02c11e6b51)
6 years ago
Sam Doran eb520de517 Add documentation on underlying tools in user module (#46455) (#46512)
(cherry picked from commit bcfdc37be0)
6 years ago
Matt Clay 2042830bab New release v2.6.5 6 years ago
Sloane Hertel 36414cc518 Fix ec2_group for EC2-Classic accounts (#46242)
* Fix ec2_group for EC2-Classic accounts

* changelog

(cherry picked from commit 9efc3dc761)
6 years ago
Daniel Speichert 6e90277c69 [stable-2.6] 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
Felix Fontein 85626291bf 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
Matt Martz e7740b80fd [stable-2.6] [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+.
(cherry picked from commit 99171a9c6f)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Sloane Hertel 0be82f2b08 [2.6] ec2_group: fix regression for targets that are a list containing strings and lists (#45748)
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.

(cherry picked from commit 450fb9f855)

* Add ec2_group integration tests for lists of nested targets

(cherry picked from commit 14e3399db1)

* changelog

(cherry picked from commit fb17db0876)
6 years ago