* Improve code structure
* Add author for module
* Now returns some values
* Update module's metadata
* Copy test case of rabbitmq_lookup
* Add test cases for rabbitmq_vhost_limits
* Minor fixes in documentation
* Fix module's return values
* Refactor module
* Improve test case
* Revise English in documentation
* Disable returning values because it's useless & unnecessary
* Work on failures: E261: match PEP8 styles
* Work on failures: E312: add RETURN section in documentation
* Add integration tests for iam_policy
* Fix indentation and ignore errors during clean up
* Mark iam_policy integration tests as unsupported by CI
* Add policies to a temporary folder that is cleaned up
* Add tasks to verify that iam_policy can remove policies from users, roles, and groups
* RabbitMQ basic publisher
* Split out of a module_util. Preparing for binary posts.
* Can now send a file to the queue.
* Allowing an empty queue to be used so RabbitMQ returns a random queue.
* Added RETURN docstring.
* Updated and added tests. Now returns a dictionary with msg, content_type and queue published to.
* Extra tests and introduced a none url method of providing server host details.
* Added testing and errors for url/host parameters.
* Updating RETURN sample
* Added an image file for testing binary publishing.
* Minor changes to test.
* Added filename key/value to headers if a binary file is published.
* Adding ability to specify headers.
* Renaming to rabbitmq_publish
* Changed tests to reflect name, and, preparing for testing headers.
* Updated some documentation
* Minor pip install update
* Modifications after feedback.
* Updates based on feedback.
* Fixing pep8 issue.
* Updating module and module_util name to amqp.
* Reverting back to rabbitmq_publish naming.
* Minor addition to notes.
We don't need to test with `upgrade: dist`, since we're not trying
to test the `apt` module. We just need to make sure the hold set
by the `dpkg_selections` module is working.
This change will avoid updating all the packages on the system,
which is slow, unnecessary, and can cause the installed python
to be changed.
* Add module ses_rule_set for Amazon SES
* Update behaviours and naming to be consistent with other aws_ses_ modules.
* Add global lock around tests using active rule sets to prevent intermittent test failures.
* Fix deletion of rule sets so that we don't inactivate the active rule set
when force deleting an inactive rule set.
* Fix tests: use same command if not testing command option.
* Fix idempotency of init option.
* Fix shm_size idempotency (it is included in inspect results from docker API version 1.22 on).
* Add changelog.
* Updating argument_spec for docker_* modules.
* Adjust docker_network to work with new recursive argument_spec.
* Adjust device IO limits to recursive argument_spec.
* Improve test (test Ansible's cast from str to int).
* Adjust healthcheck options construction.
* Remove superfluous check.
* Make flake8 happy.
* Simplify comparison.
* support for iscsi vnics based on customer feature request
integration tests added for iscsi vnics and vnic state absent
* correct version_added for iscsi and vnic lists
* ebs_optimized is not suboption of 'network'
* Add Shaps as ec2_instance maintainer
* Added workaround-backward compatible check for ebs_optimized
* Added ebs_optimized test
* CI fixes, dynamic select of ENA-enabled AMI
* Simplify logic and add FreeBSD & NetBSD
* Remove incorrect flag for lock and unlock on FreeBSD
* Add tests and changelog
Co-authored-by: Chris Gadd <gaddman@email.com>
PIP package names must be case insensitive, and must consider hyphens
and underscores to be equivalent
(https://www.python.org/dev/peps/pep-0426/#name), because of this the
module didn't work correctly in check mode. For example if the passed
package name had a different case or an underscore instead of a hyphen
(or the other way around) compared to the installed package, check mode
reported as changed, even though packages were installed. Now the module
ignores case and hyphens/underscores in package names, so check mode
works correctly.
* Add passlib to RHEL test instance
This looks like the only tests instance that is missing this libary. It is needed for vars_prompt tests.
* Create setup roles for pexect and passlib
Switch to using aliases rather than installing directly in the test scripts
* win_update: Add post search category matching to support product matching
* win_updates: Return categories of each update
* win_updates: Documentation fix-up
* win_updates: Adjusted documentation to reflect regex vs sub-string match of post-cat strings
* win_updates: Sped up post-category checking
* win_updates: Updated documentation to suggest querying post-category strings
* win_updates: Simplified saving and checking post-categories
* fixed some issues and added filtered categories to return value
* win_updates: Moved all category matching to occur after initial search
* win_updates: Adjustments to satisfy PowerShell lint checks
* win_updates: Dropped category validation from action plugin
* win_updates: Documentation updates
* win_updates: Fixed plugin unit tests
* Added basic equivalent to PowerShell modules
* changes based on latest review
* Added tests
* ignore sanity test due to how tests are set up
* Changes to work with PSCore
* Added documentation and change updated more modules
* Add some speed optimisations to AddType
* fix some issues in the doc changes
* doc changes
* Allow bang and exclamation without warning
Allow the password field to be ! or * without warning when using this feature to create accounts that are locked.
Add documentation and tests to cover this.
* Use set() rather than braces for Python 2.6
* Fix lvg module idempotency
In [1] changes were made to ensure that the physical
devices were appropriately filtered, but the dev_list
which is used to prepare the filter is modified from
the original arguments to resolve any symlinks. This
results in the existing devices given in the module
args to be left out of the filter, resulting
in the module trying to add the same device again
every time the task is executed.
In this PR we change dev_list to be a copy of the
module arguments so that we're able to add the given
pv list from the module arguments into the filter
as well, ensuring that there is idempotence when
running the task again.
[1] https://github.com/ansible/ansible/pull/38446
* Add lvg module idempotence test
To ensure that the lvg module is tested for idempotency,
we add a basic integration test.
Support for MacOS and FreeBSD are skipped because the
module does not currently support those platforms.
* Store parsed docker-py / docker API versions in client.
* Began refactoring 'minimal required version' for docker_container options.
* Removing some fake defaults.
* Added changelog.
* Improve tests (check older docker versions).
* Fix comparison. The breaking point is not docker-py 2.0.0, but 1.10.0.
(Verified by testing with these versions.)
* Move docker-py/API version detection to setup_docker.
* Add YAML document starter.
* docker_network requirement for docker-py was bumped to 1.10.0 in #47492.
* Support for device read write limit parameters
* Add following options in docker_container module
- device_read_bps
- device_write_bps
- device_read_iops
- device_write_iops
Fixes#36831
* test for device_read_iops
* combined test for device_write_bps and device_write_iops
* cleanup is already tested.
* Add test for paused.
* Add recreate and restart tests.
* timeout is a common docker option
* Implement paused and fix paused test.
* Add changelog.
* Improve paused test.
* Modify yum/tasks/proxy.yml to usernames that expose regex bug
* Fix bad regex backref/interpolation w/yum proxy username
A yum proxy username that begins with a number was being
interpolated as part of the backref, resulting in an error:
"sre_constants.error: invalid group reference"
Closes#47797
* Parsing plugin filter may raise TypeError, gracefully handle this exception
and let user know about the syntax error in plugin filter file.
* Test for plugin_filtering
Fixes: #46658
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* initial commit of facts module for Memset VPS/dedicated server products
* add missing brace
* add integration tests (disabled until we have a mock API to test against)
* bump ansible release version to 2.8
* initial commit of facts module to return usage of a Memstore cloudstorage product
* switch API wrapper to use basic auth instead of passing the api_key in the body
* add integration tests (disabled until we have a mock API to test against)
* bump ansible release version to 2.8
* Controlled params within no section
* Added tests to control params within no section
* Cleaning output_file before creating no-section params and check the content
* addresses comment in PR "s/hate/beverage/g"
* integration test for docker_swarm_service
* ensure stack de-initialization
* Set default value for 'configs' parameter to None
Docker-py uses None as a default value for configs.
Using the same default here allows to create services on older docker
setups (docker_api<1.30).
* Set default value for 'update_order' parameter to None
Docker-py uses None as a default value for update_order.
Using the same default here allows to create services on older docker
setups (docker_api<1.29)
* Set default value for 'publish.mode' parameter to None
Docker-py uses None as a default value for publish_mode.
Using the same default here allows to create services on older docker
setups (docker_api<1.32)
* Allow tests to run on older version of docker.
* remove workarounds for old docker versions
* test correct swarm cleanup
* changelog fragment for docker_swarm_service defaults change
* Fixed#47505: Type error in openssl_certificate
* Use to_bytes instead of str.encode in SelfSignedCertificate. Updates #47508
* Use to_bytes instead of str.encode in OwnCACertificate
* Added integration tests for openssl_certificate: selfsigned_not_before/after and ownca_not_before/after
* Add docker_image_facts tests.
* Add basic integration test for docker_volume.
* Add basic docker_image tests.
* Only start test registry when tests are actually run (i.e. not on CentOS 6).
The mysql-server package on Ubuntu16.04 was recently updated to disallow
unauthenticated root user login over tcp/ip. This, coupled with pymysql
using tcp/ip whenever host and port is specified causes us to fail to
connect to the database when testing Python3 on Ubuntu16.04.
The fix is to use the unix socket instead.
* Add Support of healthcheck in docker_container module
Fixes#33622
Now container can be started with healthcheck enabled
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Extend docker_container healthcheck (#1)
* Allowing to disable healthcheck.
* Added test for healthcheck.
* Make sure correct types are used.
* Healthcheck needs to be explicitly disabled with test: ['NONE'].
* pep8 fixes
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Fix bug if healthcheck interval is 1 day or more
`timedelta` object has days too and seconds are up to one day.
Therefore use `total_seconds()` to convert time into seconds.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Add test for healthcheck when healthcheck is not specified
This is to avoid the situation when healthcheck is not specified and
treat this as healthcheck is changed or removed.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Convert string syntax for healthcheck test to CMD-SHELL
Also add another test case to check idempotency when healthcheck test
is specified as string
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Playbook fails if minimun docker version is not satisfy for healthcheck
This is to make more consistent with other non-supported options.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* WinRM/PSRP: Ensure shell returns UTF-8 output
This PR makes UTF-8 output work in PSRP shells.
* Add win_command and win_shell integration tests
* Fix tests
* more test fixes
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.
* Add tests.
* Added changelog.
This reverts commit 0e933f76ba.
The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform. Tests need to be rewritten
* New module vmware_host_powermgmt_policy
* minor changes
Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* New module vmware_host_ipv6
* Minor changes
Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add datacenter_name alias
* Improve vcenter_folder module
* add check mode support
* fix VM folder deletion
* fix folder deletion under parent folder
* fix (host) folder creation if two datacenters are present
* Add runtime option to docker_container module
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add changelog fragment
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add idempotency test for docker_container.runtime
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* kick off
* done for the day
* beta code and test
* fix a typo
* boto3_conn and boto_exception aren't used in this code, ec2_argument_spec is used but unneeded.
* Returning when find a match avoids doing extra work, especially when pagination is involved
* add new permissions for test
* (output is changed) is preferred over accessing the attribute directly.
* pass the result through camel_dict_to_snake_dict() before returning it.
* AnsibleAWSModule automatically merges the argument_spec.
* deletes the created resources even if a test fails.
* AnsibleAWSModule automatically merges the argument_spec.
* fix typo
* fix pep8
* paginate list_repositories
* specify permissions for test
* cut the unnecessary code.
* add return doc string
* add missed ':'
* fix syntax error: mapping values are not allowed here
* add description for return
* fix syntax error
* rename module name and turn off automated integration test.
* Adding iam_password_policy module
* fixing various issues -- error handling, bugs
* fixing various issues based on tests
* renaming dummy var
* fixing type reference in documentation
* adding int tests and other updates
* removing typo
* fixing auth for int tests
* removing int tests for now
* readding integration tests w/ unsupported designation
* removing conflicting group
* Update aliases
* Fix unused variable
* ansible-test: add skip/windows/... alias to skip tests on specific Windows versions
* show what tests were skipped
* changes to logic to only skip if all Windows targets are set to skip
* codestyle improvements
* change warning message based on review
* check args type before running the Windows path
* Making username password etc non mandatory as we use persistence connection.
Some documentation fine tuning also done.
* To update version which was tested against.
* Adding Bacon switch (NE0152T) to device rules
* Qalthos Review catch
* Updating version
* Changing documentation to add Bacon switch. This is effective since 2.8
* Remove unnecessary workaround
* add test: set RABBITMQ_NODENAME environment variable
The following error occurs:
TASK [rabbitmq_user : Add user] ***
fatal: [testhost]: FAILED! => {
"changed": false,
"cmd": "/usr/sbin/rabbitmqctl -q list_users",
"rc": 69,
"msg": "Error:********@c65c2bc59398'. Please see diagnostics information and suggestions below.\n\nMost common reasons for this are:\n\n * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)\n * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)\n * Target node is not running\n\nIn addition to the diagnostics info below:\n\n * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more\n * Consult server logs on node test@c65c2bc59398\n\nDIAGNOSTICS\n===========\n\nattempted to contact:********@c65c2bc59398\n * effective user's home directory: /var/lib/rabbitmq\n * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==",
"stderr": [...],
"stderr_lines": [
"Error: unable to perform an operation on node 'test@c65c2bc59398'. Please see diagnostics information and suggestions below.", "",
"Most common reasons for this are:", "",
" * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)",
" * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)",
" * Target node is not running", "",
"In addition to the diagnostics info below:", "",
" * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more",
" * Consult server logs on node test@c65c2bc59398", "",
"DIAGNOSTICS", "===========", "",
"attempted to contact: [test@c65c2bc59398]", "",
"test@c65c2bc59398:",
" * connected to epmd (port 4369) on c65c2bc59398",
" * epmd reports: node 'test' not running at all",
" other nodes on c65c2bc59398: [rabbit]",
" * suggestion: start the node", "",
"Current node details:",
" * node name: rabbitmqcli2@c65c2bc59398",
" * effective user's home directory: /var/lib/rabbitmq",
" * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==", ""
],
"stdout": "",
"stdout_lines": []
}
* node parameter: fix default value
'rabbit' is the default value mentioned in the module documentation.
* module_utils.urls: add fetch_file function
* apt: use fetch_file instead of own download()
* unarchive: use fetch_file instead of own codecopy
* apt: add test for deb=http://…
* unarchive: add test for a remote file download and unarchive
* yum: replace fetch_rpm_from_url by fetch_file
* use NamedTemporaryFile
* don't add a dot to fileext, it's already there
* Allow to specify images by hash for docker_container and docker_image_facts.
* flake8
* More sanity checks.
* Added changelog.
* Added test.
* Make compatible with Python < 3.4.
* Remove out-commented imports.
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.
* Adding a basic get lookup for rabbitmq.
* Always return a list
* If content type is JSON, make accessible via dict.
* Fixed incorrect json.loads variable and missing raise
* Change to document returned data
* Fixed pep8 issues
* Adding integration testing
* Moving lookup intgration tests to new target
* New rabbitmq lookup plugin (#44070).
* New rabbitmq lookup plugin (#44070).
* PR review feedback updates
* Testing pika is installed
* Minor mods to tests
* Check if connection is already closed or closing
* Updated tests and connection testing
* PR review feedback updates
* PR review include ValueError in AnsibleError output
* Suggesting to use set_fact when using returned variable more than once.
* Cleaned up some tests, added some notes and handling connection closure on some exceptions.
* Removed finally statement and added some additional error handling.
* Added some additional error handling.
* PR review updates.
* Additional integration tests and removing return in finally
* Updated version
* Changing back to running tests on ubuntu.
* Additional tests
* Running tests on Ubuntu only
* Fixing syntax error
* Fixing ingtegration tests and a string/byte issue
* Removed non-required test and fixed BOTMETA
* Trying to fix integration test failure on ubuntu1404
* Some issues occured when handling messages from the queue with to_native. Switching to to_text resolved the issues.
* Renaming channel to queue (thanks dch). Disabling trusty tests.
* win_exec: refactor PS exec runner
* more changes for PSCore compatibility
* made some changes based on the recent review
* split up module exec scripts for smaller payload
* removed C# module support to focus on just error msg improvement
* cleaned up c# test classifier code
* Check that union Jinja filter can be chained
* set filters: fix unexpected templating type error
this error occurs with Jinja 2.10 since 32ec69d827,
for example when union filters are chained:
$ ansible all -i localhost, -mdebug -a"msg={{ []|union([])|union([]) }}"
localhost | FAILED! => {
"msg": "Unexpected templating type error occurred on ({{ []|union([])|union([]) }}):
unsupported operand type(s) for +: 'set' and 'list'"
}
* docker_container: Honour stop_timeout when creating docker containers (#43814)
* Adjusting description to what actually happens.
See docker-py changelog for 2.7.0: 'APIClient.stop will
no longer override the stop_timeout value present in the
container’s configuration.'
* Add a test whether stop_timeout can be configured for the container.
* Added changelog.
* Integrate with comparisons (by default, ignore stop_timeout value for restarts; will be configurable with PR ansible/ansible#44789).
* Fix config change code and tests (#2)
* Improving wildcard test.
* Using correct config.
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.
* win_nssm: add failing tests for issue #44079
* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue
Fix#44079
* win_nssm: add more failing tests
These tests highlight several issues with this module:
* Service not started when state=started
* Errors with app_parameters (see #25265)
* Exception when passing several dependencies separated by comma as specified in doc
* win_nssm: fix service not started when state=started
Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.
* win_nssm: fix incorrect separator in doc for service dependencies
The dependencies parameter works with space as separator, but not with comma as shown in the documentation
* win_nssm: fix error with app_parameters parameter
Fix#25265
* win_nssm: add idempotence tests
* win_nssm: fix several idempotence issues and misbehaviors
Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).
* win_nssm: test parameters with spaces, quotes or backslashes
* win_nssm: restore comma as separator for service dependencies
Revert commit ddd4b4b
* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict
* win_nssm: wrong variable in tests
* Added feature facts to nxos_facts
* Fixed ansibot indentation
* Resolved ansibot whitespace missing after ','
* Per PR suggestion, created method in base class to gather switch config
and store in global variable to prevent multiple calls to switch.
* Addressed ansibot blank line & whitespace after ,
* Various changes to nxos_logging. Plus added purge capibility.
* Made a few new nxapi_logging test cases conditional based on version
and/or platform.
* Addressed PR comments and ansibot shippable. Fixed up nxos_logging documentation format.
* Addressed ansibot shippable issues with whitespaces and documentation.
* Resolved ansibot codestyle trailing whitespace
* Sorting args.
* Doing comparisons of options with container parameters in a more context-sensitive way.
This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).
* Make blkio_weight work.
* Fix cap_drop idempotency problem.
* Making groups idempotent if it contains integers.
* Make cpuset_mems work.
* Make dns_opts work.
* Fixing log_opts: docker expects string values, returns error for integer.
* Adding tests from felixfontein/ansible-docker_container-test#2.
* Make uts work.
* Adding changelog entry.
* Forgot option security_opts.
* Fixing typo.
* Explain strict set(dict) comparison a bit more.
* Improving idempotency tests.
* Making dns_servers a list, since the ordering is relevant.
* Making dns_search_domains a list, since the ordering is relevant.
* Improving dns_search_domains/dns_servers.
* Fixing entrypoint test.
* Making sure options are only supported for correct docker-py versions.
* win async: use async_dir for the async results file directory
* tried to unify POSIX and PowerShell async implementations of async_dir
* fix sanity issue
The documented way to execute module code locally wasn't always working:
$ python ./lib/ansible/modules/files/file.py <<< '{"ANSIBLE_MODULE_ARGS": {}}'
Traceback (most recent call last):
File "./lib/ansible/modules/files/file.py", line 177, in <module>
from ansible.module_utils.basic import AnsibleModule
File "~/ansible/lib/ansible/module_utils/basic.py", line 78, in <module>
import tempfile
File "~/ansible/lib/ansible/modules/files/tempfile.py", line 69, in <module>
from tempfile import mkstemp, mkdtemp
ImportError: cannot import name 'mkstemp'
- Leave swarm at end of test to avoid breaking docker_swarm test.
- Do not update stack to avoid error leaving swarm.
- Put test back in correct group.
* efs.py: Add support for EFS provisioned throughput
* efs_facts.py: Add support for EFS provisioned throughput
* efs_facts integration tests updated with provision throughput
* efs_facts: Tests refactoring - add failure and success playbook according to botocore version.
* efs_facts: More tests and new option descriptions adjustment
* efs_facts tests renamed to efs
* Improve iam_group exception handling
Use AnsibleAWSModule for iam_group and handle BotoCoreErrors
as well as ClientErrors. Use fail_json_aws to improve error messages
* Add minimal iam_group test suite
Update some of the read-only IAM permissions (this is not sufficient
to run the test suite but it gets further than it did until it tries
to add a (non-existent) user)
* Clean up after tests
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.
* Add ec2_group integration tests for lists of nested targets
* changelog
* Add diff mode support for lists of targets containing strings and lists.
* Fix support for VPC capabilities such as redundant routers or region level VPC
* Add integration test cases for "region level VPC" and "distributed router" capabilities
* win_script: add support for become and centralise exec wrapper builder
* satisfying the pep8 gods
* do not scan for module dependencies when running as a script
* To change all CLIs present in the code to latest CNOS CLI. One bug of executing with Lenovo Jakku switch is also getting fixed.
* To change the file names as the commands have changed from display to show
* To change to new CLI in test_cnos_comand.py as well
* multiple parents issues in diff
* Integration tests for missing functionality
* add testcase for other platforms. vnxos does not support qos so need to find a command chain on v-nxos for multiple parets. junos uses on-device diff so should not need this.
* Fix for issue when any candidate parent did not meet the exact line in running-config
* DCI runs eos_config without become flag
* Use a sensible default for k8s merge_type
The sensible default for merge_type is `['strategic-merge', 'merge'].
However, we can't make this the default default, as we need to support
users who are using openshift 0.6.0, where the merge_type parameter is
unsupported.
* Refactor k8s test suite for merge_type tests
Allow tests with pre-merge-type openshift and post-merge-type
openshift.
* expect ssh_key_data to be a string instead of path
ssh_key_data should be a string filled with the private key
the old behavior can be archived with a lookup
Fixes#45119
* clarifies ssh_key_data description, adds newline