Commit Graph

5279 Commits (2b6d94c4c85a4fffeb592f058dcdd37bb05893cc)

Author SHA1 Message Date
The Magician cd8b42c376 Bug fixes for GCP modules (#64823) 5 years ago
Micah Hunsberger 19063166dd New Windows Module: win_file_compression (#56475)
* add win_compact module

* fixed line endings

* fix documentation

* Use cim method instead of wmi method

* renamed to win_file_compression
added single file support
added force option to avoid traversing large directory structures

* fixed end of file

* fixed renaming.
bench test still had win_compact as a module

* Removed more NTFS references and slight test tweaks
5 years ago
Sloane Hertel c1f280ba6e
Inventory CLI - Ignore settings for when vars plugins should run (#65073)
* Inventory CLI - Ignore settings for when vars plugins should run and just always run them

* Add note to porting guide

* Fix loading vars plugins

* changelog

* Remove a staging test for ansible-inventory since it ignores that setting
5 years ago
Gonéri Le Bouder 8f1af61851
vmware_guest: relax the requirements of the tests (#65192)
- 128MB or RAM is enough for most of the cases
- 1VCPU is also enough
5 years ago
Nabil BENDAFI 277dd54d45 Fix/archive empty file (#64895)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file
5 years ago
Mike Wiebe 89954e6ef5 Test fix (#65132) 5 years ago
Trevor Pounds 8daa42bb3d Support non-KV and KV v1/v2 secret engines (#64288)
* Support generic and KV v1/v2 secret engines.

Fixes #41132
Fixes #50598
Fixes #54462
Fixes #64150

* Update KV v2 compatibility notes/usage docs.

* Add tests for KV v1/v2 and generic secrets engines.

* Add changelog fragment.

* Add KV v2 behavior changes to porting guide.

* Fix pylint blacklisted name warnings.
5 years ago
Rostyslav a8fa432096 Add --override-arguments option to win_chocolatey module (#65101)
* Add --override-arguments option to win_chocolatey module

* Fix version and argument type

* Added changelog fragment and tests
5 years ago
Felix Fontein 0b8b5baecd
docker_container: add support for --cpus (#64683)
* Add support for --cpus.

* Adjust PR #.

* Add version_added.
5 years ago
Michael Cassaniti a096cd08c5 docker_swarm_service: Sort lists when checking for changes (#63887)
* 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>
5 years ago
Gonéri Le Bouder 239213baee
vmware_guest: do not use autoselect_datastore in test (#65191)
Disable the use of `autoselect_datastore` until https://github.com/ansible/ansible/issues/58541
is fixed.
5 years ago
John Chen c73288ad53 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
5 years ago
Pavan Bidkar d4c4c92c97 Fix issue 64503. Added pool to relocate spec (#64544)
VM relocate to destination host works without pool param when hosts are part of same cluster. but spec.pool is required when hosts are part different clusters.

Closes: #64503
5 years ago
Sam Doran d3f6943446
Remove postgresql_shared integration test (#65133)
Move test tasks into appropriate integration test
5 years ago
Jan Meerkamp 315cc2f3ea VMware: vcenter_folder checks nested parent folder path (#62741)
added possibility to create Subfolder by defining full path below datacenter

Closes: #64442
5 years ago
Diane Wang d05d5cfc39 VMware: add new module vmware_guest_controller (#59615)
Add the `vmware_guest_controller` module.
5 years ago
Prasad Katti 95bd92da04 Add integration tests for aws lightsail (#63770)
* Add integration tests for aws lightsail

* lightsail - use module_defaults instead of aws_connection_info

* lightsail tests - assert instance state on create

* Fix yaml syntax error

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

* [lightsail] create keypair as part of the testsuite

* Fix lightsail actions in compute-policy

* Add ability to delete keypair in lightsail_keypair
5 years ago
Michael Mayer d52af75c68 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
5 years ago
Mark Chappell f1311d3e98 Rewrite iam_policy using boto3 (#63924)
* reworked iam_policy

* Deprecate policy_document option

* deprecate defaulting skip_duplicates to true

* No longer explicitly catch ParamValidationError.

ParamValidationErrror is already caught by ClientError

* Work with complex policy objects rather than json documents

comparisons can better cope with the special cases (eg True vs "True" )

* Enable check_mode tests and fix related 'changed' bug

* changelog

* doc cleanup based on review
5 years ago
Felix Fontein b36f572256 openssh_keypair: fix idempotence issue (#65017)
* Fix idempotence issue.

* Add changelog.
5 years ago
Andrey Klychkov 509b989a9a postgresql_lang: use query parameters with cursor.execute() (#65093)
* postgresql_lang: use query parameters with cursor.execute()

* add changelog fragment
5 years ago
Xu Yuandong cc5132a8ba add a new module to configure isis on isis-view. (#63720)
* add a new module.

* update docs.

* update docs.

* update again.

* add __future__

* update docs, some args type

* update docs, some args type

* add integration test.

* add unittest.

* update for shippabel.

* update for syntax error.

* Update setup.yaml

* Update setup.yaml

* Update cleanup.yaml

* update for review.

* add notes.
5 years ago
Kevin Breit 2cf079bc8f Meraki - Remove integration tests which work with HTTP respons… (#64975)
- These are modular level and I'm not catching these anyways
- More appropriate for unit tests, at least for HTTPS
5 years ago
Abhijeet Kasurde 35cc26f8c0
VMware: Find unique tag using category id (#61082)
If two tags with same name and different category exists, vmware_tag_manager
used to take first found tag.

This commit use combination of tag and category to identify the category.

Fixes: #59379

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean f5133bec22
Fix up broken Windows test when run with coverage (#65085) 5 years ago
Chris Van Heuveln 3252665a94 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
5 years ago
Mark Chappell 7d4800deb1 Feature: iam_role tags (#63944)
* iam_role tags support

* Make sure we don't Camel -> Snake tags in our return values

* Minor documentation tweaks

* Add tagging tests

* Make sure we return the state of tags once we updated them

* Update lib/ansible/modules/cloud/amazon/iam_role.py

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

* Move boto3/botocore before we start making changes
5 years ago
Sam Doran 6b2b876d43
Make Docker and Podman play nice (#65009)
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.
5 years ago
Sam Doran 163904fe37
Fix timezone integration test for Fedora 31 (#65013) 5 years ago
Sam Doran fcd29406a2
Fix postgresql_lang integration test for CentOS 8 (#64872)
* Only search inside the role for files to include
When a role is called as a dependency, both roles are searched. This can cause the incorrect file to be included if it is picked up from the parent role.
5 years ago
Mark Chappell a815fdf8bb Update Route53 IAM policy so the Route53 tests run (#64886) 5 years ago
Jordan Borean 096c3ffa80
Correct win_dns_client test option name (#64967) 5 years ago
Klaus Frank 0efe5a666d Add full IPv6 support to win_dns_client - Fixes #55962 (#57577)
* Add full IPv6 support to win_dns_client - Fixes #55962

* Fix missing cast

* Add type to win_dns_client.py

* Remove version_added again, to hopefully make ansibot happy. Even though it was added as a response to the bot...

* Fix $params undefined error, that was introduced by fixing the "global variable" linting issue

* Fix casting error

* Fix inverted logic

* Fix rebase error

* Fix assignment to readonly variable

* Fix "reset IPv4 DNS back to DHCP adapter_name"

* Fix legacy windows server support (2008/2008R2)

* Fix 2k8

* Remove unecessary pslint ignore

* Added IPv6 tests, changelog fragment and further docs
5 years ago
Jordan Borean 480b106d65
become - stop using play context in more places (#62373)
* become - stop using play context in more places - ci_complete

* Fix up review points
5 years ago
Sam Doran a385ad321b
Use newer version of podman on RHEL (#64934)
- Use same podman version for RHEL 7 and 8
- Pin to version 1.4
5 years ago
Mario Lenz 034df49c56 VMware: New module vmware_host_dns (#64458)
* Restore module vmware_dns_config
* Remove domainname and change_hostname_to
* Changed version_added from 2.10 to '2.10'
* Add setup_attach_host: true to test case
* Add 'vcsim is not defined' block to integration tests
* Change 'result' to 'dns_config_result'
* Bugfix: Changing some static configurations while keeping others can crash the module
* Implement changing DNS config from DHCP to static on a cluster
* Update documentation for vmware_host_dns
* vmware_host_dns integration tests: Always revert to original DNS configuration, even if a test fails
* Deprecate vmware_dns_config
5 years ago
sky-joker 8301ad47c3 VMware: new module vmware_host_auto_start (#64605)
Fixes: #63905

* Add return parameters to return after module execution https://github.com/ansible/ansible/pull/64605#discussion_r344430717
* Add moid and use_instance_uuid parameters https://github.com/ansible/ansible/pull/64605#discussion_r344431003
* Add reset playbook for test case
* Delete HAS_PYVMOMI variable https://github.com/ansible/ansible/pull/64605#discussion_r344430877
* Fix because the default value of stop_action was wrong
* Fix multiple sanity test error for document related
* Fix remove unnecessary line break
5 years ago
Sam Doran 4291f09a68
Fix lookup_passwordstore integration test for CentOS 8 (#64869)
pass is no longer packaged in EPEL
https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
5 years ago
Sam Doran f2e605c856
Fix iso_extract tests for CentOS 8 (#64861)
- 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
5 years ago
Sam Doran dd8a3ebb72
Fix paramiko_ssh test (#64857) 5 years ago
Sam Doran 5d2a3ecbc4
Fix setup_rpm integration tests for CentOS 8 (#64862) 5 years ago
Sam Doran 5e3b6c84c7
Fix group integration test for CentOS 8 (#64858) 5 years ago
Sam Doran 3902c6dd9d
Fix MariaDB integration tests for CentOS 8 (#64859)
* Fix setup_mariadb for CentOS 8
Switch to using systemd for multiple instances on CentOS 7 and 8
5 years ago
Sam Doran 05a7ce798d
Fix yum_repository tests for CentOS 8 (#64863)
Refactor tests to run the same tasks with CentOS and Fedora using different variables.
5 years ago
Sam Doran 477fa63f68
Fix setup_mysql_db for CentOS 8 (#64864) 5 years ago
Sam Doran 16f070f318
Fix mariadb_replication tests for CentOS 8 (#64865) 5 years ago
Sam Doran 082b1b6cca
Fix filesystem integration test for CentOS 8 (#64866) 5 years ago
Sam Doran 41f301fe1b
Fix setup_mysql8 tests for CentOS 8 (#64868)
# Conflicts:
#	test/integration/targets/firewalld/tasks/main.yml
5 years ago
Sam Doran 73a2ee7318
Fix mysql_replication integration test for CentOS 8 (#64870) 5 years ago
Sam Doran f8c741894a
Fix setup_postgresql integration test for CestOS 8 (#64871) 5 years ago
Sam Doran 79a38c8a3a
Fix firewalld integration tests for CentOS 8 (#64873) 5 years ago
Micah Hunsberger 8ff6e4c68e win_iis_webapplication: add authentication parameters (#56033)
* add connect_as, username, password parameters
add tests

* fixed reference to undefined variable.
added version added to new options.

* add changelog fragment

* fix line endings

* use ansible facts to determine os version
remove unused iis version check
test checksum of iis configuration after backup

* correct assertion

* added more cleanup tasks.

* version added is now 2.10

* skip server 2008 r2 for now

* run tests on server 2012 and higher
5 years ago
Wilmar den Ouden 40071e5db3 win_disk_facts: Adds Win32_DiskDrive object to facts (#51595)
* Adds win32_disk_drive object to win_disk_facts

* Names class parameter for Get-CimInstance as requested in the devdocs

* Maps whole class and adds docs

* Improve matching of disks when UniqueID is different format

* Improve logic for PNPDeviceID mapping

* Adds test for win32_disk_drive
5 years ago
Jordan Borean 762fcf78b9
win_pester - Align dir scanning with Pester's defaults (#64880)
* win_pester - Align dir scanning with Pester's defaults

Co-authored-by: Coby Caldwell <cobycaldwell@gmail.com>

* Fix sanity issues
5 years ago
Gonéri Le Bouder 0aa59ce9ab vmware/test: use better name for datastores
In the VMware tests, we call the datastores `ds1` and `ds2`. The first
one is read-only, the second is read-write and can be used to deploy
VMs. The naming convention was not clear enough and source of a lot
confusion and mistake.

We now have two better names:

- ro_datastore, which is ... read-only
- rw_datastore, the one that we can use to deploy new VM.
5 years ago
Mark Chappell 551b17b8a2 ec2_vpc_net_info: integration tests (#62649)
* ec2_vpc_net: (integration tests) migrate to using module_defaults

* ec2_vpc_net: (integration tests) use a private subnet for the tests

* ec2_vpc_net_info: Add integration tests

* ec2_vpc_net_info: add cidr_block_association_set to documentation

* Update AWS hacking test policy to allow VPC CIDR disassociation

* Update test/integration/targets/ec2_vpc_net/tasks/main.yml

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

* Store vpc2 ID to make it clearer which VPC we're changing

* Be more consistent with our quoting

* Explicitly test that the VPC IDs haven't changed
5 years ago
johnbui423 db3994cb03 Default to python3 on Debian 10 (#63097) 5 years ago
Anusha Hegde e9feea2270 VMware: new module vmware_guest_serial_port (#63126)
The ask was to add an option in the vmware_guest itself. Upon inspection, a serial port can
be created in multiple ways and so can be a module in itself. Therefore, created a new module
called vmware_serial_port.

Fixes: #54956
5 years ago
Prasad Katti 9b0cdad4d4 Add a random component to state machine name in aws_step_functions_st… (#64476)
* Add a random component to state machine name in aws_step_functions_state_machine testsuite

* Pick a random number from a bigger set to avoid conflicts between parallel runs

Co-Authored-By: Matt Clay <matt@mystile.com>
5 years ago
Martin Krizek 5c0b2c151c
Fix ansible_failed_{task,result} undefined in rescue (#64831)
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
5 years ago
Daniel-Sanchez-Fabregas 04b8f75ffa win_domain_computer module: Fix idempotence when name != sam_account_name (#56967)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check
5 years ago
Shachaf92 f6ac4361e7 win_firewall_rule - support ICMP types and codes (#60361)
* win_firewall_rule - support ICMP types and codes

* Update main.yml

* Add more examples and change type to list
5 years ago
Anusha Hegde 3a9650df98 Merging conflicts and updating PR
Signed-off-by: Anusha Hegde
5 years ago
Anusha Hegde 4e7c0b3e21 Fixed review comments
Signed-off-by: Anusha Hegde
5 years ago
Anusha Hegde 907c66c082 Resolved merge conflicts 5 years ago
Gonéri Le Bouder 80bf24b17c vmware_guest_disk/test: use less disk space
Reduce the amount of space that is used on the datastore during the
test. This allow use to use lighter storage environment during the test.
5 years ago
Mark Chappell b5f484dcc3 ec2_eip Don't throw an exception when re-releasing an EIP (idempotency) (#62332)
* ec2_eip: (integration tests) move to using module_defaults

* ec2_eip: (integration tests) expand integration tests

Also clean up a little
- Delete EIPs when we finish testing them (reduce the chance of hitting limits)
- Rejig deletion so that it works when runs fail
- Add tests for ec2_eip_info

* ec2_eip: Minor doc tweaks

* ec2_eip: Don't throw an exception when we try to disassociate an already disassociated EIP

* ec2_eip: Add missing IAM policy (manage IGWs)

* ec2_eip: (integration tests) Use the VPC as a crude lock to avoid running parallel tests

We test that untagged EIPs come and go as we expect, if multiple tests are
running in parallel this confuses things

* Fix ec2_eip association
5 years ago
Gonéri Le Bouder 93d1a57d9a vmware_guest: fix the name of the test VMs
The test VM names must be deterministic, this way, the teardown playbook
can clean up the resources after the test execution.

See: https://docs.ansible.com/ansible/latest/dev_guide/platforms/vmware_guidelines.html#vm-names-should-be-predictable
5 years ago
GomathiselviS 143bafec9a eos_lacp_interfaces : Fix to - lacp port-priority not set when… (#64530)
* Fix bug 64453
5 years ago
Dusan Matejka fadf7a426f re-enable zabbix_host integration tests and add cleanup handlers 5 years ago
Nathaniel Case fed0496005
Fix eos_facts over local eapi (#64570)
* Fix eos_facts over local eapi

* Much better feedback when querying resources over local

* No need for that anymore

* Update comment

* Mkae sure facts are tested on local

resource modules might break this otherwise

* This test was not checking anything

* Pass over nxos_facts as well
5 years ago
Abhijeet Kasurde 47f9873eab
VMware: Handle slash in network name in vmware_guest module (#64494)
Encode slash in network name to work with vSphere API.

Fixes: #64399

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
PRASOON KARUNAN V 4bf79de8a6 Add output options for win_pester (#63583)
* add output options for win_pester

* fix typo

* correct variable name
5 years ago
Hidetoshi Hirokawa c0331053db Add encoding and codepage params to win_command/win_shell (#54896) (#54966)
* Add output_encoding_override params to win_command/win_shell (#54896)

This enhancement enables Ansible to parse the output of
localized commands that ignore the prompt code page.

* Added changelog and minor nits
5 years ago
haiyuan_zhang c11d73575b Fixes azure_rm_snapshot (#64542) (#64547)
* feature enhancement: make a snapshot from an existing managed disk.

* remove default creation option in argu_spec of azure_rm_snapshot

* fix pep8 related issue

* fixing broken integration test
5 years ago
Matt Martz b93d92ef9a
Set alter_sys=True instead of False to address backwards incompat (#64670)
* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match
5 years ago
The Magician b1849d1a3e New Module: gcp_serviceusage_service (#64588) 5 years ago
Diane Wang 0d851dda59 VMware: add new module vmware_guest_tools_info (#62860) 5 years ago
nkshrishail 00193f27eb nxos_lacp: updated tests to handle platforms not supporting lacp system mac command (#64074)
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command

* nxos_lacp: addressing comments

* nxos_lacp: Updating image tag search to include more tags
5 years ago
nkshrishail 964da2f442 nxos_lacp_interfaces: Updating the tests to handle platforms that don't support - lacp mode delay (#64123)
* nxos_lacp_interfaces: Updating the tests to handle platforms that dont support - lacp mode delay

* nxos_lacp_interfaces: Updating search string to include all 9500 series switches

* nxos_lacp_interfaces: Adding a comment about chassis_type
5 years ago
Chris Van Heuveln d5e30be686 nxos_igmp_interface: fix regression test failure (#64286) 5 years ago
nkshrishail 2be04e2bd6 nxos_overlay_global: Removing provider and correcting relative references (#64454) 5 years ago
Felix Fontein 574bd32db2
docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.
5 years ago
Felix Fontein dd5415017e
docker_login: allow to function with credential helpers (#63158)
* Allow docker_login to function with credential helpers.

* Improve various details and update docs.
5 years ago
Mario Lenz 5d30180f6b VMware: Implement updates for dvPG in vmware_dvs_portgroup (#62537)
* VMware: Implement updates / changes for dvPG in vmware_dvs_portgroup
* Remove unnecessary else
* Add more integration tests
* Improve create_vlan_list() helper function
5 years ago
Jill R 4e7779030d
route53_info max_items and next_marker should be a str (#64617)
* route53_info  max_items and next_marker should be a str

Type was changed in #64358, however boto3 takes a str for this option
Add some basic tests for route53_info.
Fixes: #64534
5 years ago
Matt Clay bbf376682f Disable failing aws_acm integration test. 5 years ago
Diane Wang 023a9b3166 VMware: vmware_export_ovf module fix Python3 compatibility issue (#60265) 5 years ago
Pavan Bidkar 9a54070fa2 VMware: Added check for temp_version type in vmware_guest(#64376)
Fixes: #64374

* Adding tests for create VM with interger version and latest version
5 years ago
Gonéri Le Bouder 35a8922988 prepare_vmware_tests: datastore host is datastore.test
Use an alias to access the datastore host. This way, it's easier
to use an existing NFS server.
We can also disable the `write` access on the iso datastore.
5 years ago
Jill R 1f5d2f9159 Enable aws_acm tests, AWS reports our account quota should be fixed (#64470) 5 years ago
Matt Martz 254788bc22
unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Martin Krizek cd8ce16d48
template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940
5 years ago
Andrey Klychkov 22fe622589 postgresql_subscription: new module (#63661)
* postgresql_subscription: setup master-standby cluster into one container

* postgresql_subscription: setup master-standby cluster into one container, fix

* postgresql_subscription: setup master-standby cluster into one container, set up publication

* postgresql_subscription: setup master-standby cluster into one container, add module template

* postgresql_subscription: setup master-standby cluster into one container, fix tests

* postgresql_subscription: setup master-standby cluster into one container, create subscr via shell

* postgresql_subscription: setup replication, state stat

* postgresql_subscription: add basic present mode

* postgresql_subscription: add assertions

* postgresql_subscription: add samples

* postgresql_subscription: state absent, cascade

* postgresql_subscription: add owner param

* postgresql_subscription: update

* postgresql_subscription: refresh

* postgresql_subscription: doc, warns

* postgresql_subscription: relinfo

* postgresql_subscription: fixes

* postgresql_subscription: fix CI tests
5 years ago
Chris Van Heuveln 008a95073d nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:

- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
  - fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces

- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
  - fixed by removing `port-channel` interfaces with the same ID; e.g.

```
  interface port-channel98
    switchport
    switchport mode trunk

  nx-1(config-if)# interface Ethernet1/19
  nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```

Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
5 years ago
Chris Van Heuveln 2f34318ceb Remove `timeout` parameter from `prepare_nxos_tests` (#63963)
The error below occurs when attempting to run `ansible-playbook` with nxos regression tests.

```
fatal: [dt-n9k5-1.cisco.com]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "commands": [
                "show interface brief | json"
            ],
            "timeout": 60
        }
    },
    "msg": "Unsupported parameters for (nxos_command) module: timeout Supported parameters include: commands, interval, match, provider, retries, wait_for"
}
```

This error appears to be a result of https://github.com/ansible/ansible/pull/62625, but that has not been verified.
5 years ago
Chris Van Heuveln 3b6681f889 nxos_lldp_global: fix regression tests (#64161) 5 years ago
Chris Van Heuveln 351f60b0e1 nxos_hsrp_interfaces: new module (#61498)
* nxos_hsrp_interfaces: new module

* lint 1

* lint 2

* add normalize_interfaces

* change version /2.9/2.10/

* /2.10/"2.10"/
5 years ago
Andrey Klychkov 9a8d73456c mariadb_replication: fix CI tests (#64481) 5 years ago
Matthew Davis 4ee9f40e62 Add aws_acm module (#60552)
* convert aws_acm_facts to AnsibleAWSModule

* factor aws_acm_facts into module_utils

* add more filtering options for aws_acm_info

* add aws_acm module and tests

* uncomment aws_acm test

* fix linting for aws_acm

* fix __future__ linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix aws_acm_info arg type

* remove test for old module name aws_acm_facts

* simplify AWS ACM client creation

* fix indent typo in aws_acm test

* catch BotoCoreError in aws_acm

* fix indent typo in aws_acm test

* tighten AWS ACM test policy resource

* move aws acm int test to venv

* remove errant file

* fix AWS ACM int test perms

* undo copyright addition to wrong file

* fix invalid log message in aws_acm

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

* rephrase aws_acm_info doc from facts to information

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

* rename aws_facts var to aws_info

* remove case insensitivity for aws_acm pem compare

* add no_log for aws_acm credential setting

* add per-test prefix to aws_acm test resource names

* make aws_acm use crypto module_util

* clarify copyright for aws_acm

* make aws_acm int test clearer

* add explicit crypto dependency to aws_acm

* change requests for aws_acm pr

* fix wrong copyright owner aws_acm test

* fix wrong copyright owner aws_acm test

* rewrite aws_acm cert chain compare with regex, no dependency

* fix linting for aws_acm unit test

* fix linting for aws_acm unit test

* fix linting and duplicate ignore

* fix failed cert chain split in aws_acm, add more tests

* remove errant file

* more linting fixes for aws_acm

* fix sanity ignore

* rewrite cert compare in aws_acm to use base64 decode

* improve regex for pem cert chain split in aws_acm

* undo changes to crypto module util for aws_acm

* increment ansible version for new aws_acm module

* convert aws_acm return(x) to return x

* increment version added for aws_acm_info new features

* fix linting

* fix bugs with AWS ACM

* fix bad rebase

* disable AWS ACM integration test, due to AWS account limit issue

* remove aws acm integration test from shippable group
5 years ago
Andrey Klychkov 04c999f0f8 postgresql_idx: add stat mode support (#64138)
* postgresql_idx: add stat mode support

* postgresql_idx: add stat mode support, add changelog

* postgresql_idx: add stat mode support, fix CI
5 years ago
The Magician 1a726d436e New Module: gcp_compute_target_instance (#64135) 5 years ago
The Magician 14cf1c1197 New Module: gcp_logging_metric (#64339) 5 years ago
Sloane Hertel c1f1b2029c
Support vars plugins in collections (#61078)
* Move var plugins handling to a separate file

* Allow var plugins to require whitelisting

* Add global configuration ('demand', 'start') for users to control when they execute

* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute

* Update ansible-inventory and InventoryManager to the global and stage configuration

* Update host_group_vars to use stage configuration and whitelisting

* Add documentation for using new options and to the developer's guide

* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility

* Changelog

Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Andrey Klychkov 73526b9d65 mysql_variables: add mode parameter (#63547)
* mysql_variables: add mode parameter

* mysql_variables: add mode parameter, add changelog fragment

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix sanity

* mysql_variables: add mode parameter, remove warns

* mysql_variables: add mode parameter, refactoring

* mysql_variables: add mode parameter, fix logic
5 years ago
Sloane Hertel 371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
5 years ago
The Magician 5dff5603af New Module: gcp_compute_reservation (#64133) 5 years ago
The Magician d865b7da71 Bug fixes for GCP modules (#64193) 5 years ago
Sergey 1ad3879430 Add podman_volume_info module (#63380)
Add module podman_volume_info that collects data about podman
volumes on the host. Acts as docker_volume_info module.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
5 years ago
Danilo Bargen 35c415de98 get_url integration test: Fix missing conditional (#64100) 5 years ago
Chris Van Heuveln ec1c5585af nxos_vrf: N6K regression test failures (#63277)
* nxos_vrf: N6K regression test needs 'nv overlay evpn'

* Add delay for vrf creation

* Revert "Add delay for vrf creation"

This reverts commit 8afa5281ff4b3c5a1775fbd40c5acb7ab5ecdf68.

* Add vrf_error_check w/delay to module

* whitespace

* httpapi fixes

* /input/input_data/ - 'input' is a built-in

* shippable retry
5 years ago
Felix Fontein fed267df03
openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.
5 years ago
Dusan Matejka 1f2d78b356 unify mongodb installation for both xenial and bionic in integration tests 5 years ago
Mark Chappell e6607d611a Sanity test fixups - AWS related tests (#64093)
* AWS tests Sanity Test fixups (add boilerplate)

* Remove sanity ignore.txt entries
5 years ago
Alexander Korsunsky b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
5 years ago
Mike Wiebe e82d407fa8 Add filter option to netconf_config module (#63593)
* Add filter option for netconf_config module

* Address review comments and add tests

* Refactor integration tests

* Address review comments

* Review comments

* Fix nxos_netconf include check
5 years ago
Jill R 003c26de04 iam_user Additional integration tests (#63768)
* Add tests that were originally part of pr59079 before being lost in a rebase

* missed a needed check_mode: yes and a test with a wrong group

* Clarify test name, fix resource, add user delete test

* Use AWSDenyAll for benign policy, chech policy with non-full ARN path works, fix wrong module copy-pasta
5 years ago
Rémi REY 9c17c7ad19 Add integration tests for grafana_datasource module (#63986)
* Add setup_grafana role for integration tests

* grafana_datasource: add integration tests for elastic datasource

* grafana_datasource: add integration tests for influxdb datasource

* grafana_datasource: add integration tests for postgres datasource

* grafana_datasource: add integration tests for cloudwatch datasource
5 years ago
Matt Clay c782831dd7 Disable failing zabbix_host integration test. 5 years ago
Robert Osowiecki 3c978a3225 lineinfile - don't run os.makedirs on empty dir path (#63921)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path
5 years ago
Felix Fontein 16d4d2dba9
acme_certificate: add select_chain option (#60710)
* Add select_alternate_chain option.

* Fix docs.

* Allow to match via subject key identifier and authority key identifier.

* Simplify test.

* Add comments.

* Add tests.

* Fix bugs.

* Also consider main chain when searching for alternatives.

* Bump version_added.

* Rename select_alternate_chain -> select_chain.
5 years ago
Felix Fontein 35a412fab7
openssl_csr: fix tests (#63994)
* Make sure tests are validated with correct backend in mind.

* Fix tests.
5 years ago
Gonéri Le Bouder 039c770a95 vmware_host_firewall_manager: fix #61332
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"
```
5 years ago
Andrey Klychkov defccd1d44 postgresql_db: allow to pass users names with dots (#64007)
* postgresql_db: allow to pass users names with dots

* postgresql_db: allow to pass users names with dots, add changelog fragment

* postgresql_db: allow to pass users names with dots, fix ci
5 years ago
kalimsshar 01a92f0191 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
5 years ago
Andrey Klychkov 88af9f6470 mysql_replication - accept empty string to the module's parameters (#63546) 5 years ago
Andrey Klychkov 3aaebba235 postgresql_privs: allow to pass roles with names containing dots (#63942) 5 years ago
Xu Yuandong 5c5a315a44 a new module to manage static route and bfd. (#58004)
* add a new module

* update for shippable

* update

* update for shippable

* update for shippable

* update for shippable

* update

* add unittest.

* update

* update integration

* update unittest

* update

* update unittest.

* update for syntax error

* update for reviewing.
5 years ago
Dusan Matejka 57c36e0378 Zabbix integration tests (#63744)
* adjusted setup_zabbix integration tests role to work on distributions from Debian family

* bumped zabbix_host integration tests role to be run against bionic
5 years ago
Will Thames 07ed860c2b Add more kubernetes Service tests (#62581)
* Add more kubernetes Service tests

Services can often go wrong, and one of the main motivations for
apply was being able to correctly modify them, so more tests are good

* Remove a port from a service for k8s testing

* Add a Service check mode to k8s tests
5 years ago
Xu Yuandong 68c997e4dd add a new module ce_lldp_interface. (#58252)
* add a new module ce_lldp_interface.

* update for shipabble

* update

* ad unittest

* update

* update

* update

* update

* update

* upate

* update

* update for shipable.

* update & add intergration tests.

* update for shippable.

* update

* import future.

* update.

* update.

* update docs.

* missing whitespace after ','

* update docs.

* update docs.

* update docs.

* Update ce_lldp_interface.py

* Update ce_lldp_interface.py

* update for reviewing
5 years ago
The Magician 9fe524248c New Module: gcp_runtimeconfig_config (#63883) 5 years ago
The Magician 50f85c9bdd New Module: gcp_runtimeconfig_variable (#63885) 5 years ago
Nathaniel Case 7f5d1ab2b7
Removed in 29 (#63680)
* Eh, 2.10 is close enough

* drop top-level authorize

* Remove from documentation

* Remove load_params

* Centralize this junos thing

* Fixup user modules

* I'm 95% sure this did not do what it was supposed to

* nxos_hsrp: I don't think this is an actual module parameter

* Try to fix junos_package tests

* Move local params to provider

* Promote 'timeout' to a real parameter for eos_eapi

* Don't assume provider exists?

* move another timeout

* Provider now always has auth_pass

* Fix junos tests to avoid NameErrors
5 years ago
Andrey Klychkov 40437d434e postgresql_membership: add CI tests for roles with dots (#63896) 5 years ago
Kyle Umstatter fb38c9cea9 Support PostgreSQL Custom Format (#63806)
* Support PGC Restores

* Fix whitespace

* support pgc both dump and restore
5 years ago
Adam Miller ed86907587 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>
5 years ago
Mark Chappell bd6d4b5b3a New module: iam_policy_info (#62955)
* iam_policy: (integration tests) migrate to module_defaults

* iam_policy: (integration tests) Rework iam_policy integration tests

* iam_policy_info: Add new module and add iam_policy_info tests to iam_policy integration tests
5 years ago
Martin Krizek 18b9ce8b82
Integration tests: prevent loop squashing (#63847)
1. the feature will be deprecated in 2.11
2. these modules support passing lists
3. loop squashing does not work with collections
5 years ago
Sam Doran 3e4ae42256
Cleanup after MySQL integration tests (#63641)
Add handlers to setup_mysql_db and setup_mysql8 to remove installed packages.
5 years ago
Andrey Klychkov b1e8a6c1cb mariadb_replication: improve CI tests (#63848) 5 years ago
Mark Chappell 4d72b69035 rds_subnet_group : Sanity Check fixes (docs) and Integration tests (#63214)
* rds_subnet_group: Fixup sanity test issues

* rds_subnet_group: Add integration tests

* rds_subnet_group: Add testing policy
5 years ago
Prasad Katti 56f52a0169 ec2_vpc_route_table_info integration tests (#63413)
* ec2_vpc_route_table_info integration tests

Make sure ec2_vpc_route_table_info return value has the right attributes.

* ec2_vpc_route_table_info integration tests for tags
5 years ago
Stefan Horning 7aac7a56da Added missing param to lambda module to pass it through to boto3 (#58822)
* Added missing param to lambda module to pass it through to boto3

* Allow updating of runtime, because there is no reason why not

* Updated version_added to 2.10 to make tests green again

* Updated RETURN docs of Lambda module

* Added tests to aws_lambda test-suite.
5 years ago
Sam Doran 92cd13a2cf
lineinfile - use correct index value when inserting at the end (#63696) 5 years ago
Sam Doran 29d4d318a5
lineinfile - properly insert line when line exists and backrefs are enabled (#63763)
Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object

Add integration tests to cover this scenario
5 years ago
Jill R aa68f728fd s3_bucket: Allow empty encryption_key_id with aws:kms (#62031)
* s3_bucket: Allow empty encryption_key_id with aws:kms to use KMS master key

* Add idempotency check and cleanup example, dont require encryption_key_id
5 years ago
Mark Chappell 145b79ef0e ec2_instance test cleanup (#63708)
* ec2_instance/ec2_instance_info : Fixup sanity test errors

* Move ec2_instance integration tests to use aws_defaults

* Search for the AMI instead of hardcoding an AMI

* Make our VPC CIDR variable

* Remove AZ assumptions - no guarantees about specific AZs being available

* Make sure we terminate instances when we're done with them.

* Add a 10 second pause for IAM roles to become available before using them

* Wait on instance changes by default

* Switch out t2 instances for t3 they're cheaper and have more CPU available

* Pull t3.nano instance info a little earlier

* rework vpc_name and vpc_cidr a little

* Mark ec2_instance tests unsupported for now, they take too long
5 years ago
Andrey Klychkov b6e997aa5f Cleanup after MariaDB integration tests (#63657) 5 years ago
zhongjun2 64989bea6a hwc: Add eip module (#60182) 5 years ago