* Remove sanity/ignore.txt entries
* replace use of "_" as a variable name
* Cleanup boilerplate
* Remove default values from mandatory parameters
* Sanity test documentation updates
* Remove unused imports from iam_role
* 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>
* Remove Sanity test ignore.txt entries
* Fixup boilerplate
* Remove use of blacklisted _ variable name
* cloudformation: Add an explicit removal version for template_format
This option's been ignored since ansible 2.3
* General docs cleanup to clear sanity errors
* elasticache_parameter_group: Add list of choices
- matches documented choices
- other values wouldn't have worked
* data_pipeline: Deprecate 'version' - always ignored
* Add deprecation documentation
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.
This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
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>
* 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.
* Add AWS_ boilier plate
* AWS_ modules: clean up missing parameter types
* Remove documentation duplicated by ec2 document fragment
* Add missing documentation for options and sub-options
* Add missing return type documentation
* Remove AWS_ sanity-check ignores
* aws_waf_info: fixup conflicting 'defaults' information about the use of waf_regional
* Wrap URLs in U()
* Add elements entries, because felixfontein asked nicely
* Apply suggestions from code review
Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>
* Second round of review comments.
* Fix validate-modules support for collections.
- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.
* Remove obsolete validate-modules code ignores.
* Handle sys.exit in validate-modules.
* Add check for AnsibleModule initialization.
* Remove `missing-module-utils-import` check.
This check does not support relative imports or collections.
Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.
* Fix badly named error codes with `c#` in the name.
The `#` conflicts with comments in the sanity test ignore files.
* Add changelog entries.
* 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
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"
```
* 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
* BOTMETA support migrated_to
Allow BOTMETA to define if this part of the codebase has moved
into a Collection on Galaxy.
See also https://github.com/ansible/ansible/pull/63935
* Enforce migrated_to URL format
* pep8
* 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
* adjusted setup_zabbix integration tests role to work on distributions from Debian family
* bumped zabbix_host integration tests role to be run against bionic
* 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
* 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
* 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>
* 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
- xenserver module_util: XenAPI lib import error message handling is now
ported to missing_required_lib(). Updated unit tests.
- xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
docs are updated to reflect recent changes in availability of XenAPI lib
on PyPI.
- xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
docs are updated to reflect recent Citrix rebranding of XenServer. Broken
URLs to external resources are fixed.
- xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
more tested platforms are mentioned in docs.
* 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.
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
* 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
* 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
* AH servers include automation-hub as part of the server configuration.
So we don't need to add it here.
Fixes#63699
* Update unittests for the fix to galaxy wait_import_task
* Add contains: validation for return values.
* Only require returned: on top level.
* Fix various return value problems.
* Update ignore.txt.
* Two more.
* s3_logging: (integration tests) updated AWS policy
* s3_logging: fix sanity test issues
* s3_logging: Integration tests
* Add pauses to cope with evenual consistency
* Mark s3_logging tests as 'unsupported' for now due to testing instability
* postgresql_privs: add support a type parameter option for types
* postgresql_privs: add support a type parameter option for types, add changelog fragment
* postgresql_privs: add support a type parameter option for types, add schema handling
* postgresql_privs: add support a type parameter option for types, fix typo
* postgresql_privs: add support a type parameter option for types, add comment
* Add support for format option.
* Improve private key format detection.
* Fix raw format handling.
* Improve error handling.
* Improve raw key handling.
* Add failed raw test.
* Improve raw key loading.
* Simplify tests.
* Add raw format tests.
* Fail if format != 'auto_ignore' is specified for pyopenssl backend.
* Fix quoting.
* Bump version.
* Allow to convert private keys between different formats.
* Improve description.
* Add extra args and executable name to podman connection plugin
Like there is for docker plugin, add extra arguments for command
line of podman. Also add configurable executable and checking if
this executable exists on host. Fail module if executable is not
in PATH.
* Update changelogs/fragments/63166-add-extra-args-executalbe-podman-connection.yaml
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Handle galaxy v2/v3 API diffs for artifact publish response
For publishing a collection artifact
(POST /v3/collections/artifacts/), the response
format is different between v2 and v3.
For v2 galaxy, the 'task' url returned is
a full url with scheme:
{"task": "https://galaxy-dev.ansible.com/api/v2/collection-imports/35573/"}
For v3 galaxy, the task url is relative:
{"task": "/api/automation-hub/v3/imports/collections/838d1308-a8f4-402c-95cb-7823f3806cd8/"}
So check which API we are using and update the task url approriately.
* Use full url for all wait_for_import messages
Update unit tests to parameterize the expected
responses and urls.
* update explanatory comment
* Rename n_url to full_url.
* Fix issue with overwrite of the complete path
* Fixes overwrite of the complete path in case there's extra path stored
in self.api_sever
* Normalizes the input to the wait_import_task function so it receives
the same value on both v2 and v3
Builds on #63523
* Update unittests for new call signature
* Add changelog for ansible-galaxy publish API fixes.
Eh, 2.10 is close enough
* drop top-level authorize
* Remove from documentation
* Remove load_params
* nxos_hsrp: I don't think this is an actual module parameter
* Move local params to provider
* Promote 'timeout' to a real parameter for eos_eapi
* Provider now always has auth_pass
* Get no_log parameters from subspec
* Add changelog and unit tests
* Handle list of dicts in suboptions
Add fancy error message (this will probably haunt me)
* Update unit tests to test for list of dicts in suboptions
* Add integration tests
* Validate parameters in dict and list
In case it comes in as a string
* Make changes based on feedback, fix tests
* Simplify validators since we only need to validate dicts
Add test for suboptions passed in as strings to ensure they get validated properly and turned into a dictionary.
ci_complete
* Add a few more integration tests
* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* update for shippable.
* update for shippable
* add units test to module ce_lacp.
* add units test to module ce_lacp.
* add units test to module ce_lacp.
* update
* update
* update
* update
* update
* update
* update for shippable.
* for shippable
* update ignore.txt to reslove conflict
* update for shippable
* update
* update unittest to remove provider.
* update unittest for shipppable.
* use to_native.
* intergration test
* syntax error
* syntax error
* syntax error
* update for `Andersson007` review and thanks.
* update for shippable
* Improve return value documentation by allowing entry for return values.
* Add docs formatting, adjust styling.
* Fix sample return value. (Taken from https://tools.ietf.org/html/rfc7517#appendix-A.1.)
* Work around abuse of .
* clean "changed" after it has been processed
without this change, a loop of `debug` tasks with `changed_when`
causes the "changed" status to get lost before output
* runme.sh tests for debug loop status
* fix default collection resolution in adhoc
* if an adhoc command is run with a playbook-dir under a configured collection, default collection resolution is used to resolve unqualified module/action names
* Set ANSIBLE_PLAYBOOK_DIR in integration tests.
* Fix config conflict in ansible integration test.
* add adhoc default collection test
* text-ify warning string
* mysql_replication: add connection_name param for MariaDB multi source support
* mysql_replication: add connection_name param for MariaDB multi source support, add changelog
* add ANSIBLE_PLAYBOOK_DIR envvar support
* allows `ANSIBLE_PLAYBOOK_DIR` envvar as a fallback on CLI types that support `--playbook-dir`. This should have been implemented with #59464, but was missed due to an oversight.
* added basic integration test
* make first-class PLAYBOOK_DIR config entry
* update changelog
* Stop appending '/api' to configured galaxy server url
Since not all galaxy REST api server URLs live
at '/api', stop always appending it to the
'url' value loaded from config.
* Add note about manually migrated galaxy configs and /api
* Add '/api/' to galaxy url and guessing if galaxy API
* Fix most unit tests (update to expect /api/)
* Fix test_initialise_unknown unit test
Since we retry now with an added /api/, mock it as well.
* Update fallback default avail_ver to new format
* Move EC2 networking objects into network-policy.json
* ec2_vpc_nacl: Add integration tests
* ec2_vpc_nacl: Migrate tests to use module_defaults
* ec2_vpc_nacl: (integration tests) Add missing AWS permissions
* ec2_vpc_nacl: (integration tests) Update tests for ipv6 support
* ec2_vpc_nacl: Migrate to AnsibleAWSModule
* Fix sanity tests for ec2_vpc_nacl and ec2_vpc_nacl_info
* ec2_vpc_nacl_info: Migrate to AnsibleAWSModule
* ec2_vpc_nacl_info: (integration tests) Rename from ec2_vpc_nacl_facts to ec2_vpc_nacl_info and add a test using a filter (by tag)
* Pick availability zones dynamically
Rather than assuming that AZa and AZb always exist (they don't), query to find out which AZs we have available first
* Test that the NACLs we get back are actually the *saml* NACL rather than duplicates/delete remove
* Cleanup IPv6 tests a little.
Note: IPv6 support for ec2_vpc_nacl not complete yet.
This provides the initial framework, and should ensure things don't start exploding when support is added.
* Removing subnets by name from a NACL *is* now supported
* Fix ec2_vpc_nacl return documentation
Newer versions of ssh-keygen create PEM keys that are not recognized by Paramiko.
Now ansible-test compensates for this by updating they keys it generates so Paramiko will recognize them.
Previously the temporary directory used to run integration tests resided under the user's home directory. This prevented ansible-playbook from detecting the default collection when running tests.
Now the temporary directory is created within the collection to facilitate default collection detection.
* mysql_replication: add CI tests with MySQL 5.6
* mysql_replication: add CI tests with MySQL 5.6, add auxiliary checks
* mysql_replication: add CI tests with MySQL 5.6, fix comments
* mysql_replication: add CI tests with MySQL 5.6, add pause
Added vmware module vmware_guest_register_operation
This module can do the following.
Register VM to inventory
Unregister VM from inventory
This is useful when you want to unregister a VM from inventory and register it again.
The following modules depend on `vSphere Automation SDK`:
- `vmware_rest_client`
- `vmware_guest_info`
- `vmware_tag_manager`
- `vmware_vm_inventory`
The associated test cannot be run with `govcsim`. But the situation is
changing since we will soon run them on a regular lab, and so, we
need to install the dependency.
Bumping the default-test-container version to 1.9.3 to get a fresh version
of pip and requests.
Depends-On: https://github.com/ansible/ansible/pull/62412
This fixes test errors related to failures copying temporary test results files from a remote system back to the local system.
It also speeds up processing of test results and reduces network utilization by avoiding the temporary files.
* Specifying IP addresses needs API version 1.22 or newer.
* Simplify code.
* Use IPAMConfig.IPv*Address instead of IPAddress and GlobalIPv6Address.
* Add changelog.
* Fix syntax errors.
* Add integration test.
* Don't rely on netaddr.
* Normalize IPv6 addresses before comparison.
* Install netaddr, and use it.
* Move tests with docker registry into own target.
* Add docker_login tests.
* Add step which makes sure hello-world:latest is around.
* Make work inside docker container.
* Add dependency.
* Use plaintext password.
* Forgot check_mode.
* Add no_log to avoid double log output in verbose mode.
* AWS: new module iam_user_info
Signed-off-by: psharkey <psharkey@cleo.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Rename from iam_user_facts to iam_user_info.
Rename and target 2.10.
Fixing docs.
* Adding iam_user_info integration test.
Removing unnecessary tasks.
Fixing yamllint failure test/integration/targets/iam_user_info/defaults/main.yml:5:1: empty-lines: too many blank lines (1 > 0).
* name paramter is optional
* Switch to use AnsibleAWSModule.
* Convert to using fail_json_aws
* Rework asserts to inspect ARN.
* Move integration tests from iam_user_info to iam_user.
* Fix pep8 problems.
* ec2_argument_spec not needed with AnsibleAWSModule.
* Switch to use helper in AnsibleAWSModule.
* Add iam_user_info to the aws group.
* Add support for pagination and backoff.
* Check improper parameter usage first.
* Adding test cases for multiple users.
* Rmoving unneeded line.
* Remove unneeded imports.
* Switch to catch BotoCoreError.
* Adding tests for exception coverage.
* Compare user info directly with values from created user.
Running from an installed version of ansible-test now results in tests using a dedicated directory for PYTHONPATH instead of using the site-packages directory where ansible is installed.
This provides consistency with tests running from source, which already used a dedicated directory.
Resolves https://github.com/ansible/ansible/issues/62716