Commit Graph

9120 Commits (53aa258d78650317aae09328980801f9d338c0b5)

Author SHA1 Message Date
Matt Clay a7bc11ce67
Work around virtualenv/venv issue in ansible-test. (#62111)
Creating a virtual environment using `venv` when running in a virtual environment created by `virtualenv` results in a copy of the original virtual environment instead of creation of a new one.

To work around this, `ansible-test` now identifies when it is running in a `virtualenv` created virtual environment and uses the real Python interpreter to create the `venv` virtual environment.
5 years ago
Jill R 414d844ed2 AWS ec2_vpc_net: Enable ipv6 CIDR assignment (#60983)
* AWS ec2_vpc_net: Enable ipv6 CIDR assignment

Enable IPv6 CIDRs in ec2_vpc_net, and fix ec2_vpc_subnet tests that
were depending on the aws cli for CIDR assignment.

Related to: #27800
5 years ago
Matt Clay 983f0ad5a0 Properly exclude tests/output/ from code coverage. 5 years ago
Matt Clay f110abb806
Fix ansible-test to ignore `tests/output/`. (#62084)
The `test/results/` directory for Ansible test output was already ignored when not using git.

When Ansible Collections were switched to `tests/output/` the ignore entry was previously overlooked.
5 years ago
Gonéri Le Bouder 0f52b18f3f
bump hcloud version to 1.4.1 (#62097)
* bump hcloud version to 1.4.1

`hcloud`<=1.4.0 has requirement `requests==2.20.0`. This prevents the
installation of the Vcenter Automation SDK which depends on `requests>=2.22.0`.

`hcloud` 1.4.1 does not have the problem: 8bff356efb
Bumping the dependency will resolve the issue.
5 years ago
Matt Clay 064e8e1ef4
Fix ansible-doc traceback and sanity test. (#62040)
* Fix ansible-doc traceback for removed modules.

This avoids tracebacks with errors like the following when a module has been removed:

module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment

* Fix ansible-doc sanity test warning handling.

Warnings about removed modules/plugins on stderr are now properly ignored.

Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored.
5 years ago
MyronFanQiu 603c8c171f fix ci (#57216) 5 years ago
Matt Clay c77ab11051
Fix issues with ansible-test --venv option. (#62033)
* Fix ansible-test venv activation.

When using the ansible-test --venv option, an execv wrapper for each python interpreter is now used instead of a symbolic link.

* Fix ansible-test execv wrapper generation.

Use the currently running Python interpreter for the shebang in the execv wrapper instead of the selected interpreter.

This allows the wrapper to work when the selected interpreter is a script instead of a binary.

* Fix ansible-test sanity requirements install.

When running sanity tests on multiple Python versions, install requirements for all versions used instead of only the default version.

* Fix ansible-test --venv when installed.

When running ansible-test from an install, the --venv delegation option needs to make sure the ansible-test code is available in the created virtual environment.

Exposing system site packages does not work because the virtual environment may be for a different Python version than the one on which ansible-test is installed.
5 years ago
Gonéri Le Bouder cc758ea574 Revert "shippable: temporary bump the timeout for Azure jobs"
The Azure timeout should not accure anymore since
173d47d1f4.

This reverts commit aaa8835311.
5 years ago
Toshio Kuratomi b437a19f6d
create-deprecated-issues script can now add to a specified project (#61901)
* create-deprecated-issues script can now add to a specified project

* Migrate the create deprecated issues script into a subcommand of build-ansible

* Remove deprecated-issue script from ignore list
5 years ago
Mark Chappell e0ebc8c9b4 Fixup aws_secret integration tests (#61241)
* aws_secret: (integration tests) Move tests to using module_defaults

* Update hacking aws security policy to enable management of secrets

* aws_secret: (integration tests) Fixup integration tests
- Update tests to use resource_prefix as a prefix rather than a suffix
- Pause after role creation to cope with AWS being slow (and returning before the role it ready)
5 years ago
Nathaniel Case 50e09be14f
Allow the use of _paramiko_conn even if the connection hasn't been started. (#61570)
* Allow the use of _paramiko_conn even if the connection hasn't been started.

I'm not sure what the benefit is of Noneing paramiko_conn on close, but will keep for now

* Fix test

* Try to fix up net_put & net_get

* Add changelog
5 years ago
Mario Lenz 900a51b283 VMware: Fix issue with order of changes in vmware_vcenter_statistics 5 years ago
Jill R 528f9a6672 Fix ec2_vpc_vgw broken tests (#60981)
* Fix ec2_vpc_vgw broken tests

Add waiter function to wait for API to report detached vgw is available.
Also catch extra error code in attach retry as EC2 sometimes reports that
the vgw is available several seconds before permitting the attachment.

Fixes: #53185

* Re-enable ec2_vgc_vgw test target
5 years ago
Tom De Keyser 6f74fca238 New module for AWS Step Functions state machines (#59116)
* add new module: aws_stepfunctions_state_machine

* add integration tests for new module: aws_stepfunctions_state_machine

* fix sanity checks

* use files/ folder instead for integration test

* rename role name in integration test

* attempt further permissions

* iam states prefix

* iam integration test prefix

* add iam policy for running step functions state machine actions

* slightly increase iam permission scope

* rename integration test folder to proper name

* move main() method to end of file

* move contents of integration-policy.json for state machines to compute-policy.json

* make check_mode return proper changed value + add check_mode integration tests

* rename module to aws_step_functions_state_machine

* fix missed rename in integration test variable

* add purge_tags option

* bump to version 2.10
5 years ago
Gonéri Le Bouder 3ea8e0a144 VMware: not ssl.SSLContext if validate_certs false (#57185)
Python < 2.7.9 does not have the ssl.SSLContext attribute.
ssl.SSLContext is only required when we want to validate the SSL
connection. If `validate_certs` is false, we don't initialize the
`ssl_context` variable.

Add unit-test coverage and a little refactoring:

- avoid the use of `mocker`, when we can push `monkeypatch` which is
  `pytest`'s default.
- use `mock.Mocker()` when possible

closes: #57072
5 years ago
Mark Chappell 1f38a12057 Fix behaviour of module_utils/ec2 compare_policies when dealing with bare bools and ints. (#61115)
* module_utils/ec2: (unit tests) Move unit tests for module_utils/ec2.py into test/units/module_utils

- compare_policies was refactored from s3_bucket
- "ec2_utils" doesn't seem to have ever existed

* module_utils/ec2: (unit tests) Add unit test for comparing quoted and unquoted bools and numbers within policies

As per https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html

"Values are enclosed in quotation marks. Quotation marks are optional for numeric
and Boolean values."

* module_utils/ec2: Explicitly convert bools and ints to strings when comparing policies

See also: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html
5 years ago
Erwan Quélin 7b28960ebe VMware: Add new module VMware vSAN health infos (#58636) 5 years ago
Paul Belanger a680ff2ade
Clean up unused imports for nxos related code (#61856)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
chkp-amiads 6ccb245a2d test_cp_mgmt_address_range module (#61867)
* test_cp_mgmt_address_range module

* fix test issues

- file location
- api_call is missing from facts
- metclass and import items
5 years ago
Chris Trufan 943888b955 Fixes to ecs_certificate cert chain for #61738 (#61858)
* Fixes to ecs_certificate cert chain for #61738

* Added changelog fragment

* Fixes to ecs_certificate for cleaner join, and better integration test

* Fix integration test formatting

* End cert chain with a \n

* Update changelogs/fragments/61738-ecs-certificate-invalid-chain.yaml

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

* Update main.yml
5 years ago
Mark Chappell b8650c0a50 aws_asg: Fix idempotency when using tags and metrics (#61284)
* Update AWS hacking policy to enable ASG Tagging management

* aws_asg: Add tests for ASG Tagging (including idempotency)

* aws_asg: ignore sort order when comparing tags on the ASG (fix idempotency)

* ec2_asg: (integration tests) test for idempotency when managing metrics collection

* ec2_asg: sort list of enabled metrics to ensure clean comparisons.
5 years ago
Matt Davis 7f4328ad12
allow external collections under the ansible NS (#61908)
* fixes #59988
5 years ago
Toshio Kuratomi f58899eef7 Update release name for 2.10
Add a list of previously used release names to make it easy to tell what
release names are no longer usable.

Add a test that new release names have been added to the used list.

Fixes #61616
5 years ago
Mark Chappell 832e03d932 Fixup iam_group integration tests and return value documentation (#61243)
* iam_group: (integration tests) migrate tests to module_defaults

* iam_group: (integration tests) migrate to using temporary user and group with {{ resource_prefix }}

* iam_group: (integration tests) fix test, checking the return values

* iam_group: (integration tests) Add some more tests around the behaviour of 'changed'

* iam_group: (docs) Update documentation of iam_group return value

* Update AWS testing policies to enable group/user management
5 years ago
Mark Chappell cbe511de1f ec2_vpc_subnet test cleanup (#61663)
* aws_vpc_subnet: (integration tests) migrate to module_defaults

* aws_vpc_subnet: (integration tests) remove hard coded assumption that AZ A exists.

While Amazon now tends to enable all AZs in a region, new customers in us-west-1 are only assigned 2 out of the 3 AZs, which might not include AZ a

* ec2_vpc_subnet: (integration tests) General cleanup

- use "is changed" rather than .changed
- clean up labelling of a couple of assertions (C&P fail)
5 years ago
Jill R d49d52eb5f
Add tests for new alias deprecation functionality (#61476)
* Add tests for the alias deprecation added in #61245
5 years ago
Sumit Jaiswal 1425d23513 To fix IOSXR L3 Interfaces idempotency failures (#61860)
* fix zuul idemptency failures

* adding eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
gen2kes 513bddb44a VMware: Add disk_mode parameter in vmware_guest_disk (#60406)
* Solve issue 58592

Added support to select disk_mode.
5 years ago
Evgeni Golov 1aca1f86b6 don't set default:None in documentation when there is no default (#61111)
otherwise "None" will be rendered as a string on docsite
5 years ago
Gonéri Le Bouder 08e01380e6 azure_rm_iothub: disable the functional test (#61854)
The test fails with: Operation failed with status: 'Unauthorized'
This commit disable the test until the situation is resolved.

See: https://github.com/ansible/ansible/issues/61852
5 years ago
Gonéri Le Bouder 7132466327 test: disable the docker swarm tests (#61816)
`docker_swarm` tests tend to hang during the creation of the Swarn
cluster.

See: https://github.com/ansible/ansible/issues/61815
5 years ago
Sam Doran 173d47d1f4 Rebalance Azure tests groups 5 years ago
Mark Chappell adfaefb732 ec2_launch_template: Fix integration tests (#61260)
* ec2_launch_template: (integration tests) make sure security_token is optional

* ec2_launch_template: (integration tests) add dependencies at the top level so they're pulled into the docker containers

* Update Hacking Compute Policies for Launch Templates
5 years ago
Nathan Swartz 4c8407fb83 Fix documentation and facts_from_proxy value in the netapp_e_facts module. (#61072) 5 years ago
Sloane Hertel d5c8d325e4 codebuild/codepipeline - fix regex for shippable resource_prefix (#61783)
* Fix bad assumption about shippable resource_prefix for codebuild and codepipeline tests
* Update test/integration/targets/aws_codepipeline/defaults/main.yml
5 years ago
kucharskim 1dea661ce8 Allow 13 asterisk characters in password field without warning (#54893)
On OpenBSD, 13 asterisk characters as a password hash, marks the
account as disabled. Otherwise daily(8) script which executes
security(8) will email operator about not properly locked accounts.

Before the diff, we see following warning:

> [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

After the diff, warning is gone.
5 years ago
Sloane Hertel 9ee0deea24 aws_codebuild tests - add retries and delay instead of a pause task (#61731)
- Add retries instead of a pause task
- Shorten the IAM role name length
- Put the IAM role name in defaults/main.yml instead
- Fix the aws_codepipeline tests too
5 years ago
Sumit Jaiswal 2672dc9694
Fixes IOS L3 intermittent zuul failure (#61682)
* fix ios l3 intermittent failure

* fix self

* dict to ordered dict

* fix diff_again fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* remove orderdict as its expensive

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* update verify fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Tim Rupp 2ebeadfc14 Migrate ec2_eip module to boto3 (#61575)
* Migrate ec2_eip module to boto3

This patch is a step towards the integration of several PRs that have
attempted to migrate this code

closes #55190
closes #45478

Follow-up PRs will address the outstanding changes made in #55190
5 years ago
Jordan Borean 00add5b668
Set win_pagefile as unstable as thats what it is (#61732) 5 years ago
John McDonough 86b38a0ead Add ucs_query (#60607)
* Add ucs_query

* fix sanity erros

* Change version_added to 2.10
5 years ago
Sam Doran c9e7a2122d
Increase unit test timeout to account for long image download times (#61717) 5 years ago
Gonéri Le Bouder 8e22a60f97 ansible-test: vcenter+Worldstream: hide password
Hide the temporary password when `ansible-test` is called with the
`--redact` parameter.
5 years ago
Simon Legner 7dbd6116d8 Fix typesetting of "GitLab" (#61702) 5 years ago
Roland Wolters 9744ce1e1d Rename checkpoint to check_point due to legal reasons, fix #61145 (#61172)
* Fix #61145

* Fix type keyword

* Removed file fragment
5 years ago
Alexandre Mulatinho e4d72dd981 luks_device.py: Allow manipulate LUKS containers with label or UUID (#61603)
* luks_device.py: Allow manipulate LUKS containers with label or UUID

- Allow create a LUKS2 container format with label support
- Allow manipulate (open, close, modify) an LUKS container based on
  both label (LUKS2 format) or UUID instead of using devices only.

Fixes: #58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>

* test_luks_device.py: organizing tests to support labels

- Add label on some tests and fix errors reported by Shippable

Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>

* luks_device.py: adjusting versions and messages

- Modifying version_added from 2.9 to 2.10
- Fixing some messages
- Created a changelog fragment
- Moving blkid from scope

Fixes #58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
5 years ago
Vitalii Kostenko 6f7cd8370a Ansible FTD Module improvements and tests update. (#60640)
* Ansible FTD Module improvements and tests update.

* Fix sanity tests

* Fix formatting
5 years ago
Guillaume Leroy 21b101f8e1 add option to define keysize at luks partition creation (#61522)
* add option to define keysize at luks partition creation

* Bump version_added.

* Extend tests.
5 years ago
Felix Fontein 4d057e0331
Make sure postgresql tests are run for all postgres_* modules (#61647) 5 years ago