Commit Graph

4061 Commits (610487df3cb30e779655e300dcee3bf2529bbd42)

Author SHA1 Message Date
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
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
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
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 6074b48fd2 [stable-2.9] Disable failing hcloud tests.
(cherry picked from commit 85722c360f)

Co-authored-by: Matt Clay <matt@mystile.com>
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
Takashi Sugimura 95c023e1b2 Backport #58521, bug fixes to the Infoblox NIOS modules (#64972) 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
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
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 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