Commit Graph

5611 Commits (2268a37d4d1ee93e7eb1b2eec656251f263adcf2)

Author SHA1 Message Date
Jill R c9b38bd74e
ec2_snapshot and ec2_snapshot_info test suite (#65896)
* ec2_snapshot and ec2_snapshot_info test suite

* Add a fact to make tests easier to follow.
Test all return values, and add missing RETURN docs to module.
4 years ago
Andrew Klychkov 59bcc9f739
Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog
4 years ago
sky-joker d0443909ff
Zabbix: add integration test for zabbix_user module (#66418)
* add integration test for zabbix_user module

* Fix syntax mistake

* remove unsupported languages ​​from integration test
4 years ago
Andrej Svenke f98874e4f9
ec2_asg: max_instance_lifetime and respect wait on replace (#66863)
* ec2_asg: max_instance_lifetime and respect wait on replace

* ec2_asg: max_instance_lifetime integration tests

* ec2_asg: address review comments
4 years ago
Dusan Matejka d2f4d305ee
Zabbix host tags & macros integration tests + zbx server version increase (#66997)
* bumped zabbix integration tests to be run against current LTS 4.4

* macros and tags tests for zabbix host + naming changes due to switch to zabbix 4.4
4 years ago
Mark Chappell c36f03b3e1
Add AWSRetry decorator to ec2_vpc_nacl (#67204)
* Add AWSRetry decorator to ec2_vpc_nacl

* Also add a decorator to ec2_vpc_nacl_info to catch things like API rate limit errors.

* add double-removal integration tests to make sure things don't get too slow

* Fixup retry usage for _info

* Simplify changed logic when modifying a NACL

* tweak error message
4 years ago
Oliver Kastler 0760a7ec08
Fix for shared snapshot parameter (#60250)
* Fix for shared snapshot parameter

Fixing this bug:
`Unknown parameter in input: "IsShared", must be one of: DBInstanceIdentifier, DBSnapshotIdentifier, SnapshotType, Filters, MaxRecords, Marker, IncludeShared, IncludePublic, DbiResourceId`

* Updated documentation for shared snapshots

Tags can't get accessed for shared snapshots

* fixed indentation

* added test for shared snapshot

* fixed isPublic parameter to correct IncludePublic parameter

Co-authored-by: Oliver Kastler <oliver@realestate.co.nz>
4 years ago
Sam Doran 7ae34cef15
Fix role list regression (#67436)
Add the roles_path parent to the role_parser
object, so paths are passed to the list function

Add basic role list tests to prevent future regressions
4 years ago
Vasili 9b28f1f5d9
Fix incorrect "Could not match supplied host pattern" warning (#66764) (#67432) 4 years ago
Matt Clay c45d193af4 Rename some integration tests.
This avoids confusion with tests named `inventory_*` which do not test inventory plugins.

Tests for inventory scripts are now prefixed with `script_inventory_`.
4 years ago
Jan Meerkamp 1d370bd189
VMware: vcenter_folder nested folder absent fix (#65283)
- no longer try to create folder which exists.
- correctly remove nested folders with absent.
4 years ago
Abhijeet Kasurde 7000c51c06 VMware: Add support for specify tag and category as dict
User can now specify tag and category using dict in vmware_tag_manager
module. This is useful when tag or category name contains colon.

Fixes: #65765

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* Add validate_collection_path function (#66441)

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
4 years ago
Mark Chappell 1b9b551b61
Explicitly chose an AZ for cloudformation and ec2_vol tests (#67425)
us-east-1e is sometimes picked at random, and has no support for
t3/m5 instance types, which breaks some tests.

Because availability_zones is returned in a consistent (sorted) order,
we should at least get either consistent success or consistent failure.
4 years ago
Gonéri Le Bouder 0c597f4434
vmware_guest_register_operation/test: no deprecated mod (#67411)
Don't use `vmware_guest_facts` to collect the Guest information. The
module is deprecated and replaced by `vmware_guest_info`.
4 years ago
Yanis Guenane b9bd2c25ca
Test: Bump TOWER_VERSION to supported version (#67378)
* Revert "Remove Tower module tests from CI. (#67368)"

This reverts commit b041d96762.

* Test: Bump TOWER_VERSION to 3.6.2
4 years ago
Jordan Borean 446a0c1b08
win_package - Refactor with msp, appx support (#66931)
* win_package - Refactor with msp, appx support

* Added msi test for ALLUSERS

* Added some msix tests, refactored tests

* Added remaining msix tests

* Enable msix sideloading for tests

* Added remaining exe path tests

* Added basic msp tests

* Remove url options now the util no longer has them

* Fix file version check for older Windows hosts

* Remove no_proxy ansible-test setting

* Use same mechanism of become to copy the file with explicit creds
4 years ago
Jordan Borean 2d9328cb0f
Added Ansible.Service util and win_service_info (#67367)
* Added Ansible.Service util and win_service_info

* Fix up util test

* Sigh forgot to update the test and fix sanity

* Try to make tests more robust

* That didn't work, just check the username

* Betraying Queen and country with this doc fix

* More changes for compat

* More OS compatibility
4 years ago
Matt Clay b041d96762
Remove Tower module tests from CI. (#67368)
* Remove Tower module tests from CI.

The required AMIs are no longer available.

* Mark Tower tests as unsupported.
4 years ago
tchernomax 53e043b5fe
combine filter: fine list handling (option b) (#57894) 4 years ago
Matt Clay a928db1420 Split out selinux setup in subversion test.
This avoids failures when the sefcontext module is not present.
4 years ago
Mark Chappell 8d574c3770
AnsibleAWSModule related cleanup - redshift (#66779)
* AnsibleAWSModule related cleanup - redshift

* Apply a backoff on modify_cluster to cope with concurrent operations

* Add AWS 'hacking' policy to allow creation of Redshift ServiceRole

* Adding the retry policies makes the redshift test suite more reliable
4 years ago
Gonéri Le Bouder 4231f34458 vmware: define more Zuul aliases
- vmware_content_library_info
- vmware_content_library_manager
- vmware_guest_disk
- vmware_host
- vmware_host
- vmware_host_firewall_manager
- vmware_host_ipv6
- vmware_host_powermgmt_policy
- vmware_vswitch
4 years ago
GomathiselviS 4ec1437212
Fix to - eos_vlans using state parameter replaced is giving odd behavior (#67318)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Adding files for RM static_routes

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* fix to bug #67313

* fixing rebase issue

* fixing rebase issue

* addressed review comments

* addressed review comments
4 years ago
Denis Krienbühl a4ec18d8a3
Cloudscale Regions and Zones Support (#67165) 4 years ago
petoju 8ac0bbcbf6
mysql_replication: add option to fail on error (#67322) 4 years ago
Matt Clay a61dcfd542 Mark `mariadb_replication` tests unsupported.
Only one integration test target is supported per module. Since there is already a `mysql_replication` integration test, the `mariadb_replication` tests will not execute for the same module.

To avoid issues with tests not running on changes to the `mysql_replication` module and then failing after changes are made and all tests are executed, the test has been marked `unsupported` to prevent it from running in CI.

To re-enable this test for CI it will need to be merged into the `mysql_replication` tests, which will require working around conflicts between the packages required by the two sets of tests.
4 years ago
Matt Clay 9788daf13b
Split up more lookup integration tests. (#67328) 4 years ago
Matt Clay cad0110228
Rename kubevirt inventory plugin test. (#67326)
* Rename kubevirt inventory plugin test.

This maintains association of the test with the plugin.

* Update ignores.
4 years ago
Matt Clay 274417d424
Improve test compatibility with ansible-base. (#67325)
* Remove shells from test that will be migrated.

* Fix binary_modules test to work without win_ping.
4 years ago
Matt Clay efc5d62c49 Use a custom test module for module_defaults test.
This avoids a dependency on a module which will not remain in the repo after migration.
4 years ago
Matt Clay 8774b2f697 Use `package` for `pkgng` and `zypper` in tests.
This allows tests to run on other platforms when `pkgng` or `zypper` are not present.
4 years ago
Matt Clay a3b7d67fb0
Split up platform cleanup in tests. (#67320)
* Split up platform cleanup for git test.

* Split up platform cleanup for ansible-galaxy test.
4 years ago
Mario Lenz 808bf02588
Remove options from some vmware modules that are not used in the code (#67282) 4 years ago
Nilashish Chakraborty 88f0c85228
Remove deprecated attributes from nxos_igmp_interface (#67186)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Matt Clay 11eee1181a Split out platform specific cleanup in pip test. 4 years ago
Matt Clay 89c8eb5a08
Split up lookup integration tests. (#67294)
* Split up lookup integration tests.

* Rename lookup_paths integration test.

This will avoid confusing it for a test of the `paths` lookup plugin, which does not exist.

* Fix lookup_pipe integration test.

The test now verifies it receives the correct output.

Adding a second task also causes code coverage to be properly registered for the lookup plugin.

* Rename ini lookup test to match plugin name.

* Update sanity ignore path.
4 years ago
Matt Clay c32348088a Remove conflicting integration test aliases.
Modules and plugins can only have one integration test target associated with them.

When there is a conflict between alias(es) and/or the target name, only one target will trigger on changes to the module or plugin.
4 years ago
Gonéri Le Bouder b65fc3527f vmware_guest_tools_wait: disable the function test
The test fails randomly in the CI with a timeout.
4 years ago
Sloane Hertel 3f5aed056b
Integration tests for notify with variable list (#66423)
Co-authored-by: Luca Berruti <nadirio@gmail.com>

Co-authored-by: lberruti <nadirio@gmail.com>
4 years ago
Matt Clay 88efb24ff8 Rename aci_switch_leaf_policy_profile test. 4 years ago
Matt Clay d86dcedef1 Rename scaleway_ssh test. 4 years ago
Matt Clay c2f7c4ae47 Rename rabbitmq lookup test. 4 years ago
Matt Clay a42a76190e Renamed meraki_webhooks test. 4 years ago
Matt Clay a68a8ef2f1 Rename netapp_eseries_* tests to match modules.
This will allow the ansible-base migration script to recognize the tests as being associated with their respective modules.
4 years ago
Matt Clay 0d430c2ccc Rename digital_ocean_ssh_key test. 4 years ago
Matt Clay f02ceaf66a
Fix AWS test names and aliases. (#67232)
* Fix AWS test names and aliases.

* Add missing alias.

* Rename ec2_vpc_vpn_facts test.
4 years ago
Matt Clay 6a79bb2b91 Simplify package install in unarchive test.
This will enable the test to work on supported platforms when modules for other platforms are not present.
4 years ago
Matt Clay c92697acec Move tower_common tests with tower_organization. 4 years ago
Matt Clay c10f4a8156 Rename azure_rm_workspace test. 4 years ago
Matt Clay 415409c6e3 Rename azure_rm_virtualmachineimage_facts test. 4 years ago
Matt Clay 64567cf4f6 Split tasks for prepare_http_tests.
This allows setup of a platform to run even when modules for another platform are not present.
4 years ago
Matt Clay 7724fb8f33 Split handler tasks for setup_remote_tmp_dir.
This allows a platform handler to run even when the module required for the other platform is not present.
4 years ago
Gonéri Le Bouder 802cc60242 vmware_guest_tools_wait: add timeout parameter
Add a new `timeout` parameter to `vmware_guest_tools_wait`.

Also, a functional test to cover the module.
4 years ago
Paul Belanger 4863efd0df
Remove yaml stdout_callback plugin from network-integration tests (#67203)
With the move to collections, yaml is no longer in ansible base. Switch
back to default stdout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Gonéri Le Bouder 4a1115785f vmware_guest_network/test: disable the test
The test fails in the CI with a timeout of vmware_guest_tools_wait. It's
still unclear if this comes from:

- the ESXi environment
- the VM configuration, e.g: the amount of the RAM
- the ISO image itself

Ideally, we should have a light VM with the vmware-tools.
4 years ago
Paul Belanger bf4dac10fa
Revert "WIP: testing ansible-base (#67149)" (#67175)
I didn't properly update the commit message via github UI. Revert, to
open a new PR.

This reverts commit 2794142eb3.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Paul Belanger 2794142eb3
WIP: testing ansible-base (#67149)
Currently, yaml stdout_callback is not in base.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Todd Lewis 640bf31f87
user - allow 'groups', 'append' with 'local' (#62134) 4 years ago
Paul Belanger c3635532d3
Revert "Allow httpapi for EOS resource modules (#66871)" (#67131)
This looks to be causing issues for our new ansible.netcommon
collection. Revert for now, until we can properly address.

This reverts commit 53c7f8cbde.
4 years ago
Matt Martz 0e46af17a5
Nuke all removed_module stubs (#67139)
* Nuke all removed_module stubs

* Remove ignores and botmeta entry
4 years ago
Ruediger Pluem 80c4b86abe
group - correctly determine if a local group exists. (#59772)
Fixes #58619
Add integration test
4 years ago
Markus Bergholz 822077fefd
Asg mixed instance types (#67045)
* merge from origin pr 55067

* handle update existing asg with mixed-instance-policy

* fix documentation and append output

* update output documentation

* update documentation version added

* add integration test for mixed instance policy using launch template

* add changelog fragment

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

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

* add warning about botocore version and add expand example documentation

* Update changelogs/fragments/67045-ec2_asg_mixed_instance_policy.yml

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* remove useless line

Co-authored-by: Yi-Tse Hong <yitse.hong@soocii.me>
Co-authored-by: Mark Chappell <mchappel@redhat.com>
Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
4 years ago
Jordan Borean 78470c43c2
Removed deprecated items in Windows modules (#67105) 4 years ago
GomathiselviS 4ac89b8ac7
Added Fix - Allow nxos_l2_interfaces to append the allowed vlans list (#66517)
* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Bug Fix 65332

* Added testcase for #66517

* Removed unnecessary commit

* fixing conflicts

* fixing conflicts

* addressed mikeweibe's comments

* Corrected lint errors

* Added idempotent tc for add vlans

* Added replaced and overridded tcs for trunk vlan add
4 years ago
Erwin Oegema 3b32f95fb3
user - warn if "append" is set but not "groups" (#65795)
This fixes people unknowingly changing the primary group rather than adding a secondary group.

* Add integration test
4 years ago
Jordan Borean 3ada0b2f65
win_uri: fix up tests (#67064) 4 years ago
Felix Fontein 23b2bb4f4d
docker_container: change behavior for one-port container ranges to be same as docker CLI (#66382)
* Adjust docker_container behavior for one-port container ranges to be similar to docker CLI.

* Add changelog.

* Add documented examples for ports:.
4 years ago
Andrew Klychkov 21ae66db2e
postgresql_user_obj_stat_info: new module (#66892)
* postgresql_user_obj_stat_info: new module

* fix sanity

* add schema parameter

* add CI tests

* add RETURN section

* add example with schema

* fix CI

* fix example comments

* skip aix

* fixes part 1

* fixes part 2

* fix CI

* fix CI

* fix doc formatting
4 years ago
Nathaniel Case 53c7f8cbde
Allow httpapi for EOS resource modules (#66871)
* Redo tests to be transport agnostic

cli -> eos config

* Redirect connection for httpapi

* Fix tests

* Handle missing platform imports
4 years ago
Felix Fontein 8f10db8552
Do fail instead of regenerate for password protected and invalid keys. (#65638) 4 years ago
Felix Fontein d6fb9da8ed
openssl_* modules: allow direct input and output for some files (#65400)
* Allow to return generated object.

* Use slurp module instead of file lookup + b64encode.

* Rename return_xxx_content -> return_content.
4 years ago
Andrew Klychkov 3baea92ec9
Bugfix of 54239: mysql_variables not supporting variables name with dot (#66806)
* Bugfix of 54239: mysql_variables not supporting variables name with dot

* add changelog

* add CI tests
4 years ago
Toshio Kuratomi f5e194cbcd
Move random_mac into its own file (#67000)
* Move random_mac into its own file

This is likely to be the only filter which is not included in
ansible-base.  So it needs to be in its own file.
4 years ago
Andrew Klychkov 54520c4685
mysql_user: priv parameter can also be a dictionary (#66801)
* mysql_user: add priv_dict parameter

* add changelog

* priv can be string or dictionary

* fix example
4 years ago
Mark Chappell 813091cf94
Migrate ec2_vol_info to AnsibleAWSModule (#66979)
* Migrate ec2_vol_info to AnsibleAWSModule

* Enable ec2_vol_info tests

* Add changelog

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

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
4 years ago
Felix Fontein f1a30164c5
Fix 'container_default_behavior: no_defaults'. (#66601) 4 years ago
Jordan Borean 2a9ec8975f
win_unzip - LiteralPath fix (#66972)
* win_unzip - LiteralPath fix

* Fix up Python sanity issues
4 years ago
Gonéri Le Bouder 2ea159eefd vmware_cluster_facts does not set hosts key
Since https://github.com/ansible/ansible/pull/61006 `vmware_cluster_info`
exposes a new key called `hosts`. The deprecated module
`vmware_cluster_facts` keeps the previous behaviour, and so we must keep
its test-suite unchanged.
4 years ago
Matt Clay 4452f506a8
Split up filter integration tests. (#66962)
* Split out json_query filter tests.
* Split out urlsplit filter tests.
* Split out ipaddr filter tests.
* Split out urls filter tests.
* Split out mathstuff filter tests.
* Clean up core filter tests.
4 years ago
Felix Fontein 5fdc9a61f0
docker_container: pass volumes only for anonymous volumes (#66600)
* Simplify code.

* Only pass anonymous volumes.

* Add changelog and update porting guide.

* Add integration tests.
4 years ago
Yanis Guenane 4fd2dce7f3
Testing: Add support for AIX platform (#65802) 4 years ago
Matt Clay 479845a05c
Expand Shippable test matrix. (#66912)
* Add 2 CI groups for AWS.
* Add 1 CI group for vmware.
* Add 1 CI group for CS.
* Add 1 CI group for posix.
4 years ago
Gonéri Le Bouder 6e2fff1acc vmware_vswitch/test: clean up vmswitch_0002
Ensure `vmswitch_0002` get removed from ESXi2 at the end of the test.
4 years ago
Matt Clay e64b279ea1 Add CS smoketest group for CI. 4 years ago
Sam Doran 9276dd2007
file - change warning to error (#66671)
When 'src' is specified without 'state', raise an exception
4 years ago
René Moser 91063f40d6
tests: ipify_facts: retry on fail (#66897) 4 years ago
ngp-star 8ba324a33d
VMware: shares and io limits support while adding new disk (#64087)
Fixes: #25714
4 years ago
Andrew Klychkov 308723c3ca
postgresql_idx: revert PR for 64138 (#66889) 4 years ago
René Moser 4752547d35
ecs_tag: remove state=list (#66811)
* ecs_tag: remove state=list

* adjust tests
4 years ago
Sam Doran cc2376b782 include_vars - fix stack trace when run ad-hoc with dirs parameter (#66581)
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.
4 years ago
Martin Krizek 365f2aaed1 get_url: remove deprecated headers string format (#66649)
Fixes #61891
4 years ago
digi 5409904c35 vmware_cluster_facts: adds list of host in cluster (#61006) 4 years ago
Matt Clay 965854fbd2
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.
4 years ago
Gonéri Le Bouder bdceab379e vmware: adjust the module/Zuul jobs mapping
- vmware_host_active_directory: we need an Active Directory to run the
  test
- vmware_vm_storage_policy_info: we just need a vcenter
4 years ago
Mark Chappell 0ceac57bc6 AnsibleAWSModule related cleanup (batch 2) (#65987)
* Remove redundant use of ec2_argument_spec where we're using AnsibleAWSModule

* Use module.client() instead of the get_aws_connection_info/boto3_conn combo.

* AnsibleAWSModule handles 'HAS_BOTO3'

* Remove unused imports

* Update error message that lambda_policy integration test is looking for when the region's missing

* Revert redshift and s3_bucket
5 years ago
Andrew Klychkov 70017e2679 postgresql_db: add dump_extra_args parameter (#66717)
* postgresql_db: add dump_extra_args parameter

* add changelog

* fix doc

* fix example
5 years ago
Sam Doran 9df9ed4cd3
Reinstall i18n files for PostgreSQL tests (#66734)
I am removing these from the test image to reduce its size a bit.
5 years ago
Michael Pechner 85b5f89ed6 ecs_tag and integration tests for new feature request (#66603)
* Added integrations test for ecs_tag
Testing invalid cluster test for the expected message.
Add idempotency test is  for adding tests to service and task_definition.
5 years ago
dexpl 1152774f92 git - add an 'archive_prefix' option (#66067)
Add integration tests for new option
5 years ago
Pilou bbbdc1c25c throttle: fix linear based strategies (#65422)
* 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>
5 years ago
Prasad Katti b16525b841 [aws] integration tests for ec2_vol (#66193) 5 years ago
Albert Siersema 4a0c875447 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
5 years ago
Andrew Klychkov 72fbed2c61 postgresql_user: add comment parameter (#66711)
* postgresql_user: add comment parameter

* add changelog

* fix CI
5 years ago
Abhijeet Kasurde fc6476bd72
VMware: Handle multiple tags with different category (#66465)
vmware_tag_info used to return dict of tag information which caused
data loss when there are multiple tags with same name and different category ids.
This fix will add additional fact "tag_info" which will deprecated existing fact
"tag_facts".
The "tag_info" is a list which handles multiple tags with same name.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Rhys Campbell 05e034f899 Arbiter change and test additions (#59883) 5 years ago
Andrew Klychkov fabb2eb555 mysql_db: add skip_lock_tables option (#66688)
* mysql_db: add skip_lock_tables option

* add changelog fragment
5 years ago
Martin Krizek ec371eb227 Set HostVars._variable_manager's attrs (#65508)
When HostVars are part of the data that goes through (de)serialization
when being passed from a worker process to the main process, its
variable manager reference loses some of its attributes due to the
implementation of __getstate__ and __setstate__ (perf utilization).
Since HostVars already has those attributes, use __setstate__ to assign
them.

Fixes #65365
5 years ago
Sumit Jaiswal 0c4f167b82
fix 66530 (#66654) 5 years ago
Mike Wiebe 5c158755fc Fix fact gathering for sensor-groups (#66439) 5 years ago
Matt Clay 8f02022353 Remove unstable from aws_acm integration test.
The quota for the CI account has been increased, so tests are once again passing.
5 years ago
Jill R d8c2f4738e CI is hitting 'maximum number of 2200 certificates' again, marking aws_acm unstable (#66665) 5 years ago
Adam Miller 22fe22f796 yum - fix bug where enablerepo is not honored when disablerepo all (#66557)
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>
5 years ago
sky-joker 1befb52321 VMware: add properties option to vmware_datastore_info module (#62940)
* add_properties_option_to_vmware_datastore_info
* fix document indent error
* add changelog file for vmware_datastore_info
5 years ago
Chris Van Heuveln 7fabb28d22 nxos_gir timeout fixes (#66043)
* nxos_gir timeout fixes

* additional setup/teardown cleanups for sanity test

* Add timeout extension comment to module header

* lint

* rework logic to use action plugin
5 years ago
Gonéri Le Bouder 986be77337 vmware_host_powermgmt_policy/test: just one esxi (#66515)
Since the run the test playbook in a vcenter+1esxi scenario, there is no
need of second host.

The commit also simplify the logic of the test.
5 years ago
Gonéri Le Bouder 2d0ccdc98c vmware_host_acceptance/test: fix the functional test (#66576)
Ensure the functional test is actually run. It works fine on a real
environment.
5 years ago
Paul Belanger f46af19702
Revert "eos_config: Added fix for bug #54400 - support for !! in config mode (#63694)" (#66591)
This actually breaks iosxr_config, revert for now to make tests passing
again.

This reverts commit 7ddf7474d3.
5 years ago
Sam Doran 5db00a05b6
Disable mongodb_user test (#66595) 5 years ago
Sam Doran f15050b09e
Change package name in docker_setup integration test (#66572)
* Change package name

* Retry to hopefully get a good mirror
5 years ago
Gonéri Le Bouder a3dfabfdba vmware_host_ipv6/test: reset status before new check
Ensure a disable IPv6 before we try to re-enable it. This to get a
consistent result.
5 years ago
Gonéri Le Bouder 5280042901 vmware_host_dns: consistent rslt when name changes
This commit address a problem in static mode, if the hostname change,
`host.name` value with change too. And as a result:

    results['dns_config_result'][host.name]

will be initialized.
We now record the initial hostname first, and uses it as the key for the
results.

This commit also ensures hostname and search domain change are detected if
`instance.dnsConfig.dhcp` is true.

Finally, if we target a cluster, the `changed` result will depend on the
number of nodes.
5 years ago
Gonéri Le Bouder b183d36c53 vmware_export_ovf/test needs an ESXi
Ensure the `vmware_export_ovf` test-suite runs with at least one ESXi.
5 years ago
Gonéri Le Bouder 437b8b3807 vmware_export_ovf/test: don't use a rescue block in test
By using a `rescue` block, we can potentially hide a really problem in the
block and return a success. This is a bit problematic for a functional
test.
5 years ago
Gonéri Le Bouder ae6317004e vmware_guest_network/test: create the dvswitch
Ensure the DVSwitch and the portgroup are created by
`prepare_vmware_tests`.
5 years ago
Mario Lenz 864a3fd59d VMware: Add advanced settings to vmware_cluster_drs (#66233)
* VMware: Add advanced settings to vmware_cluster_drs

* Add DRS advcanced settings example
5 years ago
Sam Doran 9b7198d25e
file - change _diff_peek type in argument_spec (#60428)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
5 years ago
GomathiselviS 7ddf7474d3 eos_config: Added fix for bug #54400 - support for !! in config mode (#63694)
* Corrected lint errors

* Added fix for bug # 54400

* Resolving conflicts
5 years ago
Florian Apolloner a7e4479d01 Fix DNF idempotency. (#66209) 5 years ago
Anusha Hegde 9fd66556a6 VMware: new module to clone VM/template Cross-vCenter (#66156)
* Adding documentation and integration test for the new module
* Correcting typo
* removed unused if else block
* changing error messages
* Addressed review comments
* resolving sanity error
* fixed typo in vmware.py
* Added support for datastore cluster
* adding state parameter instead of power on fixed few more review comments
* Documentation update
* Updating argument
5 years ago
haiyuan_zhang bc37ea96d5 Vmss scale in policy (#66512)
* azure_rm_virtualmachinescaleset: add scale_in_policy and terminate_event_notification

* azure_rm_virtualmachinescalesetinstance: add vmss instance protection policy support
5 years ago
Gonéri Le Bouder b9b2ddc580 prepare_vmware_tests: no waiting loop during DS probing
For a refresh of the datastore list on the vcenter, this before we
check the present of the newly attached datastores.

A lot of tests depend on the presence of the DS, and this little
change allow us to save =~ 45s everytime.
5 years ago
Gonéri Le Bouder f956581846 vmware_host_auto_start: enable the tests
- remove the unsupported alias
- refactoring
- move the hosts outside of the cluster to avoid any conflict with DRS
- import the `prepare_vmware_tests` role
- does not work with govcsim
5 years ago
Paul Belanger af3603f9ee Revert "Allow httpapi for resource modules (#62843)" (#66483)
While this does properly pass our testing for ansible/ansible devel
branch, it is currently breaking our collection testing for 2.10.

Specifically, this would mean ansible.netcommon would need to directly
import arista.eos or cisco.nxos collections, causing a circular dependency.

This reverts commit e266e5f8b6.
5 years ago
Gonéri Le Bouder 3103fd62dd vmware_vmotion/test: ensure we can run tests
Some adjustments to be able to run the test-suite properly:

- Starts with the ESXi out of the cluster to be able to deploy the
  VM on a proper host consistently
- Ensure the resource pool exists
- The resource pool is called `DC0_C0_RP1`, not `Resources`
- Avoid an exception if we try to move a non existing VM.

Put the test in the zuul/vmware/vcenter_2esxi group.
5 years ago
Abhijeet Kasurde afb71c14bd
VMware: Use existing DVPG network in vmware_guest_network (#65994)
* Handle all cases of networks

Fixes: #65968

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Gonéri Le Bouder 222b6dec8a vmware_guest_serial_port: avoid autoselect_datastore (#66481)
Avoid `autoselect_datastore` until #58541 gets fixed.
5 years ago
Nathaniel Case e266e5f8b6
Allow httpapi for resource modules (#62843)
* Redo tests to be transport agnostic

cli -> eos config

Redirect connection for httpapi
5 years ago
Sam Doran ad341ea4bb Fix unarchive integration test failure due to rpm error (#66420)
* Fix unarchive integration test failure
* Do not cleanup pip packages
5 years ago
Matt Clay 51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
5 years ago
Gonéri Le Bouder 223e1675f4 vmware_local_role_info/test: avoid json_query
Refactoring to avoid the use of `json_query`. As a bonus point, we now
also ensure `NoAccess` role has no provilege.
5 years ago
Felix Fontein a79ca57d22
Fix aws_ssm connection plugin. (#66393) 5 years ago
Felix Fontein 663f9cda25
Disable failing tests. (#66391) 5 years ago
Felix Fontein c380b18dcf
openssl_* modules: allow direct input for some files (#66384)
* Allow to not read content from file.

* Allow to feed content directly into _info modules.

* Allow to feed non-primary content into openssl_certificate, openssl_csr and openssl_publickey.

* Rename changelog.
5 years ago
Andrew Klychkov 515c4a7e2c Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3 (#66331)
* Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3

* add changelog

* fix

* change changelog fragment, add example
5 years ago
psharkey f8fb391548 new connection plugin aws_ssm (#49652)
* new connection plugin aws_ssm

Return code may be at the end of the last command output line.

Marking regex.

Ensure command status code is on it's owm line - last 3 lines are not part of command stdout.

* Adding timeout parameter - aws_ssm_timeout

Default 10 second timeout (https://docs.ansible.com/ansible/2.4/intro_configuration.html#timeout) is marginal.
This avoids changing this default and allowing the SSM timeout to be controlled via inventory.
This change wraps commands so commands which may never return do timeout.

* Added integration tests

Added AWS SSM Executor, target and config functions

Fixed more code for integration tests

Improved execution

Added S3 bucket name

Fixed pylint

Reverted lib changes

Reverted few more changes

Improved support for integration test execution

added ansible role for aws_ssm_integration_test setup and teardown and modifiled runme.sh

Reset to 17fa565 commit

inventory file location changed

change inventory file location

deleted meta and handlers folder as it is not required

deleted main.yml inside vars, removed extra space from tasks/main.yml, Added appropriate tags for ec2 and delete test folder as it is not required

deleted main.yml inside vars, removed extra space from tasks/main.yml, Added appropriate tags for ec2 and delete test folder as it is not required

modified task/main.yml

added region variable and fixed pattern for using variable

modified policy for IAM role

moved to first line of scrip set -eux

Updated Session Manager plugin installation

edited custme policy

Included tags for Session Manager plugin installation

Added README.md

Upddated README and added support for ssm-plugin for Amazon-Linux

Added Windows Integration test support

Improved user data for Linux

Added random value generation for the role and policy,delete vars_to_delete.yml

upadte README in vars

fixed typo

update policy

Updated IAM policy file

update playbook

Updated playbook to include ssm-agent userdata

modified jing2 template

modified jing2 template

modified jing2 template and fixed role deletion

fixed role name issue while deleting and task name

Updated playbook to include wait_connection for ec2

Corrected Synatx changes and updated ssm-plugin debian file

Changed region variable to us-east-1

Removed vars file and updated  to /tmp dir

fixed typo

Improved setup

Fixed boto3 dependency

Fixed missing tag

Added boto as dependency as well

Improved execution workflow

Trying other way of defining tags

Fixed undefined var

Changed AMI ID to Amazon Linux

Improved Tags

Ok, created different directory for WIndows test execution

Fixed IAM Role Name for Windows

Fixed inventory not found

Improved integration test execution

Fixed Windows Inventory path

Fixed wrong Windows AMI ID

Fixes issue for windows test execution

* Don't attempt to terminate sessions without a session id.

* Added Unit test cases file for AWS SSM Connection plugin

updated test file with close

updated unit test file with start_session

updated test files

* Eliminate AWS CLI dependency for terminal session.

* Removing unused code, cleanup logic.

Reduce mark length - 52^26 should be plenty
Be explicit about subprocess.Popen options
Simplify if/else for mark end
_stdin_readline is not used now

* updated test file

Added exec command and fixed close session unit tests

updated test files

Improved ansible ssm test command

updated file for lint checks

updated for pylint checks

New Unit_testcases for pre-signed URL file

removing additonal spaces and white spaces

remaning error changes

fixed changes

fixed spaces issues

python 2.7 version and whitespaces

python 2.7 version and whitespaces

python 2.7 skip if

space issue with 16:1

Unit test cases for windows and linux

Unit test cases for windows and linux with issues fixed issues

Unit test cases for windows and linux with issues fixed issues1

* Added support for S3 Pre-signed URLs

* Updated documentation and comments

* Documentation and curl dependency removal for controller machine

Fixing lint errors and removing requirements.

* Adding support for Windows remote EC2 instances.

* Added Encoding fixes

* Updating author section and adding obvious requirement for the SSM agent.

* Refactor stdout post processing
Attempt to get real return code on error (test using ansible -m raw -a 'cmd /c exit 99'.
Fixes problem at terminal width (ansible windows -i ./hosts.yml -m setup).

* Refactor back to a single module.

* Fixed fetch file for windows

* ssm usage examples for linux and windows

* Update aws_ssm.py

Service state corrected.

* Strip line continuation when at terminal width - otherwise replace.
Strip ANSI control sequences only for Windows.

Test playbook:

---
- name: test
  hosts: windows
  gather_facts: False
  vars:
    small: 'abc'
  tasks:
  - name:
    set_fact:
      large: "{{ lookup('password', '/dev/null length=2000 chars=ascii_letters,digits,hexdigits,punctuation') }}"
  - name: small fixed
    raw: echo '{{ small }}'
    register: small_result
    changed_when: False
  - name: check
    assert:
      that:
        - "(item | length) == (small | length)"
        - "item == small"
      msg: "'{{ item | length }} must equal '{{ small | length }}' and '{{ item }}' must match '{{ small }}'"
    with_items:
      - "{{ small_result.stdout_lines[0] }}"
  - name: large random
    raw: echo '{{ large }}'
    register: large_result
    changed_when: False
  - name: check
    assert:
      that:
        - "(item | length) == (large | length)"
        - "item == large"
      msg: "'{{ item | length }} must equal '{{ large | length }}' and '{{ item }}' must match '{{ large }}'"
    with_items:
      - "{{ large_result.stdout_lines[0] }}"
  - name: gather facts
    setup:

* Correct module parameter names.

* Updated Windows Executable variable.

Updated Windows Executable variable to "ansible_shell_type".

Fixing Examples with raw declaration

Updated the plugin timeout variable.

* Fix to work with dynamic inventory plug-in

* IntegrationTest template updates

* Removing unsupported flag for integration tests.
Fixing unit test.

* Adding shippable group.

* SSM Usage examples with dynamic inventory plugin

* Fixing yamllint errors.

* Fixed Integration tests

* Fixed Integration tests

* Updates for python3.

Removing python3 restriction.

* Remove python3 restriction.
Change block from retry to always

* Fixed Integration tests with Python 3

* Fixed shellcheck

* Fix for Windows which could pick up end mark prematurely
Move debug to _wrap_command and use a single return point

Single-quotes not needed around linux marks
Fix typo in comment

End mark to new command.

* Unit test cases now works on Python2 and Python3

* Skip tests on Python 2.6

* Fix for wait_for_connection module for windows.

* Updated changes as per review comments

* Fixing broken pipe error seen with session-manager-plugin version 1.1.17.0.
Eliminating sleep as this looks to be fixed in session-manager-plugin version 1.1.17.0.

* Adding back delays for Windows with session-manager-plugin 1.1.17.0.

* Updating Windows AMI ID for integration Test

* Upgrading windows ssm agent to the latest

* Adding boilerplate code.

* Windows ami and integration test updates

* Revert "Windows ami and integration test updates"

This reverts commit cd6ca3579b7cda584bd9c065f9c0835bddb23627.

* Updating windows ami for Integration tests

* Integration test suite updates and fixes.

* Updates and fixes

* Eliminate duplicate processing for exit code on failed command.

* Add powershell wrap.

* Refactor windows post_process.

* AMI Lookup, aliases, OSC filter, test suite updates

Co-authored-by: Gaurav Ashtikar <gau1991@gmail.com>
Co-authored-by: Deepak Choudhary <40276333+deepsvc@users.noreply.github.com>
Co-authored-by: Hanumanth <46720371+hanumantharaomvl@users.noreply.github.com>
Co-authored-by: KUMAR MAYANK <mayank@flux7.com>
5 years ago
Matt Clay f695f40133 Temporarily mark unarchive test unstable. 5 years ago
Sam Doran 22be69188b
Fix unarchive integration test on CentOS 6 (#66362)
* Cleanup packages added for Python TLS support
5 years ago
Gonéri Le Bouder ce66743b10 vmware_category/test: ensure test can run on Zuul
- set the zuul/vmware/vcenter_only alias
- import `prepare_vmware_tests` role
- little refactoring to avoid an extra level of indentation
5 years ago
Gonéri Le Bouder 0703590686 vmware_vm_info/test: drop dep on json_query
Test refactoring to avoid dependency on `json_query`.
5 years ago
Chris Van Heuveln 3ebc96e5c7 nxos_l3_interfaces: fix states, add new minor attributes (#64853)
* (WIP) nxos_l3_interfaces: fix states, add new minor attributes

* sa cleanup

* more regression fixes

* test_8 for add'l code coverage

* Fix regressions to handle mgmt w/o IP

* add 'no system default switchport' to regression setups

* add err msg to terminal_stderr_re so that cli_config will catch L2 failures

* regression test change: /int4/int3/

* Add default rsvd_intf_len for Zuul CI

* Fix replaced-with-no-ipaddr and ip redirect issues
5 years ago
Jordan Borean 7ed00a1560
Fix up deprecated_aliases spot for PS (#66326) 5 years ago
Sam Doran 397ec6f291 Add comment about not installing requests 5 years ago
Sam Doran db491eca0e Do not install requests[security] for MongoDB tests
This was previously removed in PR ##60083 but was added again in
PR #61257. This will cause a lot of things to fail if it is uninstalled
during cleanup after the test role, which is why it was originally removed
from the test.
5 years ago
Jordan Borean 595ab62ab8
Ansible.Basic - Added deprecated_aliases (#66323) 5 years ago
Jordan Borean aba8f12495 ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list
5 years ago
Rhys Campbell 609c3d0e36 mongodb_user module integration tests (#61257)
* Add final commits

* End of night commit

* Add further tests

* What is this doing here?

* Remove file from commit

* Change os check

* Change version check
5 years ago
Rhys Campbell 559de7ee1e mongodb_parameter module integration tests (#61644)
* Add final commits

* End of day check in

* Initial commit

* Remove file

* Remove module from pr

* Run tests
5 years ago
Andrew Klychkov 70bc351f31 mysql_query: new module (#65941)
* tmp

* mysql_query: new module

* remove irrelevant changes from mysql.py

* add autocommit keyarg to mysql_connect

* add basic CI tests

* tmp

* fix CI tests

* add CI tests

* fix comment in CI tests

* remove path_to_script option

* refactoring

* change tests formatting

* add single_transaction param

* fix sanity

* add note

* fix
5 years ago
Matt Clay a5c36eedd8 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.
5 years ago
Gonéri Le Bouder 66550cd3c2 vmware_guest/test: create test vm in correct directory
Ensure we already create the `test_vm3` VM in the `{{ f0 }}` directory.
This to be sure the teardown playbook will be able to clean it up at the
end. This to avoid problem like this one:

```
Multiple virtual machines with same name [test_vm3] found, Folder value is a required parameter to find uniqueness of the virtual machine
```
5 years ago
nkshrishail 01e4c41be4 nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)
* nxos_integration_tests: Removing obsolete provider parameter

* nxos: removing support for local-nxapi plugin

* nxos: removing LocalNxapi plugin implementation

* nxos_nxapi: removing local plugin usage

* REVERT - nxos: removing LocalNxapi plugin implementation

* Addressing yamllint issues

* Removing the condition on the debug messages

* Restoring changes done to nxos_nxapi* tests

* Retaining timeout of 500 on nxos_smoke test

* Some cleanup

* Addressing latest comments

* Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
5 years ago
Nathaniel Case e19b94f43b
Add test for reboot & wait_for_connection on EOS & IOS (#63014)
* Add test for reboot & wait_for_connection

* Add test for ios

* Collection-proof block test

* Add junos test

* Don't try to evaluate cli context unless using the connection

* Prevent infinite recursion
5 years ago
Mads Jensen 10cc2e2b47 Stop using {{ }} in templates for conditionals in integration test (#65797)
Co-Authored-By: Matt Martz <matt@sivel.net>
5 years ago
Nilashish Chakraborty 97aefb8e11
Temporarily disable vpc peer-link tests (#66121)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Sam Doran 22855f73fb
Remove unstable from yum tests (#66218)
They seem to be stable again on Fedora 31.
5 years ago
Anthony Bourguignon d3e9ef3c35 add a path_join filter which joins path components (#62713) 5 years ago
Rohit 8ae5e34127
pre cleanup services (#66188)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
5 years ago
Markus Bergholz 193879d462 Assign AWS Cloudwatch Metric Filter via Ansible (#59925)
* #42292 first draft.

* fix some documentation

* use snake dict keynames

* return metric filter variable

* rework documentation

* try to fix documentation. fix condition when defaultValue is 0. update version string

* fix intenion, syntax and undefined

* try solve state documentation

* define type for state in doc

* rework integration test and fix minor typos

* add defaults for integration test

* update documentation, integration tests, and return value

* fix code formatting and documentation

* irgnore errors in ignore block

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

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

* add options to metric_transformation

* fix pep-8

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Felix Fontein b0b00b555f
docker_container: configure removal wait timeout (#66144)
* Add support for timeout while waiting for state.

* Allow to limit removal wait time.

* Add changelog.

* Forgot version_added.

* Add some check mode tests.

* Use removal_wait_timeout in tests.
5 years ago
Abhijeet Kasurde 9a13d56b26
Misc typo fixes (#66120)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Emerson "Duke" Almeida 865e767d39 PostgreSQL : Create unique index (#66157)
* Postgresql : Create unique index

TODO:

* fix syntax error

* add version added

* adding specs and improve doc

* add changelog

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* remove check about concurrent

* Apply suggestions from code review
5 years ago
Andrew Klychkov 4ecc9da244 mysql_db: add master_data parameter (#66048)
* mysql_db: add master_data parameter

* add changelog

* fix CI
5 years ago
Rohit 2f996fc6e2
vyos_config bug fix #66110 (#66122)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
5 years ago
Matthew Davis 5493ea590c make concurrent aws_acm integration tests not clash (#64660)
* add uuid for aws_acm test resources, allow concurrent tests

* remove debug task in aws_acm int test
5 years ago
Hannes Ljungberg f31b8e08b2 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>
5 years ago
Felix Fontein 17ef253ad1
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.
5 years ago
Mike Wiebe c2fed8603c Fix nxos_user roles bug (#65962) 5 years ago
Abhay Kadam 2fa8f9cfd8 Fix env lookup plugin error on utf8 values (#65541)
This commit fixes issue #65297.

The env lookup plugin used to fail when environment variable value
contained any UTF-8 characters (e.g., δ, ζ).
5 years ago
Abhijeet Kasurde 683c467609
Check if task file is specified for import_tasks (#57572)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Stefan Horning 6fa070e824 Fix to return data when using lambda_info module (#64548)
* Fixed issue 64479 with lambda_info module

* Added integration tests for lambda_info module

* Moved lambda_info tests into already existing aws_lamda testsuite for easier test setup.

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Matt Clay 342b9953bc Disable failing azure_rm_storageaccount test. 5 years ago
Sam Doran 18130e1419
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.
5 years ago
Mark Chappell 50eb4eec90 fix ec2_vpc_net test instability (#65184)
* Move ec2_vpc_net tests to group1, group2 is running much longer

* Allow for VPC CIDRs to be "associat*ing*", things in AWS are "eventually consistent" and occasionally take longer than we would like
5 years ago
Alexandre Mulatinho 7bb925489e elb_{network_lb,target_group}: allow UDP/TCP_UDP (#65828)
elb_network_lb.py: allow UDP and TCP_UDP protocols

- Fixing documentation
- Add support to UDP and TCP_UDP as described on AWS SDK

elb_target_group.py: allow UDP, TLS, TCP_UDP proto

- Fixing documentation
- Making health checks with response codes and paths only in HTTP/HTTPS
- Allow UDP, TLS, TCP_UDP protocols as described on AWS SDK.

others:
- Added changelog fragments
- Integration test

Fixes: #65265
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
5 years ago
Baptiste Mille-Mathias 32a8b620f3 [get_url] Return status_code on HTTP 304 (#65739)
Return field status_code on HTTP status 304 (implemented by lkthomas)
Add an integration test for this case.
Fixes #65263
5 years ago
Mario Lenz fec883dfff VMware: Add advanced settings to vmware_cluster_ha 5 years ago
Sloane Hertel c870457339 free strategy - include failed hosts that were notified (#65576)
* free strategy - include failed hosts that were notified so --force-handlers is used

* trim line length a bit

* Loop over the force handler tests with the strategies linear and free

* rename changelog

* Use the play iterator instead of TQM for accurate failure representation in blocks

* Remove hack in a backwards compatible way for 3rd party plugins
5 years ago
Gonéri Le Bouder 89703b3284 vmware/test: more modular teardown.yml
Some teardown tasks are now enabled only if we have ESXi in the configuration
file. On my system and in a vcenter only scenario, `vcenter_folder` goes from
42.7 to 31.2s.
5 years ago
Clint Byrum 284f26303c Add support for ECR Lifecycle Policies to ecs_ecr (#48997)
* Fix copy/pasta for ecs_ecr test names

* Add support for lifecycle policies to ecs_ecr

New feature for ecs_ecr to support [ECR Lifecycle Policies][].

Fixes #32003

 [ECR Lifecycle Policies]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html

* Improve error message for ecs_ecr parsing errors

Replaces the exception and stack trace with a description of what's
actually going wrong from a user perspective.

* Rename delete policy to purge policy

Marks the `delete_policy` parameter as deprecated, to be removed in
Ansible 2.6.

* Add version_added to purge_policy

* Remove changing results based on verbosity

What I really want is --diff support, and changing results based on
verbosity is abnormal.

* Ensure repository name is lowercase

* Fix deprecation cycle to 4 releases

* Use a YAML anchor for credentials

* Remove filters from assertions

* Add minimal permissions needed

* Updating version_added and deprecation cycle

The original PR sat while a few releases happened.

* Bumping version added and deprecation version

We missed the 2.8 release.

* Removing bare except:

This is not allowed and is generally bad practice.

* Fix lint errors

* update ansible release metadata

* Use the new alias deprecation scheme

This was added in the time the PR has been in development, so rework
things to use it.

* Add test coverage

This makes sure that lifecycle_policy is produced when passed in.

*Also a minor suggestion for simplification from PR.

* Restore changes from 62871 lost in rebase

* Add changelog

* Remove version_added for new purge_policy option

Per sanity test fail.
5 years ago
Kevin C e9267bf6d6 Cloudformation info checkmode (#65958)
* set supports_check_mode=True

I don't see any reason why this module cannot run in check mode.  The following API calls are made, none of which modify configurations

All using boto3.client('cloudformation')
describe_change_set
describe_stacks
describe_stack_events
get_paginator
get_stack_policy
get_template
list_change_sets
list_stack_resources

* duplicate cloudformation_info tasks with checkmode

Duplicated all existing cloudformation_info tests and added check_mode: yes to them

* delete duplicate empty line
5 years ago
Justin Ossevoort 14ebceec25 Fix 'Assert CNAME failure' assertion (#65875) 5 years ago
ivog74 bd989052b1 Add ansible cli options --ask-vault-password and --vault-pass-file (#63782)
* Move new Ansible cli options '--ask-vault-password' and '--vault-pass-file' to the existing calls to add_argument
* Add changelog fragement
* Change order of ansible cli arguments to use --ask-vault-password and --vault-password-file by default
* Update runme.sh in vault integration tests to test new options --ask-vault-password and --vault-pass-file
5 years ago
Gonéri Le Bouder 3ed0b2c7ea vmware/test: init esxi_user with esxi1_username
By default, `esxi_user` is initialize as `root`. We now use `esxi1_username`
instead.
5 years ago
Gonéri Le Bouder 8d6b9cf6e0 prepare_vmware_tests: add scenario with one ESXi
Add the ability to test with just one vcenter instance and a single
ESXi. This allow us to cover 90 modules.
5 years ago
Abhijeet Kasurde b31b5d105a
vars: Fail with warning for extra_vars filename without @ sign (#59915)
Rather than silently processing extra_vars filename without @ sign,
CLI now fails with appropriate warning about requirement.

Fixes: #51857

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Mark Chappell c40832af48 ec2_launch_template: Add default_version and latest_version to output, matching the documentation (#61279)
- Add tests for default/latest version manipulation
5 years ago
Mark Chappell 791e9dabe3 Run ec2_instance tests in parallel and re-enable them (#63800)
* Run ec2_instance tests in parallel

* Make sure we spin up the iam_instance_role instances in the dedicated VPC

* Rework a little to only build one VPC while still running in parallel

* Start running the tests within shippable

* We only use setup_remote_tmp_dir for the version_fail tests, so only set it up once

* Make sure we clean up if we fail during Environment Setup

* Add a warning about running in parallel

* Minor review tweaks

* Remove unused file
5 years ago
Kevin C 45a413a4a2 Add ChangeSets to cloudformation_info + updates (#64571)
* cloudformation_info updates

Add ability to retrieve stack change sets
Update module to use AnsibleAWSModule
Update backoff to use new decorator style
Updated exceptions to use fail_json_aws
Converted outputs to snake_case where appropriate, for cloudformation_info only to preserve cloudformation_facts functionality.
  Unconverted keys are stack_outputs, stack_parameters, stack_policy,
  stack_resources, stack_tags and stack_template

* cloudformation_info updates

Add ability to retrieve stack change sets
Update module to use AnsibleAWSModule
Update backoff to use new decorator style
Updated exceptions to use fail_json_aws
Converted outputs to snake_case where appropriate, for cloudformation_info only to preserve cloudformation_facts functionality.
  Unconverted keys are stack_outputs, stack_parameters, stack_policy,
  stack_resources, stack_tags and stack_template

* Adding integration tests

* Remove unneeded debug statement

* Add myself to Authors

* rename stack-name to match iam policy limits

aws-terminator permission for cloudformation have the following resource
Resource: arn:aws:cloudformation:us-east-1:{{ aws_account_id }}:stack/ansible-test*
updating test stack name to match

* removing .orig file from rebase

* fix stack name, underscore not allowed

* rename integration testsuite to cloudformation

rename per request

* add resource_prefix to resource names

* prefix stack name with ansible-test

IAM policy in aws-terminator requires the stack name to begin with ansible-test

* add single quotes around variable in test

* fix test for display name

mistakenly updated when changing topic_name to use resource_prefix.  The test is to check the display name, which is what the stack update changes

* fix value to display name test

* rename main.yaml to main.yml before rebase

* Merge tests with  #65643

remove uneeded files
using tests from #65643 with added check to validate changeset is present in info when requested

* fix assert on chageset check

* remove trailing blank line
5 years ago
Nilashish Chakraborty ae0df67539
Add debug (#65909)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago