Commit Graph

9348 Commits (ec73968b5dd8fbadaf06ecaca7a9d919f0188c1f)

Author SHA1 Message Date
Nilashish Chakraborty 54ca524da3
nxos_interfaces: RMB state fixes (#63960) (#67173)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix

(cherry picked from commit d72025be75)

Add changelog for nxos_interfaces fix

Co-authored-by: Chris Van Heuveln <cvanheuv@cisco.com>
5 years ago
Felix Fontein 569218f0cd
Fix removed_in_version to support honor suboptions (#66918) (#67104)
* Add unit tests.
* Fix reporting for removed_in_version.
* Add changelog.

(cherry picked from commit fe454d27a1)
5 years ago
Jiri Hnidek 69ba90098a
When no pool quantity is set, then do not set quantity to 1 (#66807) (#66933)
* Fixes #66478
* When no quantity is set, then candlepin server usually uses
  default value 1. When more quantities are required, then
  candlepin server can automatically choose correct minimal
  value.

(cherry picked from commit 6f1bb37feb)
5 years ago
Sumit Jaiswal f54263c459
Backport/2.9/55220 (#66757)
* Working Cisco IOS macro editing (fixes #55211) (#55220)

* Working Cisco IOS macro editing (fixes #55211)

* Working Cisco IOS macro editing [fixed pylints] (fixes #55211)

* Added integration tests for edit_macro

* Added conditional integration tests for ios_config macro

* Cosmetic fix: when near block for added conditional integration tests for ios_config macro

* Move teardown to always for block

(cherry picked from commit 4a0c875447)

* changelog

Co-authored-by: Albert Siersema <albert@mediacaster.nl>
5 years ago
Sumit Jaiswal f8c4a38ffe
Backport PR to fix the duplication of IPV6 address with replace state in ios_l3_interfaces module (#66680)
* fix 66530 (#66654)


(cherry picked from commit 0c4f167b82)

* changelog

* Update 66654-fix-ipv6-duplication-for-replace-state-ios-l3-interfaces.yaml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Ruediger Pluem 481327ec37
group - correctly determine if a local group exists. (#59772) (#67176)
Fixes #58619
Add integration test

(cherry picked from commit 80c4b86abe)
5 years ago
Florian Apolloner 361d7c677f
Fix DNF idempotency. (#66209) (#66578)
(cherry picked from commit a7e4479d01)
5 years ago
GomathiselviS 182831d8b0
Make banner detection non-greedy in ios_banner (#63092) (#66274)
* Make banner detection non-greedy in ios_banner (#63092)

* Make banner detection non-greedy in ios_banner

* Added ios_banner unit test to detect bug #63091

* Corrected PEP8 errors

* Added integration test

* Corrected typo in integration test

(cherry picked from commit 01a92f0191)

* Added changelog fragment

* Update 66274-ios_banner_nongreedy.yml

Co-authored-by: kalimsshar <34369784+kalimsshar@users.noreply.github.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Jordan Borean 045fc371eb
win_uri: fix up tests (#67064) (#67066)
(cherry picked from commit 3ada0b2f65)
5 years ago
Sam Doran a2b5af86dd
[stable-2.9] include_vars - fix stack trace when run ad-hoc with dirs parameter (#66581) (#66910)
Add integration test

There are a number of other parameters that result in stack traces as well when this module is used ad-hoc. I'm not sure if we're interested in fixing them all since this module isn't meant to be run ad-hoc.
(cherry picked from commit cc2376b782)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran aaadf71438
[stable-2.9] tests: ipify_facts: retry on fail (#66897) (#66903)
(cherry picked from commit 91063f40d6)

Co-authored-by: Rene Moser <mail@renemoser.net>

Co-authored-by: René Moser <mail@renemoser.net>
5 years ago
Pilou 783daf9d1b
throttle: fix linear based strategies (#65422) (#66805)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
(cherry picked from commit bbbdc1c25c)
5 years ago
Sato Kenta 6df09ae41e
pamd: Fix AttributeError when removing the first or last rule (#66398) (#66776)
(cherry picked from commit a4b59d0213)
5 years ago
Nilashish Chakraborty 474e6b1094
Backport 2.9: nxos_telemetry - Fix fact gathering for sensor-groups (#66677)
* Fix fact gathering for sensor-groups (#66439)

(cherry picked from commit 5c158755fc)

Add changelog for nxos_telemetry fix

* Update 66439_fix_nxos_telemetry_facts.yaml

Co-authored-by: Mike Wiebe <mwiebe@cisco.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Sam Doran 0731fff994
[stable-2.9] Reinstall i18n files for PostgreSQL tests (#66734) (#66769)
I am removing these from the test image to reduce its size a bit.
(cherry picked from commit 9df9ed4cd3)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 13023455e1
[stable-2.9] display - remove extra new line after warning message (#65199) (#66768)
Add unit tests for display
(cherry picked from commit 8e195adda5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 3245b3dff2
[stable-2.9] synchronize - fix password authentication (#66542) (#66661)
On Python 2, leave all fds open since there is no mechanism to close specific fds with subprocess.Popen() on Python 2

Add unit tests.

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 617fbad743)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran c4f1e04bef
[stable-2.9] file - change _diff_peek type in argument_spec (#60428) (#66587)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
(cherry picked from commit 9b7198d25e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay a8b71747ae [stable-2.9] Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test.
(cherry picked from commit 965854fbd2)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sam Doran 29cdd1ccca [stable-2.9] Change package name in docker_setup integration test (#66572)
* Change package name

* Retry to hopefully get a good mirror
(cherry picked from commit f15050b09e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran e283c180d1 [stable-2.9] yum - fix bug where enablerepo is not honored when disablerepo all (#66557) (#66640)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

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

Co-authored-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
5 years ago
Matt Clay a951e007df [stable-2.9] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 41ec9a8516 [stable-2.9] Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
(cherry picked from commit 51e5b714e0)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Dusan Matejka c94aa6dde6 adjusted doc and argument spec in zabbix modules to match sanity requirements (#66176)
(cherry picked from commit 3456700420)
5 years ago
Mike Wiebe 5d16603b2e Test fix (#65132)
(cherry picked from commit 89954e6ef5)
5 years ago
Mike Wiebe 247c73432e Fix nxos_user roles bug (#65962)
(cherry picked from commit c2fed8603c)

Add changelog for nxos_user roles fix
5 years ago
Chris Van Heuveln 4f3dd5a043 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace

(cherry picked from commit 3252665a94)

Add changelog for nxos_vlans fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 984e38d829 Temporarily disable vpc peer-link tests (#66121)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 97aefb8e11)
5 years ago
Nilashish Chakraborty eab972a70e Fix defaulting neighbor password
Add debug (#65909)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit ae0df67539)

Add changelog for nxos_bgp_neighbor fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 1a7500b72a Always cleanup vlan interfaces (#65756)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 7af98f9724)
5 years ago
Ganesh Nalawade e6405715c8 Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

Fixes https://github.com/ansible/ansible/issues/65071

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test

(cherry picked from commit 74e9b1e219)
5 years ago
Jill R 13c40c70db Allow updating of ec2_group rules with EC2 classic ELB targets (#62374)
* Allow updating of ec2_group rules with EC2 classic ELB targets

Fix regression introduced in #45296 with EC2 Classic SGs

Fixes: #57247

Also add (unsupported) ec2 classic test suite with test case for this scenario

* move ec2 classic tests to conditional within ec2_group target

* clean up ec2_classic tests

* ec2_classic account can't run most ec2_group tests
5 years ago
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
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 66f089de4b ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list

(cherry picked from commit aba8f12495)
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
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
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
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
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
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
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
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
Lukas Kämmerling b087d9ad01 [stable-2.9] Fix and reenable hcloud tests
(cherry picked from commit 5ad61ed7c1)

Co-authored-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
5 years ago
Matt Clay 9ba42a50f3 [stable-2.9] Fix plugin paths for ansible-test pylint test. (#65526)
* Fix plugin paths for ansible-test pylint test.
(cherry picked from commit fb69d68)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 6074b48fd2 [stable-2.9] Disable failing hcloud tests.
(cherry picked from commit 85722c360f)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
chkp-orso 999f91a705 [2.9] Check Point: fix all modules to be able to get parameter with value false (#65110)
* fix all modules to be able to get parameter with value false (very important fix) (#65040)

* add import of future and __metaclass__

* fix all modules to be able to get parameter with value false (very importent fix)

* Update ignore.txt

(cherry picked from commit b1e6667664)

* Update ignore.txt

* Create 65043-enable-parameter-value-to-be-false.yaml

* Update 65043-enable-parameter-value-to-be-false.yaml
5 years ago
Matt Martz 95ff4372ec [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202) (#65427)
* [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202)

* Do not treat AnsibleUndefined as being unsafe. Fixes #65198

* fix yaml formatting.
(cherry picked from commit b08e7daf46)

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

* Linting fix

* additional linting fix
5 years ago
Andrey Klychkov 81a7957929 Backport of 65093, postgresql_lang: use query parameters with cursor.execute() (#65165)
* Backport of 65093, postgresql_lang: use query parameters with cursor.execute()

* fix CI tests
5 years ago
Sam Doran f5fa6ace4a [stable-2.9] Make Docker and Podman play nice (#65009) (#65015)
podman 1.4 now installs docker man pages. Add handler to remove docker packages to avoid test failure due to this conflict.

Adjust inventory_docker_swarm integration test
Add conditional to cleanup handlers to allow use of the setup_docker role without removing packages at the end of the play. The inventory_docker_swarm integration tests does its own cleanup..
(cherry picked from commit 6b2b876d43)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Jordan Borean 87d9a088d0 config manager str type vault source (#65023) (#65090)
* config manager str type vault source

* Convert vault text to_text earlier and add tests

(cherry picked from commit 7092c196ed)
5 years ago
Takashi Sugimura 95c023e1b2 Backport #58521, bug fixes to the Infoblox NIOS modules (#64972) 5 years ago
Mark Chappell b4cb407b4b AWS IAM Sanity test cleanup (#63961) (#64644)
* AWS IAM Sanity test cleanup

(cherry picked from commit fd54c54b51)
5 years ago
Abhijeet Kasurde c30e340094 [2.9] include_vars: Check NoneType for raw_params (#65301)
Lookup 'first_found' returns empty list which results in
raw_params checking. Check NoneType for 'raw_params' before
proceeding.

Fixes: #64939

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8d0c2cd4d5)
5 years ago
Felix Fontein b133384895 openssh_keypair: fix idempotence issue (#65017) (#65128)
* Fix idempotence issue.

* Add changelog.

(cherry picked from commit b36f572256)
5 years ago
Jordan Borean 03b5a6f5d6 galaxy - print HTTP reason on unknown error (#65273) (#65439)
(cherry picked from commit 6586b7132c)
5 years ago
Jordan Borean d93f56dccb Fix using a URL for galaxy collection install (#65272) (#65432)
* Fix using a URL for galaxy collection install

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit 694ef5660d)
5 years ago
Felix Fontein cf269667c1 docker_swarm_service: Sort lists when checking for changes (#63887) (#65221)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are
reported changed when the order of the items is different. This PR
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

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

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit a096cd08c5)
5 years ago
Matt Clay 68b8e0e797 [stable-2.9] Fix ansible-test handling of git submodules. (#65027) (#65075)
* Revert most of PR #61605 commit e218c9814c

This removes the git error handling that converted all git errors into warnings.

* Fix ansible-test handling of git submodules.
(cherry picked from commit ba273c72d8)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Jordan Borean 45cf977052 Correct win_dns_client test option name (#64967) (#64970)
(cherry picked from commit 096c3ffa80)
5 years ago
Jordan Borean cd37b2df60 become - stop using play context in more places (#62373) (#64965)
* become - stop using play context in more places - ci_complete

* Fix up review points

(cherry picked from commit 480b106d65)
5 years ago
Sam Doran 02a6ed9bda [stable-2.9] Fix firewalld integration tests for CentOS 8 (#64873) (#64924)
(cherry picked from commit 79a38c8a3a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 0a91afd3b1 [stable-2.9] Use newer version of podman on RHEL (#64934) (#64964)
- Use same podman version for RHEL 7 and 8
- Pin to version 1.4
(cherry picked from commit a385ad321b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 1c1a950a2d [stable-2.9] Fix setup_mysql8 tests for CentOS 8 (#64868) (#64926)
(cherry picked from commit 41f301fe1b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran e5b13bb9e3 [stable-2.9] Fix setup_postgresql integration test for CestOS 8 (#64871) (#64925)
(cherry picked from commit f8c741894a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 39dcfb1671 [stable-2.9] Fix filesystem integration test for CentOS 8 (#64866) (#64923)
(cherry picked from commit 082b1b6cca)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 84c9040d02 [stable-2.9] Fix setup_mysql_db for CentOS 8 (#64864) (#64920)
(cherry picked from commit 477fa63f68)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 918e7db2e8 [stable-2.9] Fix yum_repository tests for CentOS 8 (#64863) (#64919)
Refactor tests to run the same tasks with CentOS and Fedora using different variables.
(cherry picked from commit 05a7ce798d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 77e1f9f536 [stable-2.9] Fix lookup_passwordstore integration test for CentOS 8 (#64869) (#64918)
pass is no longer packaged in EPEL
https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
(cherry picked from commit 4291f09a68)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Martin Krizek 0de8379ee3 Fix ansible_failed_{task,result} undefined in rescue (#64831) (#64843)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789

(cherry picked from commit 5c0b2c151c)
5 years ago
Sam Doran af714a294d [stable-2.9] Fix iso_extract tests for CentOS 8 (#64861) (#64917)
- use setup_epel role rather than task which contains correct URL now since it has changed for EL8
- add conditional to setup_epel to prevent attempted installation on non-RHEL distros
(cherry picked from commit f2e605c856)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran cabeadb4b8 [stable-2.9] Fix paramiko_ssh test (#64857) (#64916)
(cherry picked from commit dd8a3ebb72)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 94a7de568c [stable-2.9] Fix setup_rpm integration tests for CentOS 8 (#64862) (#64915)
(cherry picked from commit 5d2a3ecbc4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 688d63305b [stable-2.9] Fix group integration test for CentOS 8 (#64858) (#64914)
(cherry picked from commit 5e3b6c84c7)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Jordan Borean ca5e7e7cc2 win_chocolatey: Fix error when choco.exe not found (#53115) (#64881)
* win_chocolatey: Fix error when choco.exe not found

* Slight tweak to check and added changelog fragment

* Removed ignore rule that's no longer needed

(cherry picked from commit 521d6465f6)
5 years ago
Jordan Borean 18af2d257f win_domain_computer module: Fix idempotence when name != sam_account_name (#56967) (#64816)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check

(cherry picked from commit 04b8f75ffa)
5 years ago
Gonéri Le Bouder 8b3d1581bd [stable-2.9] vmware_host_firewall_manager: fix #61332 (#63567) (#64410)
Since https://github.com/ansible/ansible/pull/56733, we were not able to apply
firewall rules with no `allowed_hosts` key.

closes: #61332

In addition, this patch ensures the `allowed_hosts` key accepts a dict,
instead of a dict in a single entry list.

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        - all_ip: False
          ip_address:
            - "1.2.3.4"
```

Should be written:

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        all_ip: False
        ip_address:
          - "1.2.3.4"
```

(cherry picked from commit ab2aaca61d)
5 years ago
Sam Doran af2def5507 [stable-2.9] Cleanup after MySQL integration tests (#63641) (#63863)
Add handlers to setup_mysql_db and setup_mysql8 to remove installed packages..
(cherry picked from commit 3e4ae42256)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Nathaniel Case 1e0d7ac25b [stable-2.9] Eos vlan override (#63639) (#63687)
* [stable-2.9] Eos vlan override (#63639)

* Fix overridden & deleted in eos_vlans

* Fix vlan creation in overridden

* Right, Python 2.6
(cherry picked from commit 741d529)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* eos_vlans: Never try to set vlan_id as a property (#63689)

(cherry picked from commit d98482c294)

* Add changelog
5 years ago
Sumit Jaiswal 65f945fab1 Fix IOS_VLANS override operation for new VLANs (#63667)
* Fix IOS_VLANS override operation for new VLANs (#63624)

* fix vlans override state

* adding code comment

(cherry picked from commit 4f2665810f)

* changelog for 63624
5 years ago
Nilashish Chakraborty 14b48062ee Fix traceback for empty config (#62520) (#63090)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 67213ccb4d)

Add changelog for vyos traceback fix
5 years ago
Nilashish Chakraborty 5558b43f27 Fix traceback for empty config (#62515) (#63089)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit fc5358cea0)

Add changelog for IOS-XR traceback fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Remove empty spaces
5 years ago
Felix Fontein e3f7b5327e docker_image and docker_login: move tests needing a registry into own target, add tests for docker_login (#62721) (#62951)
* Move tests with docker registry into own target.

* Add docker_login tests.

* Add step which makes sure hello-world:latest is around.

* Make work inside docker container.

* Add dependency.

* Use plaintext password.

* Forgot check_mode.

* Add no_log to avoid double log output in verbose mode.

(cherry picked from commit a79f7e575a)
5 years ago
Pilou 5ca92a848c package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) (#62825)
(cherry picked from commit 278398555d)
5 years ago
Sam Doran 3a5bd5be18 [stable-2.9] Account for empty strings when splitting the host pattern (#62442) (#62679)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
(cherry picked from commit 987265a6ef)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Felix Fontein 13db4b90a5 openssl_csr: fix tests (#63994)
* Make sure tests are validated with correct backend in mind.

* Fix tests.

(cherry picked from commit 35a412fab7)
5 years ago
Sloane Hertel 153f8341a5 Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog

(cherry picked from commit 371d7aae31)
5 years ago
Jordan Borean 93d9a091a3 [stable-2.9] Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
(cherry picked from commit 7acae62fa8)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
5 years ago