Commit Graph

47868 Commits (685a4b6d3ff72186d2b4ffce73172a5446a71ccc)
 

Author SHA1 Message Date
Matt Martz 09e89d538c [stable-2.9] Add method to automatically clean up after an action plugin (#65509)
* Use correct var, move cleanup for async
* Add changelog and tests. Fixes #65393. Fixes #65277.
* Kill off all long running async tasks from listen_ports_facts
* Update task to work with older jinja2
(cherry picked from commit 03a4edb)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Sam Doran 56c6ebe258 [stable-2.9] Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
(cherry picked from commit 6f76a48f59)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Adrian Likins 43cf40ffe0 [stable-2.9] Don't remove trailing / on galaxy api URLS (#63294)
This causes multiple unneeded http redirects.
Since each http redirect takes a few hundred
milliseconds, handling the redirects starts to
take up a significant amount of wall time.

Fixes: #63281
(cherry picked from commit d1c39b9068)

Co-authored-by: Adrian Likins <alikins@redhat.com>
5 years ago
Marc Hörsken 67302136bf [stable-2.9] Fix 'CyberarkPassword' object has no attribute 'delimiter' (#66268)
This is a very small follow up to PR #59500
(cherry picked from commit 53e405dd42)

Co-authored-by: Marc Hörsken <mback2k@users.noreply.github.com>
5 years ago
Jordan Borean 44a5b20c67 ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578)
(cherry picked from commit eaba5572cd)
5 years ago
Jordan Borean 57b09d0684 win_uri win_get_url - Fix up redirection defaults (#65584)
(cherry picked from commit 9a81f5c3b7)
5 years ago
Jordan Borean e577e8f30b display - Fix up tracebacks on 3rd party loggers when log path is set (#65582)
(cherry picked from commit b782227642)
5 years ago
Jordan Borean 66f089de4b ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list

(cherry picked from commit aba8f12495)
5 years ago
Jordan Borean ab441a2784 Make sure warnings are printed during fact gathering (#66258)
(cherry picked from commit d3427bb860)
5 years ago
Jordan Borean fd9c7f9acc win_user_right - docs to show how to remove all (#66315)
(cherry picked from commit 93bfa4b07a)
5 years ago
Felix Fontein b55f20a3ee [2.9] various elbv2 bugfixes (#65212)
* Add aws elb multiple host header support (#65021)

* Add support for aws elbv2 multiple host header actions

* Add example of multiple host header

* Add test for multiple host headers

* Add missing quote

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Remove debug statements

(cherry picked from commit d52af75c68)

* elbv2 - print() statement results an task failure, even if the task itself was successfull (#65183)

(cherry picked from commit cba9abcbec)

* Add changelog fragment.

* Update changelogs/fragments/65021-65183-elb-bugs.yml

* Force values to be sorted when compared. (#65315)

* Force values to be sorted when compared.

This avoids problems where lists of values could be generated in
indeterminate order.

* Update lib/ansible/module_utils/aws/elbv2.py

Thank you felixfontein, sorry I missed this detail.

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 777b6d3e30)

* Update changelog.

Co-authored-by: Michael Mayer <mjmayer@gmail.com>
Co-authored-by: Markus Bergholz <markuman@gmail.com>
Co-authored-by: roberbri <roberbri@cisco.com>
5 years ago
Jill R a7bb6700c6 [2.9] ec2 Filter dictionary iteration errors on py3.8 (#65705)
* Fix RuntimeError in ec2_group_info (#65434)

Modifying dictionary while iterating over it

* Fix ec2 filter dict iteration for python3.8 (#65521)

Python now throws a RuntimeError if dict keys are modified mid-iteration.
https://bugs.python.org/issue36452
Cast filter dicts to list before iteration.

Fixes: 65024
Related: 65434

* Backport of 65434, 65521 to address ec2 filter dictionary iteration on Py3.8

https://bugs.python.org/issue36452

* spell changelog entry correctly

Co-authored-by: Aaryn <10469251+arin-c@users.noreply.github.com>
5 years ago
Felix Fontein 3ff86a5cad docker_* modules: fix various errors in argument specs (#65632)
* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.

(cherry picked from commit e9cec0262d)
5 years ago
Ganesh Nalawade 69070402f0 Fix network_cli become check to be compatible with collections (#65829)
*  The become method name check is not required in network_cli
   as the become command is specific to platform and is implemented
   in the platform specific terminal plugins

(cherry picked from commit ff5253fa0e)
5 years ago
Ganesh Nalawade 21fad83716 Fix action plugin issue with network connection type in common collec… (#65830)
* Fix action plugin issue with network connection type in common collection (#65078)

* Fix action plugin isse with network connection type in common collection

*  For network connection in common collection the value of
   ansible_connection is the FQCN of the connection type
   For example ansible_connection=network.common.network_cli

*  Add fix in supported network action plugins to extract
   the connection name from FQCN

* Fix CI issue

* Fix review comments and update community network action plugins

(cherry picked from commit 2ef47148cd)

* Fix CI failures
5 years ago
Nilashish Chakraborty e822ce196c Use dict_diff instead of sets to take diff lag members (#66126)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit cb46e5f06b)

Add nxos_lag_interfaces fix changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Andrew Klychkov 992960cfbb Backport of 65791 - postgresql modules: use query parameters with cursor objects (#65864)
* Backport of 65791 - postgresql modules: use query parameters with cursor objects

* remove line from changelog fragment
5 years ago
Felix Fontein d1ac4da6a1 crypto modules: fix various errors in argument specs (#65633)
* Fix various errors in crypto module argument specs.

* Adjust PR #.

* Fix provider requirement.

* Make sure openssl binary is installed.

(cherry picked from commit 57c042243f)
5 years ago
Andrew Klychkov d706059006 Backport of 65787 - postgresql_sequence: use query parameters with cursor object 5 years ago
Andrew Klychkov 28b3531824 Backport of 64585: Don't return module error when mysql_connect fails (#65596)
* mysql: add changelog fragment for PR 64585 (#65594)

* mysql: add changelog fragment for PR 64585

* change fragment name and bug description

(cherry picked from commit 85486b1ce4)

* Don't return module error when mysql_connect fails (#64560) (#64585)

* Don't return module error when mysql_connect fails (#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (#64560)

(cherry picked from commit 47aea84924)

* remove tests

Co-authored-by: Jürgen Hötzel <juergen@hoetzel.info>
5 years ago
John Chen 4a05724fd7 [stable-2.9] user - compare macOS user properties using same type (#62973)
self._get_user_property returns a string, so when doing a comparison
using this value, cast the second variable to a string so that the
comparison behaves correctly
* Add changelog
* Add to_text import
* Add integration test.
(cherry picked from commit c73288ad53)

Co-authored-by: John Chen <kryptonite303@users.noreply.github.com>
5 years ago
Abhijeet Kasurde d2c21af3f7 Fixed argument spec for multiple modules (#65496)
This change contains fixes for argument spec and respective datatypes.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 96df2bdcf3)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
parmsib 636f26f07e Make docker_stack adhere to standard ansible return values (#63467)
* Make docker_stack adhere to standard return values

The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.

Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix under-indentation of continuation line (pep8)

Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console

* Don't break old playbooks/roles

Made sure the changes are only adding new variables, not removing anything existing yet.

* Added comment

* Minor fixes

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* minor change to docker_stack.py

* Add changelog fragment for PR 63467

* Format changelog fragment

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Add fragment about docker_stack return val depr

* Add docker_stack doc note about deprecated vals

* Remove whitespace in empty line

* Add docker_stack depr notice to porting guide

* Update changelogs/fragments/63467-docker-stack-return-fix.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Added back a missing new line

(cherry picked from commit a5d69f2a26)
5 years ago
Matt Davis b148d06bda Update 64902-fix-allow-duplicates-in-single-role.yml 5 years ago
Kiyo Nagamine 8538127bdc Ensure `allow_duplicates: true` enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment

(cherry picked from commit daecbb9bf0)
5 years ago
Felix Fontein 6586623a75 docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.

(cherry picked from commit 17ef253ad1)
5 years ago
Marcel b5f817ca26 docker_container - #65993 - update restart policy (restart policy & restart retries) wit… (#66192)
* #65993 - update restart policy (restart policy & restart retries) without restarting the container

* - proper indentation on the continuation-line
- set restart_policy to the correct value independent from the api version

* - move restart_policy definitions into the if block
- add a new variable for the restart_policy configuration value

* add changelog fragment

* typo; minus -> underscore

* rename changelog fragment to contain the correct module name

* rename restart_policy_config_value to just restart_policy and refer to the correct dict values

(cherry picked from commit 02c126f5ee)
5 years ago
Felix Fontein cd348c123b [2.9] docker_container: wait for removal if removal is in process (#66117)
* docker_container: wait for removal if removal is in process (#65854)

* Allow to inspect containers directly.

* Wait for containers to be removed before recreating them.

* Also wait for containers to be removed before creating them.

* Add changelog.

(cherry picked from commit 4df5bdb11e)

* Don't wait for removal during check mode. (#66145)

(cherry picked from commit 14e32c85b4)
5 years ago
Guillaume Martinez 1159193d16 [Backport 2.9] gitlab_runner: fix idempotency for shared runners (#65545)
* gitlab_runner: fix idempotency for shared runners (#65176)


(cherry picked from commit 2eb615f1ef)

* add changelog
5 years ago
Ian Wienand b05a2c8a62 dnf: don't return fail_json['msg'] as list (#65302)
Although it's not enforced that fail_json['msg'] should be a string
[1], I think it is pretty strongly implied.

In this case the failure_response['msg'] is sent through as the
fail_json['msg'], and the trailing commas here turn it into a tuple.
It's not clear if this is a typo or intended, but it does cause
problems for callbacks that expect this as a string (e.g. [2]).

Since there seems no point to having these values as a tuple, remove
the trailing commas so they return a string as per everywhere else.

[1] 4c589661c2/lib/ansible/module_utils/basic.py (L2078)
[2] https://review.opendev.org/#/c/696081

(cherry picked from commit fc54ae9227)
5 years ago
Sam Doran e6db6d0d64 [stable-2.9] Handle InternalError raised by cryptography when running in FIPS mode (#65477)
Since older versions of paramiko do not require cryptography,
we cannot catch the exact exception from cryptography.

Remove other exceptions since we're catching everything now
(cherry picked from commit d35c1a435b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 003e9fdecd [stable-2.9] user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
(cherry picked from commit 18130e1419)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Hannes Ljungberg 2858983de3 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

Co-Authored-By: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f31b8e08b2)
5 years ago
Ganesh Nalawade 1257448636 [2.9] Fix nxos_file_copy option value path validation (#65846)
* Fix nxos_file_copy option value path validation (#65423)

* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments

(cherry picked from commit 88008badb1)

* Fix review comments
5 years ago
Abhijeet Kasurde a1b0f72c98 [2.9] solaris_zone: Allow only valid characters in zone name
CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that.
However, there is no user input validation done while performing actions.
A malicious user could provide a crafted zone name which allows executing commands
into the server manipulating the module behaviour.

Adding user input validation as per Solaris Zone documentation fixes this issue.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 7d2ae7e322)
5 years ago
Sam Doran 755348d870 [stable-2.9] Add Fedora 31 to the test matrix (#64848)
* Add Fedora 31 to the test matrix

* Remove Fedora 29 from the test matrix
(cherry picked from commit 0e5a83a1cc)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Adam Miller 04ad3fcc89 [stable-2.9] DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

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

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

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

Co-authored-by: Adam Miller <admiller@redhat.com>
5 years ago
Sam Doran 312608d960 [stable-2.9] Fix timezone integration test for Fedora 31 (#65013)
(cherry picked from commit 163904fe37)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay 0e3573640b [stable-2.9] Simplify docker_setup on Fedora.
This avoids installing dnf-plugins-core, which breaks the yum and dnf modules
when uninstalling packages using a wildcard after they have already been removed.

This should resolve issues with the yum integration tests failing after docker tests run.
(cherry picked from commit a5c36eedd8)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Wojciech Sciesinski df37d93754 Update indentation used in the code examples, unify empty lines (#65874) (#65886) 5 years ago
Felix Fontein 0341be2da5 Add notes on docker_network connectivity for containers and services. (#65840) (#65964)
(cherry picked from commit d3b6db3754)
5 years ago
Mark Chappell 43a9bc96a5 AWS Guidelines: Make 'security_token' optional so that they can be run outside of CI (#66107) (#66136) 5 years ago
Felix Fontein 5dfaf1dfe8 docker_swarm_service: Fix description of limits.memory (#66078) (#66113)
This option corresponds to the '--limit-memory' option. Also
fix other mentions memory reservation instead of limit.

(cherry picked from commit 30cfa92e90)

Co-authored-by: Pedro Alvarez Piedehierro <palvarez89@gmail.com>
5 years ago
Wojciech Sciesinski fc89d45385 Update indentation used in the code examples, unify empty lines (#65346) (#65696) 5 years ago
Matt Clay 12088b89c3 [stable-2.9] Disable failing azure_rm_storageaccount test.
(cherry picked from commit 342b9953bc)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Justin Ossevoort 652a456e45 [stable-2.9] Fix 'Assert CNAME failure' assertion (#65875)
(cherry picked from commit 14ebceec25)

Co-authored-by: Justin Ossevoort <github@internetionals.nl>
5 years ago
Matt Clay 374e3b12f6 [stable-2.9] Add ansible-test constraint to avoid coverage 5.0+
(cherry picked from commit 9ea5b539b6)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Dusan Matejka 56120d034a Backport/2.9/65145 zabbix modules now require higher version of underlying python module (#65602)
* updated required zabbix-api version for zabbix modules

(cherry picked from commit f48ac0da5d)

* added changelog fragment
5 years ago
Sandra McCann 6ba26e7556 Clarify how to install roles and collections from same requirements file (#65707) (#65736)
(cherry picked from commit 5eceebcaf3)
5 years ago
Sandra McCann 58a62da92d update version metadata to get faceted swiftype search running (#65574) (#65579)
* update version metadata to get faceted swiftype search running

(cherry picked from commit 96cbbdd59f)
5 years ago