* ACI: Various changes to module documentation and guide
This PR includes:
- We moved the object class information to the notes
- Add version information to guide chapters
- Add generic note to modules with reference to ACI guide
- Reference known issues in aci_rest documentation
- Remove module_utils function docs from modules
- Indicate which parameters are not required for querying all objects
- Added missing RETURN information
* Fix copyright strings
* Remove aci_domain_to_encap_pool.py for v2.5
* More updates
* PEP8 fix
* Improve listings of parameters/return values
* Adding support for vApp properties.
* vm specification updated only if changes have to be applied. I.e. subsequent updates with the same data will not trigger changed state
* Auxiliary variables renamed, hope this makes the code more readable
* Integration tests changed - re-adding the same properties test not implemented, but tested on real vCenter deployment
* fixing documentation "version_added" for the feature
* Addressing reviewers comments #2:
* documentation updated with the only meaningful value for "option" attribute - "remove"
* Fixed improperly handled case when user requested "add" operation for existent property
* vApp configuration is updated only with properties that contains changes, not with all properties requested by user
* aci_spvpg: Various fixes to integration tests/modules
This PR includes:
- A fix in module_utils aci.py
- Various fixes in integration tests
* Fix typo
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3
Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting
fix is to remove indexes in reverse sorted order
* Add test cases for failed case
This PR includes:
- A fix for a recently introduced issue wrt. error handling
- Added integration tests for provoked errors
- Influence standard return values using aci library for aci_rest
- Add proxy support documentation
- Documentation update related to #34175
* fix nxos_l3_interface tests as n35 doesn't support ipv6
* add terminal dont-ask to nxos_feature and nxos_lldp
* put interfaces in L2 mode for N35
* fix nxos_feature unit-tests
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.
This impacts a lot of tests that were used to testing the current state
as 'previous'.
We identified an incompleteness to parameter dependencies that affects
querying all domain-related objects.
This PR also includes:
- Improvements to integration tests
- Add missing vm_provider types
- Fix examples
This relates to #36131
This PR includes:
- A fix to the module where domain_type without domain caused havoc
- A fix to the integration tests when querying all binding objects
- Improvements to integration tests
* Added metrics_collection management to ec2_asg module to switch ASG metrics on and off.
* Fixed typo in documentation of ec2_asg module
* Removed extra blank line in ec2_asg.py
* Docs fixes for ec2_asg module
* Added integration test for ec2_asg metrics flag
* Trying different syntax for ec2_asg test
* Fix vrf parsing in eos_vrf and eos_eapi module
Fixes#30250
Fix logic to parse vrf when interface value in `show vrf`
command output spans on multiple lines
* Add idempotent test case
* Revert "commented out check tests (#35788)"
This reverts commit 3df2561405.
* `discard_changes()` now uses `exit discard`
instead of just `discard`. Also a slight tweak to avoid a second `exit` after
`exit discard`
This PR includes:
- Fixes related to the recent merge of #31637 and #34537
- A generic fix for a reference for assignment issue
- Fixes to aci.boolean() in order to catch exception
copy currently fails if you specify a destination without any directory
component. This is because we take the dirname of the destination for
some processing and no dirname causes issues.
This corrects that by prepending "./" if there is no directory component
in dest.
* [git] Fix fetching branch of shallow clone
* Use absolute file:// paths to make sure git uses shallow clones
* Improve tests
* Fix sanity errors
* Match style according to other (depth) tests
* Improve tests
Now they will fail without the fix of this PR
* New module - elb_target
* Work to add deregister functionality
* Add jurajseffer work on waiting for status change
* List the set of statuses as a choices list
* default target_status_timeout is 60
* Add 'unavailable' as a target status choice per API docs
* Add support to remove targets that are in unused state
* add support for availability zone selection
Fix deregistering targets from used target groups
Fix waiting for unused state for targets that have started deregistering
This fixes a bug when parent's local vars where not available in nested
includes. The bug can only be seen with jinja>=2.9 which changes
how the variable scopes work.
Fixes#34886
* aws ssm parameter lookup test case - fails demonstrating no exception when parameter missing
* aws ssm parameter lookup - fail in case parameter doesn't exist
* aws ssm parameter lookup test case - failing case for nice return from path lookup
* aws ssm parameter lookup - convert incoming taglist to a key-value dictionary
* aws ssm parameter lookup - pep8 / style clean up
* aws_ssm lookup plugin rewrite for more standard interface
* aws_ssm module and lookup - introduce integration test and fix:
* aws_ssm module and lookup - error case integraton test and many PEP8 and other cleanups
* aws ssm parameter lookup - Various fixes in response to review + recursive fix & test
* aws ssm parameter lookup - more in response to review - shertel/abadger
* aws ssm parameter lookup unit test - move to mocker according to abadger
* aws ssm parameter lookup - integrate with new documentation fragment
* aws ssm parameter lookup - accept either aws_profile or boto_profile
* aws ssm parameter lookup - eliminate lookup document fragment until env vars are fixed later
* Add fat filesystem support
fatresize is temporarily disabled
* Refactor Filesystem.get_dev_size
For more sharing with vFAT class
* Fix filesystem tests on some OSs
I think this is due to older mke2fs on those systems.
* Fix vFAT command on FreeBSD
newfs doesn't seem to work on image files
* Refactor filesystem.grow()
Split out grow_cmd generation and Device operations
* Use swap as unsupported filesystem
Except FreeBSD, which doesn't have mkswap
* Be consistent about str(dev) vs dev.path
Prefer str(dev), this works transparently with '%s' formatting.
* Enable vfat resize, only test fatresize >= 1.0.4
Lower versions have a segfault bug.
* Only install fatresize where available
FreeBSD, OpenSUSE, RHEL and CentOS < 7 don't ship it.
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* updates to azure_rm_keyvault
* fix update bugs, add update test
This fix adds a verbose message about non-existent VM when specified
with operation, due to idempotency we can not detect correct state.
Fixes: #27384
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* ACI: Change result output as discussed
* Update all modules to use new aci.exit_json()
* Update output_level spec and docs
* Fix integration tests
* Small PEP8 fix
* Asorted fixes to tests and aci_rest
* More test fixes and support for ANSIBLE_DEBUG
* Fix another PEP8 issues
* Move response handling inside ACI module
* Reform of ACI error handling and error output
* Diff multiline json output
* Fix a few more tests
* Revert aci_bd tests
* Small correction
* UI change: existing->current, original->previous
* UI change: config->sent
* Update all modules with RETURN values
* Fix a few more tests
* Improve docstring and add 'raw' return value
* Fix thinko
* Fix sanity/pep8 issues
* Rewrite unit tests to comply with new design
* Fix over-byte
* Update ios tests to call `provider`
To continue to support testing `connection: local`
* Fix command dict handling in ios_user
* Clean up unit tests, too
* Insert lines before or after when the regexp exists elsewhere in the file
* Correct filter syntax in lineinfile integration test
* Use multi-line YAML syntax on lineinfile tests
Unify indentation
* Add lineinfile tests for same line matched to different regexps
* Remove debug statement from test
* aci_aaa_user: Manage AAA users on ACI fabrics
* Fix module documentation
* Ensure we allow to not set accountStatus and expires
* Added aaa_password_lifetime and aaa_password_update_required support
* Improvements to integration tests in light of issue 35544
* Fix ACI ISO 8601 formatted string
* Add HAS_DATEUTIL
We introduced the new loop keyword as a replacement for with without
adding tests that it behaved as we expected. This test asserts that
behaviour.
Incidentally, it also shows how to use parameters with lookups and loops
now.
* Test for include_tasks & include_role bug
Related to ansible/ansible:#21890
* Fix nested include_tasks called from role
This fixes the path of included files when you want
to call include_task inside a role's task file and this
role is itself called from multiple level of playbook include_tasks
Related to ansible/ansible:#21890
This fixes ansible/ansible:#35109
* ec2_group: fix ipv6 tests to use an explicit VPC
* otherwise would fail on old AWS accounts supporting EC2-classic
* ec2_group: fix tests to use an explicit VPC
* Only run some tests if there is a default vpc associated with the account
* galaxy remove incorrect check for role path before extraction
Fixes#35217
Currently lib/ansible/galaxy/role.py checks roles_path and will
ignore paths that don't currently exist which it should not because
the path will attempt to be created by the role extraction process
(which is valid and expected behavior) and if unable to write at the
time of role extraction into the role_path, that error will be
handled properly at that point in the process.
Signed-off-by: Adam Miller <admiller@redhat.com>
* add test case for galaxy install with rolefile and rolepath
Verify we don't regress GitHub Issue #35217
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix the integration test
Signed-off-by: Adam Miller <admiller@redhat.com>
* double quote for shellcheck glob warning
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix galaxy install tests to not need remote resources
Signed-off-by: Adam Miller <admiller@redhat.com>
* make shellcheck sanity tests happy
Signed-off-by: Adam Miller <admiller@redhat.com>
* prep git global conf for running the galaxy install tests in docker
Signed-off-by: Adam Miller <admiller@redhat.com>
* move ansible-galaxy tests into their own target, make git conf non-global
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix up tests based on feedback
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove extra newline from aliases file
Signed-off-by: Adam Miller <admiller@redhat.com>
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.
* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index
To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
removed_module()
```
* Add aws_ses_identity module
* Update CI alias, add BotoCoreError exception handling.
* Add SES and SNS permissions to hacking/aws_config to run aws_ses_identity integration tests
This adds a new module called vmware_vm_vm_drs_rule. This module add
affinity/antiaffinity rule for VM-VM in given cluster.
Fixes: #32109
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* use tests instead of filters
* Don't check 'rc', use success/failed tests
- yum module use 'fail_json' which set 'failed'
- 'rc' is for backward compatibility:
bbd6b8bb42/lib/ansible/executor/task_executor.py (L571)
- besides yum module doesn't document any return values
* Allow to run tests twice in a row
ansible-test is executed with '--retry-on-error' switch, then tests must
be able to executed twice in a row.
Error was:
TASK [yum : install group] ***
ok: [testhost] => {
"attempts": 1,
"changed": false,
"failed": false,
"invocation": { [...] },
"msg": "",
"rc": 0,
"results": []
}
TASK [yum : verify installation of the group] ***
fatal: [testhost]: FAILED! => {
"assertion": "yum_result.changed",
"attempts": 1,
"changed": false,
"evaluated_to": false,
"failed": true
}
ecs_taskdefinition_facts should not populate ansible_facts with
so much information.
Better to just return the contents of the dict directly.
Reduce line lengths, use AnsibleAWSModule, don't reimplement
camel_dict_to_snake_dict.
* New module: ec2_vpc_egress_igw
* minor pep8 fix and doc update
* add test dir and files
* add tests for gateway module
* fix up return documentation per review
* remove HAS_BOTO3 stuff as it is handled in AnsibleAWSModule per review
* fix an error with failure message and add custom handler for non-existent vpc ID
* add additional tests and update tests per review
* ignore errors on clean up tasks
* update module copyright to newer format
* fix exception handling since BotoCoreError doesnt have response attribute
* actually fix exception handling this time so it works with Py3 as well