* Improve netapp_e_hostgroup and add unit and integration tests.
netapp_e_hostgroup was refactored for maintainability and improved
documentation clarity.
* Remove ignore sanity check E338 for netapp_e_hostgroup module
* Add __future__ import (absolute_import, division, print_function) to test_netapp_e_hostgroup unit test.
* Combined telemetry module commit
* Minor fixes
* Add back whitespace
* Add telemetry subscription support and simplify
* Remove comment line
* Make ansibot happy
* Create common build_args method
* More ansibot fixes
* Refactored integration tests, remove old files
* Add subscription tests
* Add integration tests
* Update module docs
* Test updates
* Address review comments
* Comment should be one line, not two
* Address Trishna comments
* State deleted should purge all config
* Remove misleading comment
* Doc fixes
* Fix source int bug and remove local debug msg
* Add additional integration test checks
* needed so ansible-test can always find the right ones to copy to a target
* renamed the underlying scripts to be properly accessible as Python modules
* [WIP][docker_container] Adding support for `mounts` option
Fixes#42054
* Adjusting to current standards.
* Add changelog.
* Adjust types.
* Cleanup.
* Add idempotency checks for mounts.
* Improve diff for mounts.
* Linting.
* Python 2.6 compatibility.
* Fix error message formatting.
* Move mounts and volumes tests into own file.
* Add set of mount tests.
* Golang's omitempty for bool omits false values.
* Simplify sanity checks. Correct order of volume_options sanitization and usage.
* Fix key.
* Fix check.
* Add tests where both volumes and mounts show up.
* Add collision test.
Only error out if the gid exists with a different group name as
otherwise it will error out if the group with this gid already
exists, like on a rerun of the playbook. This fixes a regression
introduced by 4898b0a4a2.
* add new module with integration tests to manage gitlab project variables
* fix invalid yaml in DOCUMENTATION variable and don't import * from ansible module
* remove extends_documentation_fragment and put imports after DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA
* fix author in documentation and remove import from display
* add alias file for integration test
* split long lines and try to fix the author key
remove tailing whitespace
* replace email address with github username
* adding the at style to username
* add metaclass and future import
* add state variable to be able to delete selected variables
* add test with state = absent
* update documentation. scheme is necessary
* use singular in exmaple section
* use key purge instead of purge_vars
use purge instead of purge_vars also in the integration test
* create gitlab object in the ansible main function
* remove usedless .format
* follow best practice fail message
* add return documentation, return information about which variables were added, updated or removed and catch gitlab api auth error
* use module_utils.api with api_url and api_token
* use dict instead of list for vars
* use project name instead of name as playbook key
* add ansible checkmode_support, reduce variables in gitlab_project_variables class, remove wrong/duplicated HAS_GITLAB_PACKAGE check
* use extends_documentation_fragment and don't pop elements from basic_auth_argument_spec
* use just project_variable as output variable
* update mutually_exclusive as suggested
* re-add api_token documentation, because it is not included in api basic auth
* remove useless statement
remove unnecessary if
* add one test with a changing value
* put type at first position
* keep item to reduce api calls, build array and keep indexes by replacing with None instead of poping
* more asserts
* Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* remove unused return key from documentation
msg is only returned when failed
* Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* remove error key, because it is not returned
* change also documentation from purged_vars to purge
* Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update test/integration/targets/gitlab_project_variable/tasks/main.yml
Co-Authored-By: Felix Fontein <felix@fontein.de>
Update test/integration/targets/gitlab_project_variable/tasks/main.yml
Co-Authored-By: Felix Fontein <felix@fontein.de>
* remove extra spaces
fix wrong spelling
* expand return value documentation with examples
* add check_mode test
reorder tests. first the check_mode test, later all other tests
* Update lib/ansible/modules/source_control/gitlab_project_variable.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* fix existing keys in 'present' array
rework key handling (reduce code)
fix integration tests
use untouched instead of present to identify unchanged variable keys
fix wrong replacement
minor fixes on request
set aliases to unsupported, because the test succeed
remove posix group1 because it conflicts with unsupported
remove useless item from aliases
* rework gitlab connection
* added logic to handle multiple actions in an ALB listener rule (#41861)
* fix linting and pep8 issues
* added test for multiple actions using OIDC authentication
* added error messages related to old versions of botocore and multiple actions
* fix action validation error checks (need to check the exception string)
* added logic to make oidc configs idempotent (remove clientsecret for check)
* modified TargetGroupName to TargetGroupArn substitution to account for multiple rule actions
* refactored tests so that it can be run against different versions of botocore
* fix runme.sh to refelct changes to cloud testsuite
* add UseExistingClientSecret to oidc config (AWS api change)
* remove tests for OIDC auth action; add tests for redirect and fixed-response
* add in fixes from markuman and mjmayer
* remove documentation for cognito integration (not sure how to test); added example config for fixed-response and redirect actions
* renamed oidc/multiple action tests; leaving commented due to some AWS API changes
* pep8 fix
* more pep8 fixes
* Restructure elb_application_lb test suite
Move from runme.sh to virtualenv based roles
Update policies to fix tests
Don't log temp dir deletion, so many files in the diff!
This commit allows users to access a vCenter or a ESXi through a
HTTP CONNECT based proxy.
To do so, the users have to set the `proxy_host` and `proxy_port`
variables.
The can also use the `VMWARE_PROXY_HOST` and `VMWARE_PROXY_PORT`
environment variables.
This feature depends on pyvmomi > v6.7.1.2018.12.
Fixes: #42221
Co-Author: Abhijeet Kasurde <akasurde@redhat.com>
Co-Author: Gonéri Le Bouder <goneri@redhat.com>
Refactor vmware_cluster into several modules (vmware_cluster, vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan) as discussed in #58023.
vmware_cluster lacks a lot of configuration options for DRS, HA and vSAN. Implementing them
all in vmware_cluster would make the module hard to maintain. Therefore, splitting it into several
modules and implementing the missing configuration options in them seems a good idea to me.
This is step one, refactoring vmware_cluster into several modules. Step two, implementing more
configuration options for DRS, HA and vSAN, will follow.
If the 'local' parameter of the 'user' Ansible module is enabled, and
the user has been found in the local user database, don't emit
a warning, because this is an expected outcome.
Add changelog and integration tests
Co-authored-by: drybed <drybjed@gmail.com>
* meraki_snmp module supports network SNMP settings
- Network SNMP settings were added to the API
- Parameters are different so it's a new data structure
- Full suite of integration tests
- Commit includes some cleanup as well
* Add reset task for SNMPv3
* Fix py3 decoding issues in cyberarkpassword.py
* Use to_native instead of forced utf-8 decoding
* Use to_bytes to avoid trouble with Popen
* Create 59500-cyberarkpassword-fix-py3-decoding.yaml
##### SUMMARY
It should be known that this does not install homebrew. It only uses homebrew that is already installed. It's a core requirement.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
* Update pbrun.py
Require ternary operator for if get_option('user') returns NoneType object.
* Update pbrun.py
Added default value to become_user in documentation.
* Update pbrun.py
Changed default for become_user to be '' instead of root.
If a VM has an attached CDROM, `backing` attribute of the CDROM will
be defined.
As a result, we cannot just loop `vm_obj.config.hardware.device` and check
for the existance of the attribute to decide if the entry is a
harddrive.
Instead, we check the type of the device, and only keep the
`vim.vm.device.VirtualDisk` disk.
This issue is actually breaking our test-suite with regular environment
because we keep a Fedora ISO attached to the VM.
* Fixed the redhat_subscription module:
- Option 'pool_ids' works in Python3 now
- It tries to attach only pools IDs that are available
- Optimization of code: do not call list --available, when
no pool is requested
- Simplified configure() method
- Small changes to generate same commands on Python2 and Python3.
Order of arguments/options and pool IDs have to be same to
be able to run unit test using Python2 and Python3.
- Added fragments file for redhat_subscribtion module
Remove confusing phrase about pesize as a "multiple of 128KiB".
Allowed values are anything accepted by vgcreate -s,
powers of 2, minimum 1K for lvm2.
As pesize less than 1M is accepted since Ansible 2.6,
close#29295
* Added new module avi_user.py and tests for that
* Updated documentation as per module argspec
* Updated as per review comments on IP address
* Updated documentation for types
* Fixed sanity check failure for __future__ import
* Updated documentation as per review comments.
* change variable name from isinstance to is_instance (prevent overriding builtin function)
* Added support for:
- Filtering existing Elastic IPs based on a tag name or it's value (when reuse_existing_ip_allowed is true)
- Allocating new Elastic IPs from a given IPv4 pool (BYOIP support)
* yamllint corrections
* added examples for:
- tag_name,
- tag_value
- public_ipv4_pool
* remove aliases
* Added changelog fragment
* added integration tests for ec2_eip module
* removed space to trigger rebuild
* Implements etc_hosts for docker_image module
Allows custom hosts on docker_image module.
The of this option made impossible to use docker_image module to build
images that required a custom hostname in /etc/hosts. For running
containers this option was already present.
While the python-docker API uses extra_hosts term, our existing module
already uses etc_hosts argument, so it sounds better to have some
consistency between docker_container and docker_image.
Fixes: #59233
* Update test/integration/targets/docker_image/files/EtcHostsDockerfile
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Update lib/ansible/modules/cloud/docker/docker_image.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/docker_image_etc_hosts.yml
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Initial commit for meraki_mx_l7_firewall module
* Add argument checking
* Sanity fixes
* Fix crash and improve integration tests
* Improved integration tests and coverage
* Reformat response data
- Module does not match argument structure of API
- PR reformats the response to match Ansible arg spec
- Improved integration tests
* Fix reformatting for diffs
* Create rename_* functions
- is_update_required() ignores the key id
- Meraki expects one of the keys to be id
- Function temporarily renames key to appId to get around this
* Tweak documentation and tests
- Tests now do an include so each task doesn't need delegate_to
* Fix which files I'm editing
* Initial commit for meraki_nat module
- Query fully works
- Present is still very much in development
* Add initial code for present functionality, not complete
* Add request documentation
* Add examples and return documentation.
* Added payload to requests
- Module seems to need new idempotency check
* Allow 1:1 and 1:many NAT to work
- New idempotency check method is probably required to work
* Make all three options work
- Module isn't idempotent
* Diff support
- Added integration tests
- Diff support isn't quite done
* Fix diff output
* Enable idempotency assertion in tests
* Add test assertions for code coverage
* Update documentation and tests
- Split tests to separate file to avoid delegate_to
* Fix blank line
* Initial commit for module
- Module can query or modify network services on Meraki gear
- Check mode supported
- Integration tests included
* Small change to examples
* Move mutual exclusive to build in approach
* Sanity err
* Split integration tests into two files to avoid delegate_to
* Add the integration tests, woops
The default for a httpapi connection is to do basic auth, however
when setting the url_username and url_password without
force_basic_auth, the call to ansible.module_utils.open_url would
not always properly handle the basic auth headers based on the
combinations of **kwargs passed. This ensures that is always the
case when no session token exists and as the goal is to use basic
auth in the event of not having a session token, this should be
a safe operation.
Signed-off-by: Adam Miller <admiller@redhat.com>
Before this fix, the module was not able to look up a `VM Network` located at
`/DC0/network/VM Network`. As a consequence, the test module was failing
with a real environment (Non-govcsim).
* Adding Avi ansible lookup module
(cherry picked from commit 77b8951f68cbc889e6595b2a359ca27b84a43c0d)
* Added description for examples
* Added debug logs and unit tests
* Fix __builtin__ import and restting super
* Fix pep8 errors
* Updated as per review comments on IP address
Previously if `sysctl_set=no` (which is the default) this module only
checked for changes in the sysctl.conf file to decide whether it should
reload it or not. This means that if the values in the conf file are the
same as they are set with the module, but the current values on the
system are different, that this module wouldn't apply the changes on the
system and thus the value set with the module wouldn't be applied on the
OS. This isn't obvious and it doesn't make sense that the module works
like that by default, especially because there is a separate option
`reload`. Now sysctl will also check if the current value differs on the
system and if it does, it will reload the file again.
* Add junos_lag_interfaces resource module
* Add new resource module junos_lag_interfaces.
* Targets model https://github.com/ansible-network/resource_module_models/pull/29
* Deprecate junos_linkagg module
* Fix CI issues
* Fix junos integration test cases
* Fail if base lag interface is not configured
* Generate galaxy.yml based on single source of truth
* Fix up tests and align file names
* Minor Makefile tweak
* Remove link in galaxy.yml file and make it a template file
* Moved collections docs to dev_guide
* change Makefile clean path
* Added readme to example meta file
* review fixes
* Use newer style for doc generation script
* Fix mistake in dev_guide index
* removed uneeded file, fixed links and added preview banner
* Moved banner for sanity test
* add parameter list argument
* add tests
* fix test and add doc
* correct test file
* fix typo
* fix tests
* fix typo in file name
* correct file name reverting the previous commit
* correct property name
* add checkmode message
* changes as per review comments
* variable casing and other review comment changes
* define $test_parameters_check_mode_msg variable
* InventoryManager start of perf improvements
* 0 not 1
* More startswith to [0] improvements
* Remove unused var
* The hash doesn't need to be a string, start as a list, make it into a tuple
* set actually appears faster than frozenset, and these don't need to be frozen
* Cache hosts lists, to avoid extra get_hosts calls, pass to get_vars too
* negligible perf improvement, it could help with memory later
* Try the fast way, fallback to the safe way
* Revert to previous logic, linting fix
* Extend pre-caching to free
* Address test failures
* Hosts are strings
* Fix unit test
* host is a string
* update test assumption
* drop SharedPluginLoaderObj, pre-create a set, instead of 2 comparisons in the list comprehension
* Dedupe code
* Change to _hosts and _hosts_all in get_vars
* Add backwards compat for strategies that don't do set host caches
* Add deprecation message to SharedPluginLoaderObj
* Remove unused SharedPluginLoaderObj import
* Update docs/comments
* Remove debugging
* Indicate what patterh_hash is
* That won't work
* Re-fix tests
* Update _set_hosts_cache to accept the play directly, use without refresh in get_hosts_remaining and get_failed_hosts for backwards compat
* Rename variable to avoid confusion
* On add_host only manipulate _hosts_cache_all
* Add warning docs around _hosts and _hosts_all args
Commit b7724fdf85
appears to have caused a regression, where `ip4`, `gw4`, `ip6`, `gw6`
were converted to `ipv4.address`, `ipv4.gateway` etc.
This causes bootproto (or `ipv4.method`) to remain `dhcp`, as noted in https://github.com/ansible/ansible/issues/36615
This commit only reverts the key-value pairs to the original names,
which is in line with both expectation (manual ip addr == no dhcp) and
the language used in the playbook, which is, for example, "ip4" not
"ipv4.address"
Co-authored-by: Stuart Pollock <spollock@pivotal.io>
Co-authored-by: Tyler Ramer <tramer@pivotal.io>
vmware_guest accepts 0MB as valid value for memory reservation in
virtual machine hardware configuration. This fixes the regression
introduced via 193f69064f.
Fixes: #59190
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Windows - Add common util for web requests
* Use different method of retrieving options from module arg spec
* Added proper version_added for module options
* Fix linting errors
* Fix proxy issues and updated cred docs
* Fix FTP usage with proxy settings
* Removed uneeded function added in bad rebase
* Fix up client certificate auth
* fix new sanity checks
* Edit http agent code and update porting guide