Commit Graph

3567 Commits (9fa46e7f946bfe244d0e126bd96588b460592826)

Author SHA1 Message Date
Felix Fontein 891687284f docker_* modules: improve diff (#48546)
* Add difference tracking tool

* Improve --diff mode for docker_container.

* Improve diffs of sets by ordering the sets.

* Rewrite imports, get rid of HAS_DOCKER_PY_x variables and use docker_version instead.

* Rename container -> active (more generic).

* Add --diff for docker_volume. Change old diff output.

* Add --diff for docker_network. Change old diff output.

* Add --diff for docker_swarm_service.

* Add changelog.

* Add entry for porting guide on docker_network and docker_volume.
6 years ago
jhawkesworth 361acd3547 win_say: Port to use CSharpUtil AnsibleBasic (#48361)
* port win-say to use CSharpUtil AnsibleBasic and add warning when requested voice not found

* win_say: fixes following code review: use C# style properties consistently; prefix changelog fragments

* fix invalid yaml in change log fragment

* win_say: fixes following code review: use generic module parameter validation where possible

* remove redundant setting of Result.changed to false, simplified some logic for readability.

* fix serialisation issue when message text is drawn from a file; allows tests to be run not in check mode and fix up some test descriptions
6 years ago
Jordan Borean fd4b282f6f
Ansible.Basic.cs - fix check mode run with nested spec (#48838) 6 years ago
Matt Clay a41c0405a7
Add CI platform: rhel/8.0 (#48835) 6 years ago
Matt Davis 97f97339f7
re-enable batch tests for win_script (#48822)
* skipped on Server 2008 since batch interpreter is busted under UTF8 codepage
* see https://github.com/ansible/ansible/issues/21915 for more details
6 years ago
David Soper 62b165c8d3 UCS managed objects module for direct control of any object (#44470)
* UCS managed objects module for direct control of any object and properties.

* Avoid checks for parent info or passwords in property compares

* Planned for 2.8

* try except for imports
6 years ago
Will Thames aaf29c785f Provide Kubernetes resource validation to k8s module (#43352)
* Provide Kubernetes resource validation to k8s module

Use kubernetes-validate to validate Kubernetes resource
definitions against the published schema

* Additional tests for kubernetes-validate

* Improve k8s error messages on exceptions

Parse the response body for the message rather than returning
a JSON blob

If we've validated and there are warnings, return those too - they
can be more helpful

```
"msg": "Failed to patch object: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},
       \"status\":\"Failure\",\"message\":\"[pos 334]: json: decNum: got first char 'h'\",\"code\":500}\n",
```
vs
```
"msg": "Failed to patch object: [pos 334]: json: decNum: got first char 'h'\nresource
        validation error at spec.replicas: 'hello' is not of type u'integer'",
```

* Update versions used

In particular openshift/origin:3.9.0

* Add changelog for k8s validate change
6 years ago
Felix Fontein afded1c778 Use force_kill instead of stop_timeout to fasten container cleanup. (#48733) 6 years ago
Dan 01b06dd5f2 Added track option for nxos_static_route module (#48710) 6 years ago
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.
6 years ago
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
6 years ago
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
6 years ago
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.
6 years ago
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.
6 years ago
Martin Krizek 0c86df33a4 apt: disable ubuntu repos to not change test env 6 years ago
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.
6 years ago
Ryan Brown 405d6d605f [AWS] Enable Route53 integration tests (#46228) 6 years ago
saichint ba2c8a24e2 add N3K-F type to nxos platforms (#47944) 6 years ago
Martin Krizek 907ff2f26c Add new meta task end_host (#47194)
* Add new meta task  end_host
6 years ago
Zim Kalinowski 7db4352f6e
Adding missing idempotence support in load balancer (#45548)
idempotence
6 years ago
Jordan Borean 9ac89af355
win_chocolatey - move over to AnsibleModule and add allow_multiple (#48370) 6 years ago
Martin Krizek d6bd842c5f
Run "update foo*" integration test on dnf too (#48607) 6 years ago
Jordan Borean 6898f02431
win_shortcut: add run as admin and fix shell folder idempotency (#48584) 6 years ago
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.
6 years ago
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.
6 years ago
Dag Wieers 24d7b4a660
Various small fixes to MSC modules and tests (#48417) 6 years ago
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.
6 years ago
Felix Fontein feb60b947c Docker volume fix labels (#48536)
* Add integration test for labels (which fails).

* Changing labels from list to dict.

* Add changelog.
6 years ago
Tim Rupp cdc5ab7737
Adds functional tests for new mysql_user privs (#48403)
Adds tests for FUNCTION and PROCEDURE privs
6 years ago
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
6 years ago
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
6 years ago
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>
6 years ago
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.
6 years ago
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
6 years ago
David Soper dda753dc05 ucs_service_profile_template and integration tests (#48277) 6 years ago
Martin Krizek 6ec820e264 yum: add integration test for 'update foo*' (#48336) 6 years ago
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
6 years ago
John McDonough 9c83640d75 Add module for UCS Org (#46785)
* Add module for UCS DNS Server
6 years ago
John McDonough 7609fe8b09 Add UCS DNS Server management module (#46789)
* Add module for UCS DNS Server
6 years ago
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>
6 years ago
Matt Clay 17b3171917 Get rabbitmq and erlang GPG keys from S3 in tests. 6 years ago
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.
6 years ago
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
6 years ago
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
6 years ago
Felix Fontein 602d02be5f Add docker_container_facts module. (#48062) 6 years ago
Dave Bendit d7686e1bc0 [docker_network] Add handling for Python booleans in driver_options (#48105)
Fixes #26708
6 years ago
Jordan Borean 8787c65b65
powershell: add ability to ignore specific warnings in C# Add-Type (#47643) 6 years ago
Matt Clay 150cdd7931 Pin openshift version for k8s test.
This will avoid spontaneous test failure for new releases of openshift on PyPI.
6 years ago
Sam Doran 8c49fd2a2c
Adjust pause test (#48125)
Use send() rather than sendlin() calls when testing interactive prompting and echo.
6 years ago
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
6 years ago
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>
6 years ago
Dag Wieers d1f6ff646a aci_iplpg: Support missing aep (#48001)
* aci_iplpg: Support missing aep
6 years ago
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
6 years ago
Felix Fontein 2728a22f73 Add docker_prune module (#48063)
* Add docker_prune module.

* Fix spelling error.
6 years ago
Pilou 6f8ffeb6bf tower{job,workflow}_template: use same retries value (#47865) 6 years ago
Dag Wieers 2c0707c034
Add missing MSC support
This was missing from PR #46116
6 years ago
Felix Fontein 8eb656de8b Fixing idempotency test. (#48038) 6 years ago
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.
6 years ago
Felix Fontein 569ec812e7 Improve paused test and behavior. (#48056) 6 years ago
Felix Fontein af79adca1d Make tests fail less often with strange errors. (#48059) 6 years ago
Felix Fontein 35809e99bc docker_container: fix ipc_mode and pid_mode idempotency (#47997)
* Fix ipc_mode and pid_mode idempotency when container names are used.

* Add changelog.

* Update pid_mode documentation.
6 years ago
Felix Fontein 3cca4185be docker_container: simplify minimal required version per option handling (#47711)
* 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.
6 years ago
Dag Wieers 6a37582158
msc_role: Manage roles on ACI MultiSite (#47757)
This includes the new msc_role module and integration tests.
6 years ago
Dag Wieers 1ac40e21b4
msc_site: Manage sites on ACI MultiSite (#47756)
This includes the new msc_site module and integration tests.
6 years ago
Dag Wieers e97ad60f3b
msc_tenant: Manage tenants on ACI MultiSite (#47755)
This includes the new msc_tenant module and integration tests.
6 years ago
Dag Wieers 7142715b15
msc_user: Manage users on ACI MultiSite (#47754)
This includes the new msc_user module and integration tests.
6 years ago
Dag Wieers 67aa98c30f
msc_label: Manage label on ACI MultiSite (#47753)
This includes the new msc_label module and integration tests.
6 years ago
Christian Kotte 754c377dbd VMware: Improve output of vmware_local_role_facts (#47871) 6 years ago
saichint b92556549e Add new configurations for nxos_vxlan_vtep (#47834)
* add new commands for vxlan

* review comments

* fix unit test

* fix sanity yaml spaces
6 years ago
Stephan Müller 00bab2d24d [docker_network] add ipv6 support (#47492)
* [docker_network] add ipv6 support

* docker_network: review ipam_options

* docker_network: fix requirements

* docker_network: fix deprecation notice

* docker_network: add minimum docker version change

* docker_network: remove trailing whitespace

* docker_network: revert rename of network_four #discussion_r228707101

* docker_network: refactor IPAM config comparison #discussion_r228707255, #discussion_r228707280

* docker_network: correct spelling of IPv4 and IPv6 #discussion_r228707114, #discussion_r228707138

* docker_network: manually remove networks #discussion_r228709051

* docker_network: refactor enable_ipv6 condition #discussion_r228707317

* docker_network: add mutually_exclusive #discussion_r228707185

* docker_network: fix iprange #discussion_r228709072

* docker_network: add auxiliary addresses in examples and tests

* docker_network: link to docker docs #discussion_r228707018

* docker_network: remove list default #discussion_r228707060, #discussion_r228709091

* docker_network: introduce params syntax for create_network() #discussion_r228709031

* docker_network: beautify code

* docker_network: resolve change requests

* docker_network: add yaml header

* docker_networking: fix get_ip_version

* docker_network: extend CIDR test

* docker_network: use backported unittest2 for python 2.6

* docker_network: migrate unittest to pytest
6 years ago
Akshay Gaikwad 80ca779aa7 Support for device read write limit parameters (#47814)
* 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
6 years ago
Jordan Borean f0535bac80 dnf yum: fix tests running on Fedora 29 (#47910)
* dnf yum: fix tests running on Fedora 29

* wrap in always block
6 years ago
Tomas Tomecek 23becece53 Implement connection plugin for podman (#47519)
* new connection plugin: podman

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* podman,conn: utilize remote_user to run commands

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* podman connection: update docs

Co-Authored-By: TomasTomecek <ttomecek@redhat.com>
6 years ago
Thierry Bouvet 87de2dde9f Fix advertise addr (#47608)
* Fix issue #46326

* Update example to create a default swarm
6 years ago
Felix Fontein 65768b996d docker_container: fix paused and add some tests (#47900)
* 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.
6 years ago
René Moser 242bd512d0
cs_ip_address: fix vpc and network mutually exclusive (#47846)
* cs_ip_address: fix vpc and network mutually exclusive

* add changelog

* streamline docs
6 years ago
James Cassell 8eacaf6a77 command modules: optional stdin_add_newline (#45170)
* stdin_add_newline: allow newline suppression on command modules

* command/shell: test for stdin_add_newline

* changelog for stdin_add_newline
6 years ago
Nilashish Chakraborty baae7fa9ba
Fix ios_user not able to handle certain scenario (#47656)
* added support for users with password(not secret) configs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Added example

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix typo

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix pep8

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add integration tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
6 years ago
Mike Wiebe c53e3ca8e9 Add force disruptive option (#47694)
* Use expect module to copy files

* Add force option for disruptive upgrades

* Revert changes to copy_kick_system_images.yaml
6 years ago
Paul Harvey cd75074fc5 fix yum proxy regex (closes #47797) (#47800)
* 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
6 years ago
Martin Krizek 4b8f2c99d2
yum: fix 'package == version' syntax (#47744) 6 years ago
Abhijeet Kasurde b32b4111b2
plugin_filter: check for type error (#46664)
* 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>
6 years ago
Christian Kotte e0f7a522a3 VMware: Improve module vmware_host_vmnic_facts (#47278)
* fix "AttributeError: 'NoneType' object has no attribute 'nicDevice'"
* add vmnic_details output (speed, duplex, vendor, mac, etc. pp.)
* add NIC capabilities, DirectPath I/O, and SR-IOV information output
* add num_vmnics
6 years ago
Christian Kotte 6ebd20bf22 VMware: New module: vmware_host_vmhba_facts (#47502) 6 years ago
Felix Fontein 2dab10f1ec docker_network: adding/updating tests (#47775)
* Add substring test (fixes #32927).

* Extend idempotency tests (fixes #32580).
6 years ago
Dave Bendit 6ca88ab75d docker_network: Adding basic integration test for overlay network (#47772)
Fixes #19271
6 years ago
Dag Wieers 3e890bdbaa
Initial import of MSC module_utils (#46116)
This is required for upcoming MSC modules.
6 years ago
Simon 893c0dbba7 New facts module: Memset server products (#42386)
* 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
6 years ago
Simon 2d6c01005d New facts module: Memset Memstore (#42387)
* 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
6 years ago
codylane d3fe6c01f2 Addresses comments in #38971 (#44324)
* 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"
6 years ago
Dario Zanzico 2162d7d4de Docker swarm service integration tests (#45674)
* 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
6 years ago
Zim Kalinowski 7c11c67156
adding enable_rbac option in aks (#47730)
* adding enable_rbac option in aks

* fixes

* addressed comments
6 years ago
Christian Kotte d052618838 VMware: Add check mode support in vmware_vswitch_facts (#47263)
* Check mode support
* Fixed num_ports
6 years ago
Christian Kotte c779ef5313 VMware: New module: vmware_host_hyperthreading (#46750) 6 years ago
John Hu 82f1438b14 Add docker_config module (#38792)
* Add docker_config module

* Address review comments

* Merge description lines

* Stop returning empty config_id in results

* Add integration tests for docker_config

Based on docker_secret's tests.

* Ensure swarm using docker_swarm module

* Add minimum docker / docker api version requirements

ref: https://github.com/ansible/ansible/pull/47046

* Check Docker API version before running tests

ref: https://github.com/ansible/ansible/pull/47340

* Typo

* Wording

* Improve example

* Assert state == absent is idempotent
6 years ago
s3lph 5b1c68579d Type error in openssl_certificate (#47508)
* 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
6 years ago
Felix Fontein f19ab56eb4 docker_image, docker_image_facts, docker_volume: add basic integration tests (#47383)
* 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).
6 years ago
Matt Martz 10e129e2e9 Detect the socket path after starting the service. Fixes #47582 6 years ago
Zim Kalinowski 1724b633f2
adding subnet service endpoints (#47549)
adding subnet service endpoints
6 years ago
Zim Kalinowski 5193e31886
adding mysql firewall rule facts (#47342)
* adding mysql firewall rule facts

* fixes
6 years ago
Zim Kalinowski 9b2465e7ad
added missing stuff to aliases (#47458) 6 years ago
Yunge Zhu 1587bb9f65
fix webapp test (#47546) 6 years ago
Toshio Kuratomi 748ea39ecd Fix mysql authentication errors
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.
6 years ago
lolcube eb7f6a5e62 Add openssh_keypair module (#46436)
* add openssh_keypair module
6 years ago
Akshay Gaikwad 20b95adf2b Add Support of healthcheck in docker_container module (#46772)
* 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>
6 years ago
Dag Wieers 691ff4b9e6 WinRM/PSRP: Ensure shell returns UTF-8 output (#47404)
* 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
6 years ago
Jordan Borean f28b7c7ab1
psrp - fix unicode handling in Python 2 (#47461)
* psrp - fix unicode handling in Python 2

* skip psrp become test when on Server 2008
6 years ago
Matt Martz f6ecdf0b87
Handle sets differently than lists in wrap_var. Fixes #47372 (#47510) 6 years ago
Matt Martz d5e4f37ca0
Ensure we don't overwrite roles from include/import_role when loading the play (#47512)
* Ensure we don't overwrite roles from include/import_role when loading the play. Fixes #47454

* Add changelog fragment
6 years ago
Felix Fontein 3afdb28209 docker_container: fix interaction of detach:no with auto_remove:yes (#47396)
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.

* Add tests.

* Added changelog.
6 years ago
Dave Bendit 29b4b36501 Adding "internal" option to "docker_network" module (#35370)
Fixes #27065
6 years ago
Toshio Kuratomi ccabc2bff5 Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
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
6 years ago
Zhikang Zhang b697da39c8 Fix problem where pip module cannot accept multiple extras
PR #46937
Fixes #46519
6 years ago
Martin Krizek a0aa53d1a1 user: do not pass ssh_key_passphrase on cmdline
CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Matt Martz c58de75f38 Handle sets differently than lists in wrap_var. Fixes #47372 6 years ago
Pablo 6497049f2a Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler

Fix #47287
6 years ago
Christian Kotte c50a69c2eb VMware: New module vmware_host_powermgmt_policy (#46688)
* 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>
6 years ago
Christian Kotte cd988f645a VMware: New module vmware_host_ipv6 (#47275)
* New module vmware_host_ipv6
* Minor changes

Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Christian Kotte ea42ec7e90 VMware: Improve module vcenter folder (#46497)
* 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
6 years ago
Christian Kotte dc2eb05491 VMware: Add check mode support to vmware_vmkernel_facts (#47286) 6 years ago
Anil Kumar Muraleedharan 0f943f7584 Adding full list of supported devices (#46949) 6 years ago
Pluggi f13091d142 Add runtime option to docker_container module (#47247)
* 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>
6 years ago
Felix Fontein 131efcff9d docker_network: add basic integration tests (#46137)
* Adding very basic integration tests for docker_network.

* Fixing some details (review comments).
6 years ago
Zim Kalinowski b0c88ddab1
Adding postgresql firewall rule facts (#45078)
* adding postgresql firewall rule facts

* fixed sanity

* fixed sanity

* updating tests

* firewall rule facts updated

* fixed test

* fix crash

* small updates

* updated postgresql firewall rule

* removed unnecessary type

* fixed postgresql facts

* fixed azure

* one more fix

* test fixes

* fix class name
6 years ago
Felix Fontein d2f524fb27 Use {{ ansible_python.executable }} instead of python in integration tests. (#47340) 6 years ago
Jordan Borean e6a327fb82
ansible-test: add retry for Windows httptester download (#47334) 6 years ago
Jordan Borean c0546b4133
win httptester: add wait for endpoint in case it is still coming up (#47326) 6 years ago
Claude Dioudonnat 1a51b08875 Fix increase fake disk size for filesytem's tests 6 years ago
Pierre-Louis Bonicoli e016af3cc6 filesystem tests: enable LVM
Co-authored-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
6 years ago
Martin Krizek 541255a2d8
Do not strip new lines in native jinja (#46751)
* Do not strip new lines in native jinja

* Add changelog/fragment
6 years ago
Matt Martz 77d32b8f57
Don't use the task for a cache, return a special cache var (#47243)
* Don't use task to cache loop results, use hostvars. Fixes #47207

* Avoid a race condition, supply _ansible_loop_cache through get_vars directly

* Add tests

* Add changelog fragment

* Remove unnecessary copy

* Remove unnecessary host from _get_delegated_vars signature
6 years ago
Matt Clay f74f7b0373
Add constraint for requests on python 2.6. (#47306)
* Add constraint for requests on python 2.6.
* Use constraints in lookup_hashi_vault test.
6 years ago
Matt Clay 14da4d66f2 Add constraints to pip install in setup_docker. 6 years ago
Ryan Brown 18a088c64e
GCP MagicModules bug fixes (#47285)
Closes: #46930 #46929 #46928 #46927 #46926 #46925 #46924 #46923 #46922 #46921 #46920 #46919 #46918 #46917 #46916 #46915 #46914 #46913 #46912 #46911 #46910 #46909 #46908 #46907 #46906 #46905 #46903 #46902 #46901 #46900 #46899 #46898 #46897 #46896 #46895 #46894 #46893 #46892 #46891 #46890 #46889 #46888 #46887 #46886 #46885 #46884 #46883 #46882 #46881 #46880 #46879 #46878 #46877 #46876 #46875 #46874 #46873 #46872 #46871 #46870 #46869 #46868 #46867 #46866 #46865 #46864 #46863 #46862 #46861 #46860 #46859 #46858 #46857 #46856 #46855 #46854 #46853 #46852
6 years ago
flowerysong 0fc639e755 ec2_tag: Fix removing tags without specifying a value (#47228) 6 years ago
Alex Stephen 3f629c426c New GCP Module: gcp_compute_region_disk (#46886) 6 years ago
Pierre-Louis Bonicoli 7231f7da84 test-module: check availability of special attrs 6 years ago
Jordan Borean 5d2927c9a0
test: filesystem update note on test comment (#47260) 6 years ago
Shuang Wang 0c6513e9b1 add module aws_codecommit to represent AWS CodeCommit (#46161)
* 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.
6 years ago
Jordan Borean ae5aeb9a67
filesystem: fix test to work on newer Fedora (#47176) 6 years ago
Jordan Borean 6666b070a9
openss: fix various test and Python 3 issues (#47188) 6 years ago
Matt Clay 1947d903cd Mark azure_rm_{appserviceplan,webapp} unstable. 6 years ago
Aaron 9c08ff7a94 [aws] New module: iam_password_policy (#36200)
* 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
6 years ago
Jordan Borean dd46f953f6
postgresql_user: fix test errors on newer Fedora versions (#47166) 6 years ago
Jordan Borean f720499337
gem: fix tests to work on newer Fedora hosts (#47158) 6 years ago
Matt Clay d048785640 Update requirements for urllib3 for python 2.6. 6 years ago
Jordan Borean 9ba33f6ac1
test: openssl 1.1.x compatibility (#47112) 6 years ago
Matt Martz 02f4d0a57f
Ensure that an empty literal list with loop skips the task (#47129) 6 years ago
Matt Hoffman acbecd5f23 adds redirect configurations and probes to azure_rm_appgateway (#46607) 6 years ago
jctanner 1ded3f9890
Handle non-ascii characters in foreman.py (#46779)
* Handle non-ascii characters in foreman.py

* Add test to validate non-ascii results
6 years ago
Zim Kalinowski 1c520ff70b adding postgresql firewall rule (#45077)
* adding postgresql firewall rule

* fixed test problems

* add state into the doc

* use lropoller

* updated samples and some naming
6 years ago
Zim Kalinowski ca5460dd86 Adding mysql firewall rule module (#45074)
* adding mysql firewall rule

* fixed mysql firewall rule

* use mgmtclient from common

* fix pep8

* small updates

* minor docs fix
6 years ago
jctanner 0b15ad00c1
Add a test target for the foreman inventory script (#46837)
Add a test target for the foreman inventory script
6 years ago
Jordan Borean 6e2897647c
win test: add http tester container to Windows tests (#46606) 6 years ago
Matt Martz a06a5ded61
Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833) 6 years ago
Nathaniel Case e9a7a741f8
Add missing connection param to test (#46831) 6 years ago
Christian Kotte ade5d938c3 VMware: Improve module vmware_host_config_manager (#46264)
* Improve module description
* Add check mode support and change message
6 years ago
Will Thames b772485d97 Ensure that k8s_facts always returns resources key (#46733)
Fix bug returning `items` key if NotFound exception is hit
6 years ago
Jordan Borean 0f5331645f
ansible-test: add skip/windows/... alias to skip tests on specific Windows versions (#46845)
* 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
6 years ago
cahlchang 1cce11b39c [AWS] Support check mode in aws ec2_instance module (#46774)
* fix checkmode

* Added checking test to existing test playbook

* Added test for check mode
6 years ago
Adam Miller fd97c8e56c
fix yum proxy username/password handling (#46291)
Fixes #46249

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Shuang Wang cd1faca6e0 copy - support recursive copying with remote_src (#43998)
* Allow copy module to work with recursive and remote_src #14131
6 years ago
Adam Miller fb6e91bf98
yum module properly check for None config_file (#46641)
* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Anil Kumar Muraleedharan d0e89bc1bb Lenovo finetune modules (#46623)
* 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
6 years ago
Christian Kotte 2230f40041 VMware: Add check mode support to module vmware_host_firewall_manager (#46266) 6 years ago
Christian Kotte 0bc2e6795d VMware: Gather extended datastore facts (#46546)
* Add datacenter_name alias
* Add check mode support
* Add extended datastore information
6 years ago
Adam Miller ad405fc21e yum module handle list optional empty strings properly (#46634)
Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca 8743e6ae2e remove default from delegate_facts to inherit (#45492)
* remove default from delegate_facts to inherit

fixes #45456

* test delegate_facts

* added note about inheritance and defaults

* yamllint
6 years ago
Jordan Borean f34f75be45
win_uri: use variable for httpbin host (#46734) 6 years ago
Pilou 955579cd72 rabbitmq_user: 'node' parameter: add default value (#38156)
* 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.
6 years ago
Evgeni Golov 7c66c90afc introduce `module_utils.urls.fetch_file` as a wrapper to download and save files (#19172)
* 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
6 years ago
Felix Fontein a74774488d docker_container: add port range and IPv6 support for published_ports (#46596)
* Allow port ranges.

* Adding IPv6 support for published_ports.

* Die when hostname is passed instead of IP address.

* Added changelog.
6 years ago
Christian Kotte ccfa6ff011 VMware: Add check mode support to module vmware_host_ntp (#46268) 6 years ago
Christian Kotte c4cfeb183f VMware: Add check mode support to module vmware_host_service_manager (#46271) 6 years ago
Felix Fontein 77127d6768 docker_container: allow more mount modes for volumes (#46598)
* Being more strict about volume mount modes.
6 years ago
Abhijeet Kasurde 513be8923d
VMware: new module vmware_host_feature_facts (#45966)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 8afe46dc02 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.
6 years ago
Jordan Borean bc6d441cf2
Win chocolatey facts module (#46610)
* add module win_chocolatey_facts

* rename example name

* fix ansible-test errors

* add integration tests

* fix integration test

* implementation of improvement proposals

* implementation feedback

* implementation feedback

* fix trailing-whitespace

* implementation feedback

* fix version

* fix lint

* add test targets

* Updated modules docs and tests

Co-authored-by: Simon Baerlocher <sbaerlocher@users.noreply.github.com>
6 years ago
flowerysong be05069c61 Port the sns module to boto3 (#45634)
* Port sns to boto3

* Exception handling for ARN lookup

* sns: Add integration tests
6 years ago
Christian Kotte 5cd1ba3477 VMware: Add check mode support to module vmware_host_dns_facts (#46530) 6 years ago
Felix Fontein a520ca3298 docker_container, docker_image_facts: allow to use image IDs (#46324)
* 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.
6 years ago
Will Thames aec263df8a Add test suite for ec2_vpc_igw before boto3 upgrade (#45903) 6 years ago
tstoner ae363da5f5 Purging logging configuration before running playbook (#46302) 6 years ago
Matt Clay e2b6047514
Add symlinks sanity test. (#46467)
* 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.
6 years ago
Christian Kotte a4961ff32a VMware: Add check mode support to module vmware_host_firewall_facts (#46265) 6 years ago
Christian Kotte ab26119637 VMware: Add check mode support to module vmware_host_acceptance (#46260)
* Improve module description
* Add check mode support
6 years ago
John Imison c4cfa387ea Lookup plugin for rabbitmq (#44070)
* 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.
6 years ago
Sam Doran b74279d14c Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog
6 years ago
Jordan Borean 1de88cbaa9
win_chocolatey: remove test packages after tests are run (#46431) 6 years ago
Christian Kotte 1589424c3e VMware: Add check mode support in vmware_host_config_facts (#46272) 6 years ago
Jordan Borean e972287c35 win_exec: refactor PS exec runner (#45334)
* 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
6 years ago
Matt Clay 33b34f5c82 Rebalance shippable/posix/ CI groups. 6 years ago
Jordan Borean c20433e5e4 remove comments from multiplle yaml string that breaks tests for now 6 years ago
Pilou b76c4c840e WIP: Check that union Jinja filter can be chained (#46298)
* 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'"
}
6 years ago
Remo Wenger 83e584577a docker_container: ambiguous parameter "stop_timeout" (#43874)
* 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.
6 years ago
Sam Doran 8b1ae30e2e
Use bytes rather than native string for result (#46281)
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.
6 years ago
Dag Wieers 84437855c9 Add integration tests
By checking the cmd result with the original we cause these tests to
fail on older releases without this PR.
6 years ago
Metzger, Simon 00d78d7ef3 added period in description. Changed integration test to work correctly. 6 years ago
Metzger, Simon 285af0b6fb added parameter leaf_port_blk_description in module and integration tests 6 years ago
Metzger, Simon be2c73ac18 be compliant to pep8 and pylint. Added integration tests. 6 years ago
Felix Fontein 84682464c7 docker_container: allow to configure comparison for existing containers (#44789)
* Added comparison configuration.

* Improving user feedback on specifying a wrong option.

* Avoid bare except.

* Added basic integration tests.

* Adding wildcard support.

* Warn if ignore_image=yes is overridden.

* Added changelog fragment.
6 years ago
Matt Clay 04ddadd89b Move module tests using TQM to integration tests. 6 years ago
Felix Fontein a727a1ee67 [aws] route53 module: fix idempotency for CAA records (#46049)
* Fixing record order for CAA records to properly handle idempotency.

* Add integration tests that reproduce CAA failure
6 years ago
Kevin Subileau ac9d506a61 win_nssm: tests and several bug fixes (#44755)
* 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
6 years ago
Yunge Zhu 69594c5370 add azure_rm_cdnprofile and azure_rm_cdnprofile_facts (#45097)
* add cdn profile with facts

* fix merge issue

* fix version

* fix lint

* move cdn client out of azure_rm_common

* fix lint

* fix helper

* fix code bug

* fix bug

* fix import

* fix typo

* fix test
6 years ago
tstoner b427499e3e Added feature facts to nxos_facts (#45934)
* 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 ,
6 years ago
Jordan Borean 40379b76b1
skip installing linux-image-extra in CI as it shouldn't be needed (#46101) 6 years ago
Dan f20938788a fixed nxos_aaa_server_host issue with type 7 encrypt key (#46015)
* fixed nxos_aaa_server_host issue with type 7 encrypt and added test cases

* added idempotence tests
6 years ago
Dan a6c20488d3 Add ospf net type (#45904)
* Added ospf network type option to nxos_interface_ospf module

* Added documentation and example for the 'network' parameter

* adding version
6 years ago
tstoner e74e8b8e75 Additional feature enhancements to nxos_logging (#45844)
* 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
6 years ago
Jordan Borean e26861435f
async tests: add stability (#46100) 6 years ago
Felix Fontein 7caf70db42 docker_container: fix various idempotency problems and non-working options (#45905)
* 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.
6 years ago
Abhijeet Kasurde 905acd7c9e
VMware: vmware_inventory contrib testing (#42879)
* VMware: vmware_inventory contrib testing
* Use python.py to run inventory script during test.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Sloane Hertel 18dc928e28
Fix and re-enable sts_assume_role integration tests (#46026)
* Fix the STS assume role error message assertion when the role to assume does not exist.
6 years ago
Matt Clay 7d8f1a7aae Disable failing sts_assume_role integration test. 6 years ago
Matt Clay 339d22a2bd
Improve stability of Docker integration tests. (#46005) 6 years ago
tstoner 216da1c475 Changed when condition from checking image version to checking keys being (#45943)
defined
6 years ago
Jordan Borean 27c10fa502
add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording
6 years ago
Jordan Borean 198423d6fb
powershell: do not quote join_path result to reflect ShellBase join_path (#45944) 6 years ago
Andrew Gaffney acac001742 Add number of skipped tasks to play recap in 'default' callback (#45797) 6 years ago
Jordan Borean 5c73d4f4bd
async: use async_dir for the async results file directory (#45461)
* 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
6 years ago
Zim Kalinowski 83645963fb Fixing assigning ssl certificate to http listener in app gateway (#45830)
* fixed ssl certificate reference

* modified test
6 years ago
Zim Kalinowski 16fa49a894 adding os disk name (#45126)
* adding os disk name

* fixed test
6 years ago
Daniel Speichert d34cf93f1a Migrate from MySQLdb to PyMySQL (#40123)
* Migrate from MySQLdb to PyMySQL

* Deduplicate driver loading and failure message

* Explain requirements

* Apply requirements docs change to proxysql too

* Add changelog
6 years ago
Pilou 60160c1e90 doc: exercising module code locally: update cmd (#45697)
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'
6 years ago
Felix Fontein 6e04a1dbdc integration tests for docker_container (#45747)
* First round of integration tests for docker_container.

* Added regression test for #45700.

* Work around dict order randomization.
6 years ago
Matt Clay 846ee7e85f Fix issues with docker_stack test:
- 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.
6 years ago
Julien PRIGENT 6059246093 EFS - add support for new Provisioned Throughput (#43253)
* 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
6 years ago
Matt Clay 06e2e0e040 Change group on docker_stack test.
This should provide a temporary fix for conflicts with the docker_swarm test.
6 years ago
Dario Zanzico 54c3d1c24e New module: add docker_stack module (clound/docker/docker_stack) (#24588)
* add docker_stack module + tests
6 years ago
Will Thames d2569a3f7d Improve iam_group exception handling (#45599)
* 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
6 years ago
Sloane Hertel d7ca3f2bd3 ec2_group: fix regression for targets that are a list containing strings and lists (#45594)
* 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.
6 years ago
David Passante 05328ebf21 Cloudstack: fix support for some VPC service capabilities (#45727)
* 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
6 years ago
Pilou 9984c0fd40 hashi_vault lookup: add integration tests (#44814)
* hashi_vault lookup: add integration tests

* hashi_vault lookup tests: use ansible-ci-files
6 years ago
Zim Kalinowski df768914a1 adding sql firewall rule facts (#45059) 6 years ago
Jordan Borean d81249994e
win_script: add support for become and centralise exec wrapper builder (#45582)
* 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
6 years ago
Anil Kumar Muraleedharan ac58c36ad0 Lenovo cli bugfixes (#45278)
* 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
6 years ago
Dag Wieers cbf2c2a000 Fix integration tests (#43847)
I doubt this is the correct test, but until we have this fixed/improved
at least this works fine.
6 years ago
Zim Kalinowski 111febe62e extended vmss facts (#45535) 6 years ago
Deepak Agrawal 81214409cf
asa_config/ios_config: diff strict does not work with multiple parents (#45150)
* 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
6 years ago
Matt Martz 5785de582f
Fix logic to not re-download existing files when force=no (#45495)
* Fix logic to not re-download existing files when force=no. Fixes #45491

* Reduce logic complexity
6 years ago
David Rodríguez 600c7ac108 Fix remote checksums when paths have leading dots (#45287)
* Fix remote checksums with paths have leading dots

* Fix result recorded from the wrong file

* Add changelog fragment
6 years ago
Yuwei Zhou fa04387550 fix the autoscale resource id (#45477)
* fix the autoscale resource id

* Update main.yml
6 years ago
Zim Kalinowski 8a221d81dd fixing facts for mysql server (#45374) 6 years ago
Jordan Borean 01398f61d5
Win deprecate 2.8 (#45473)
* Remove deprecated/expired functionality

* win:_msi: Remove the win_msi module

* removed some missed deprecated return options and added porting guide reference

Co-authored-by: dagwieers <dagwieers@users.noreply.github.com>
6 years ago
Jordan Borean ec6d82435f
win_scheduled_task: add deprecation warning for repetition format (#45468)
* win_scheduled_task: add deprecation warning for repetition format

* fixed up sanity issues
6 years ago
Jordan Borean 881f3a599c
windows testing - changes to accomodate future behaviour changes (#45464) 6 years ago
Zim Kalinowski 0b029d6792 adding tags support to postgresql (#45339) 6 years ago
Jordan Borean d4ce1b9f31
fix Ansible.ModuleUtils.FileUtil to respect ErrorAction if running in a try/catch (#45451) 6 years ago
Jordan Borean c9c141fb6a
win_say - fix up syntax and test issues (#45450) 6 years ago