Commit graph

3358 commits

Author SHA1 Message Date
Xaroth
87d10b9b78 Include dependency role names in role_names. (#46483)
* -Change: Include dependency role names in `role_names`.
-Add: `play_role_names` magic variable to include only explicitly named roles (formerly `role_names`).
-Add: `dependent_role_names` magic variable to include all dependency names for all roles.

* -Change: use the ansible_ prefix for new magic variables.
-Change: keep `role_names` as a deprecated variable, using the old functionality.

* -Add: changelog fragment for the role_names rework.

* -Add: Tests for the role_names (and ansible_*role_names) special variables

* -Fix: resolve erroneous documentation snippet that was introduced after rebasing.

* -Fix: explicitly sort to ensure list comparison works in test.
2018-11-15 10:01:29 -05:00
Hiroyuki Matsuo
60dcfc3a09 Add rabbitmq_vhost_limits module (#37821)
* 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
2018-11-15 10:10:41 +05:30
Kyle Knapp
e822450a79 Add integration tests for iam_policy (#40115)
* 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
2018-11-14 20:14:19 -05:00
John Imison
54c54fc960 RabbitMQ publisher module (#44718)
* 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.
2018-11-15 11:06:54 +10:00
Matt Clay
136a2cca2f Use state: latest for dpkg_selections test.
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.
2018-11-14 17:03:07 -08:00
Martin Krizek
0c86df33a4 apt: disable ubuntu repos to not change test env 2018-11-14 15:04:58 -08:00
Ed Costello
b70d5d9aee [AWS] ses rule set module for inbound email processing (#42781)
* 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.
2018-11-14 12:15:24 -05:00
Ryan Brown
405d6d605f [AWS] Enable Route53 integration tests (#46228) 2018-11-14 11:40:38 -05:00
saichint
ba2c8a24e2 add N3K-F type to nxos platforms (#47944) 2018-11-14 10:43:35 -05:00
Martin Krizek
907ff2f26c Add new meta task end_host (#47194)
* Add new meta task  end_host
2018-11-14 09:46:25 -05:00
Zim Kalinowski
7db4352f6e
Adding missing idempotence support in load balancer (#45548)
idempotence
2018-11-14 16:57:03 +08:00
Jordan Borean
9ac89af355
win_chocolatey - move over to AnsibleModule and add allow_multiple (#48370) 2018-11-14 16:18:34 +10:00
Martin Krizek
d6bd842c5f
Run "update foo*" integration test on dnf too (#48607) 2018-11-14 06:57:53 +01:00
Jordan Borean
6898f02431
win_shortcut: add run as admin and fix shell folder idempotency (#48584) 2018-11-14 12:15:04 +10:00
Felix Fontein
b1acabcd03 docker_container: fix tests and idempotency for init and shm_size (#48551)
* 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.
2018-11-13 13:07:36 +00:00
Will Thames
4e1e9589b5 Add wait functionality to k8s module (#47493)
Provide wait and wait_timeout parameters and wait for certain
resource kinds to become available.
2018-11-13 12:50:15 +00:00
Dag Wieers
24d7b4a660
Various small fixes to MSC modules and tests (#48417) 2018-11-13 09:01:45 +01:00
Felix Fontein
0206a46e1d docker_* modules: updating argument_spec (#48491)
* 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.
2018-11-12 11:33:42 +00:00
Felix Fontein
feb60b947c Docker volume fix labels (#48536)
* Add integration test for labels (which fails).

* Changing labels from list to dict.

* Add changelog.
2018-11-12 11:24:07 +00:00
Tim Rupp
cdc5ab7737
Adds functional tests for new mysql_user privs (#48403)
Adds tests for FUNCTION and PROCEDURE privs
2018-11-09 08:59:19 -08:00
David Soper
9757d9d4c3 support for iscsi vnics based on customer feature request (#48377)
* 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
2018-11-09 16:26:23 +00:00
Andrea Tartaglia
b7d9feb7dc ec2_instance: ebs_optimized is not sub-option of 'network' (#48341)
* 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
2018-11-09 12:11:51 +00:00
Christopher Gadd
f75a84e382 make password locking in user module idempotent (#43671)
* 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>
2018-11-08 21:29:38 -05:00
Strahinja Kustudic
b89b688d52 Fix pip idempotence in check mode
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.
2018-11-08 17:09:34 -08:00
Sam Doran
96c2375692
Add setup roles for passlib and pexpect for use with pause and vars_prompt tests (#43613)
* 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
2018-11-08 17:05:54 -05:00
David Soper
dda753dc05 ucs_service_profile_template and integration tests (#48277) 2018-11-08 18:42:20 +00:00
Martin Krizek
6ec820e264 yum: add integration test for 'update foo*' (#48336) 2018-11-08 11:39:02 -05:00
Jimmy McCrory
d2969884b4 Add run_once as a valid TaskInclude keyword (#48068)
* Add run_once as a valid TaskInclude keyword

* Add changelog fragment

* Add integration test that documents run_once behavior
2018-11-08 10:29:24 -05:00
John McDonough
9c83640d75 Add module for UCS Org (#46785)
* Add module for UCS DNS Server
2018-11-08 10:50:46 +00:00
John McDonough
7609fe8b09 Add UCS DNS Server management module (#46789)
* Add module for UCS DNS Server
2018-11-08 10:49:24 +00:00
Martin Krizek
41dfc5162f user: fix removing the expiry time when it's 0 (#47115)
* user: fix removing the expiry time when it's 0

* Improve tests and add changelog

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2018-11-07 16:44:34 -05:00
Matt Clay
17b3171917 Get rabbitmq and erlang GPG keys from S3 in tests. 2018-11-07 09:57:47 -08:00
Hugh Ma
a858089eb2 Add survey_spec parameter to module. (#48182)
* Add survey_spec parameter to module.
Fixes #48011

* Removed trailing white space. Added integration test.
2018-11-07 13:09:40 +01:00
Michael Cassaniti
a2f3f16930 win_updates: Add post search category matching to support product matching (#45708)
* 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
2018-11-07 19:32:07 +10:00
Jordan Borean
501acae5ab
Added basic equivalent to PowerShell modules (#44705)
* 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
2018-11-07 10:53:17 +10:00
Felix Fontein
602d02be5f Add docker_container_facts module. (#48062) 2018-11-06 15:08:28 +00:00
Dave Bendit
d7686e1bc0 [docker_network] Add handling for Python booleans in driver_options (#48105)
Fixes #26708
2018-11-06 14:39:45 +00:00
Jordan Borean
8787c65b65
powershell: add ability to ignore specific warnings in C# Add-Type (#47643) 2018-11-06 10:48:31 +10:00
Matt Clay
150cdd7931 Pin openshift version for k8s test.
This will avoid spontaneous test failure for new releases of openshift on PyPI.
2018-11-05 15:59:57 -08:00
Sam Doran
8c49fd2a2c
Adjust pause test (#48125)
Use send() rather than sendlin() calls when testing interactive prompting and echo.
2018-11-05 17:03:41 -05:00
Sam Doran
066af3b6ca
User module - allow bang and exclamation in password field without warning (#46498)
* 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
2018-11-05 16:35:10 -05:00
Dag Wieers
df6b0b0e9e aci_aptiplp: Support missing policy_group (#48000)
* aci_aptiplp: Support missing policy_group

* Adapt integration tests to fix

* Add changelog fragment

* Fix

Co-Authored-By: dagwieers <dag@wieers.com>
2018-11-05 18:21:01 +00:00
Dag Wieers
d1f6ff646a aci_iplpg: Support missing aep (#48001)
* aci_iplpg: Support missing aep
2018-11-05 18:20:23 +00:00
Dag Wieers
591b074e43
aci_switch_leaf_selector: Support missing policy_group (#47992)
* aci_switch_leaf_selector: Support empty policy_group

* Reorganize code

* Adapt integration tests to fix
2018-11-05 19:02:06 +01:00
Felix Fontein
2728a22f73 Add docker_prune module (#48063)
* Add docker_prune module.

* Fix spelling error.
2018-11-05 17:05:26 +00:00
Pilou
6f8ffeb6bf tower{job,workflow}_template: use same retries value (#47865) 2018-11-05 16:56:19 +00:00
Dag Wieers
2c0707c034
Add missing MSC support
This was missing from PR #46116
2018-11-05 16:38:37 +01:00
Felix Fontein
8eb656de8b Fixing idempotency test. (#48038) 2018-11-05 12:55:27 +00:00
Jesse Pretorius
0fc99c3939 Fix lvg module idempotency (#47620)
* 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.
2018-11-05 12:50:21 +00:00
Felix Fontein
569ec812e7 Improve paused test and behavior. (#48056) 2018-11-05 11:34:23 +00:00