Commit graph

3948 commits

Author SHA1 Message Date
Tad Merchant
b538e34a32 Ecs service add features (#50059)
* Support UpdateService forceNewDeployment in ecs_service module

* Fixes for review

* Add force_new_deployment option to ecs_service.py

cherrypicks changes from via/ansible
Adds tests for pull request #42518
fixes backwards compatability with boto<1.8.4

* WIP commit so I don't have to stash

* WIP commit for healthcheck grace period

* WIP commit; ecs_module handles service registries

* Fix bad check for desired_count

* Add scheduling strategy test, comment out service registry test

* Fix names in ecs_cluster role main task.

* move full test run back to the end

* Change botocore version for full test to support scheduling strategy

* fix bug with desired_count==0 in amazon/ecs_service

* Fix changed checking for scheduling strategy DAEMON in ecs_service

* Pass testS

* Fix some unhelpful comments

* Add changelog for ecs_service
2019-02-27 13:20:19 +10:00
Dag Wieers
8f671e6cff Squash redundant tasks (#52628)
This PR includes some changes to reduce the number of tasks.
2019-02-26 15:09:42 -05:00
Matt Clay
b713246f57 Reduce vcenter integration test boilerplate. 2019-02-26 11:29:21 -08:00
Felix Fontein
e017d94766 docker_swarm: extend tests (part I) (#53005)
* Restructure tests.

* Allow tests to work when ansible_default_ipv4.address is undefined.
2019-02-26 14:18:30 -05:00
Dag Wieers
076562e5c2
ACI: Various changes and doc updates (#52957)
* ACI: Various changes and doc updates

* Fix typos
2019-02-26 14:55:40 +01:00
Felix Fontein
bf3c291606 docker_swarm: add diff support (#52947)
* Add diff support to docker_swarm.

* Add changelog.

* Using diff mode for docker_swarm tests. This improves debugging, since the the module now outputs more information on *why* it did certain actions.
2019-02-26 11:57:02 +00:00
Zim Kalinowski
0b1cfa52e6
make artifacts conditional (#52975) 2019-02-26 17:12:15 +08:00
Jordan Borean
d55ddec923
Revert Clear failed state in always only if we did rescue (#52968)
* Revert "Clear failed state in always only if we did rescue (#52829)"

This reverts commit f135960fc2.

* Add tests for failed scenario

* Set failed task with EXPECTED FAILURE
2019-02-26 16:22:32 +10:00
Zim Kalinowski
344a81daec
Adding DTL VM facts (#52692) 2019-02-26 10:45:39 +08:00
Sloane Hertel
bee293f65e
Mark redshift tests as unstable because they are failing irregularly (#52941) 2019-02-25 17:37:53 -06:00
Jordan Borean
13f8f1481f
Ansible.Basic - Support a delegate type for option elements key (#52951) 2019-02-26 08:14:10 +10:00
Rémi REY
30b3ce0f81 Add aws_secret module for managing secretsmanager on AWS (#48486)
* Adding module for managing AWS Secrets Manager resources

* adding aws_secret lookup plugin

Also use the data returned by describe_secret everywhere.

* replace the explicit /root use by a temporary dir

* aws_secret: rework module

Reworked module to use a class avoiding using client and module in every
functions.

* Added support of "recovery_window" parameter to allow user to provide
recovery period.

* updated return value to be the api output providing more details about
  the secret.

* Fix Python 3 bug in tests if the role is not removed

* Add unsupported alias due to issue restricting resource for creating secrets
2019-02-25 14:27:33 -06:00
Matt Clay
52a8957b6e Revert "foreman: Use generic python in test run (#52544)"
Cannot use `python.py` with `-c`.

This reverts commit 2991c5d47c.
2019-02-25 12:16:23 -08:00
Andrey Klychkov
be75c79941 New module postgresql_query (#52555)
* New module postgresql_query

* New module postgresql_query: added tests

* New module postgresql_query: added path_to_script

* New module postgresql_query: fix doc

* New module postgresql_query: fix autocommit

* New module postgresql_query: added exception for centos6 tests

* New module postgresql_query: fixes

* New module postgresql_query: add psycopg2 check

* New module postgresql_query: add psycopg2 check, fix

* New module postgresql_query: add psycopg2 check, fix

* New module postgresql_query: add psycopg2 check, fix

* New module postgresql_query: fix a type
2019-02-25 14:08:04 +00:00
James E. King III
f2495ef0d3 Add ability to get vmware_guest_facts using vsphere schema output (#47446) 2019-02-25 06:03:40 -05:00
Abhijeet Kasurde
46d869e7bd VMware: new module: vmware_dvs_portgroup_facts (#45116)
* VMware: new module: vmware_dvs_portgroup_facts

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-25 05:47:09 -05:00
Abhijeet Kasurde
1a8332d2cd VMware: new module: vmware_guest_customization_facts (#38588)
This module gathers facts about customization specification created
for virtual machine.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-25 04:32:56 -05:00
Christian Kotte
2f44ac4edc VMware: Fix module vmware_host (#46225)
* Add folder_name alias

The parameter should be named folder_name instead of folder to be
consistent with the other parameters cluster_name and datacenter_name.

* Fix 'A specified parameter was not correct: cnxSpec' error

The play fails when re-connecting a host with the cnxSpec argument
defined.

Just remove the cnxSpec argument definition. It isn't necessary when
re-connecting an existing host in vCenter (6.5).

* Fix ESXi host add/remove/re-connect errors

An ESXi host cannot be added, removed, or re-connected under a folder.

ESXi hosts connected under a folder, instead of a cluster, have an
object type of ComputeResource instead of HostSystem and the HostSystem
object is the first entry in the host parameter list of the
ComputeResource object.

Separate between cluster and folder actions.
2019-02-25 14:08:33 +05:30
Jake Hill
e18d5ea8b3 VMware: Add support in VMWare modules for BIOS and instance UUID's (#44399)
* Add support for changing UUID type referenced
* Update all appropriate VMware modules to include UUID type
* Add integration test for filtering on instance UUID
2019-02-25 14:07:07 +05:30
Felix Fontein
a1ec307d43 docker_swarm: make labels work with older docker daemon versions (#52895)
* Make labels work with older docker daemon versions.

* Fix idempotence detection.

* Add changelog.
2019-02-25 08:16:09 +00:00
Dag Wieers
3d1dd0e599 Windows: Add backup parameter to modules (#50033)
* Windows: Add backup parameter to modules

This PR adds a backup infrastructure for modules.

* Fixes based on review feedback

* Various fixes to check-mode and backup

* Add integration tests

* Fix win_xml integration test

* Add backup support to copy action plugin

* Added integration tests

* Improve test efficiencies and other minor impv
2019-02-25 11:37:25 +10:00
Felix Fontein
81d58cfef6 docker_swarm: hopefully fix debug CI problems, and fix check mode (#52825)
* Let's see some debug output.

* Also check LocalNodeState.

* Improve tests.

* Actually implement check mode.

* Add changelog.

* Add pretty-printing and more output.
2019-02-23 17:18:17 -05:00
Piotr Wojciechowski
e2856127f6 Integration test for docker_node module (#52700)
* Integration test for docker_node module

* docker_node integration tests (check_mode and idempotency added)

* docker_node integration tests typos fix
2019-02-23 16:59:12 -05:00
René Moser
00003cbb7b
tests: cloudstack: wait longer for template to be ready (#52866) 2019-02-23 09:39:42 +01:00
Matt Clay
4ea96c151b Rebalance AWS integration tests in CI. 2019-02-22 21:56:29 -08:00
Matt Clay
05c303a39f Rebalance Azure tests in CI. 2019-02-22 20:59:18 -08:00
Fabian von Feilitzsch
52ec80fbe9 Add proper k8s *List kind support (#52529)
* Add proper k8s *List kind support

* set defaults more intelligently

* reimplement list support so that it will work in all versions of the client

* clean up debugging code
2019-02-23 12:10:42 +10:00
Kevin Breit
d65a91ea7e meraki_config_template - Fix actions when specifying net_id (#51586)
* Allow configuration templates when using net_id...for reals
- Didn't work before, I had bad code. I'm sorry.
- Cleaned up code and simplified functions
- Added integration tests to test for net_id actions

* Add changelog

* Add module name to changelog

* Fix indentation
2019-02-22 19:39:01 -05:00
Kevin Breit
cf7ffcedbf New module - meraki/meraki_syslog (#48814)
* Initial commit of meraki_syslog module
- Query or modify syslog settings in Meraki networks
- This has not yet been tested

* Module now supports creating new syslog servers
- Added integration test
- Still needs to add support for
  - Modification or removal of roles
  - Removal of syslog servers
  - Test to make sure servers are appended to existing

* Improvements to integration test
- Code hasn't been tested so it likely is broke somewhere
- Move to a block setup and always destroy network
- Create test network just for syslog server tests
- Current tests will test present functionality
- Absent state needs to be tested further

* Working version of meraki_syslog module
- There is no absent state since module overwrites server config
- Full integration tests

* Formatting fix

* Add some examples

* Fix sanity test errors

* Add type for all parameters
2019-02-22 17:22:37 -05:00
Sam Doran
f52a088862
Add option to ignore, warn, or error when a module parameter is converted to a string (#51404)
* Add new module property to Windows modules
* Add brief pause to file tests to ensure the stat times are not equal, which was happening sometimes.
* Raise TypeError on error rather than fail_json()
* Rework error message to be less verbose
* Add porting guide entry
2019-02-22 16:44:32 -05:00
Kevin Breit
df3b973cec Change assertion to variable (#52550) 2019-02-22 21:52:59 +01:00
Michael Eaton
c5e3c80800 VMware: New Module: vmware_host_scanhba (#51440) 2019-02-22 16:45:53 +05:30
Yunge Zhu
28dadc9e18
add application security group facts (#52629) 2019-02-22 16:11:24 +08:00
Yunge Zhu
d2297c50d2
add cdnendpoint facts module (#52631) 2019-02-22 13:51:38 +08:00
Jordan Borean
80652ad054
Suse add py3 package vars (#52794) 2019-02-22 15:23:37 +10:00
Abhijeet Kasurde
e41b98ffb5
VMware: Refactor guest inventory plugin (#52642)
* VMware: Refactor guest inventory plugin
* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-22 09:55:57 +05:30
Jordan Borean
17bfc60423
test - add setup target that creates the nobody user (#52750)
* test - add setup target that creates the nobody user

* do not set explicit gid/uid for nobody user

* Do no create group and only touch basic attributes
2019-02-22 14:04:10 +10:00
Jordan Borean
aab1f30906
group - fix explicit git scenario (#52769)
* group - fix explicit git scenario

* Use str for simplicity and remove changelog

* dynamically get gid and remove Jinja2 check
2019-02-22 12:40:42 +10:00
Jordan Borean
63c22f6eb0
test - add Python 3 package for OpenSUSE in setup_openssl (#52775) 2019-02-22 10:48:18 +10:00
Rafael Driutti
c68838fb13 AWS Redshift: port module to boto3 and fix parameters check (#37052)
* fix parameters check and port module to boto3

* begin with integration tests

* allow redshift iam policy

* Wait for cluster to be created before moving on to delete it

* Allow sts credentials so this can be run in CI

Don't log credentials

ensure cluster can be removed

* - Replace DIY waiters with boto3 waiters
- test multi node cluster

* catch specific boto3 error codes

* remove wait from test

* add missing alias for shippable

* - Rework modify function.
- Default unavailable parameters to none.
- Add cluster modify test

* Ensure resources are cleaned up if tests fail

* Ensure all botocore ClientError and BotoCoreError exceptions are handled
2019-02-21 17:04:42 -06:00
Jordan Borean
5e3e0eb946
fix filesystem tests on OpenSUSE 15+ (#52716) 2019-02-22 08:15:12 +10:00
Hannes Ljungberg
dd4b4aa941 docker_swarm_service: Add stop_grace_period option (#52519)
* Add stop_grace_period option

* Add changelog fragment

* Move doc type to last

* Add version_added
2019-02-21 20:12:13 +00:00
Abhijeet Kasurde
1b3cde353d osx_defaults: refactor (#52452)
* Code refactor
* Documentation update
* Add 'list' parameter
* Example update
* Testcase for osx_defaults

Fixes: #29329

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-21 14:37:16 +01:00
Hannes Ljungberg
da8574c567 docker_swarm_service: Allow passing period strings on relevant options (#52530)
* Allow duration to be passed as duration strings

* Remove whitespace

* Add changelog fragment

* Fix broken test

* Better error handling
2019-02-21 11:47:06 +00:00
Hannes Ljungberg
7276344f85 docker_swarm_service: Don’t remove service when networks change (#52634)
* Don’t remove service when networks change

* Add changelog fragment

* Some more network integration tests

* Add hannseman as author

* Remove return on self.client.fail
2019-02-21 11:46:50 +00:00
Yunge Zhu
55e9acb043 support application security group in network interface (#52450) 2019-02-21 17:23:09 +08:00
Piotr Wojciechowski
995c4bf02e Integration tests for docker_host_facts module (#52487)
* Integration tests for docker_host_facts

* Integration tests for docker_host_facts (update to cover #52432 fix)

* Integration tests for docker_host_facts updates after review

* Integration tests for docker_host_facts updates after review

* Integration tests for docker_host_facts updates after review

* Integration tests for docker_host_facts - adding comments and integrated test for all options combined together

* Integration tests for docker_host_facts - small code improvement

* Adjusting variable name
2019-02-21 00:21:59 -05:00
Zim Kalinowski
4292c33649 adding tags to azure_rm_sqldatabase (#52615)
* adding tags to sql database

* can't add version_added, so have to ignore sanity test

* removed ignore
2019-02-20 16:17:45 -08:00
Zim Kalinowski
20a96bcc4e dev test labs artifacts and virtual machine modules (#51462)
* dev test labs vm and artifacts

* fix sanity

* fixing sanity

* disable artifact test for now

* + vn update

* fix sanity

* fixed test issue

* one more merge update

* fixed assert
2019-02-20 16:02:09 -08:00
Anil Kumar Muraleedharan
c9fea2b74b Lenovo cnos lldp (#52568)
* To add new module cnos_lldp.
2019-02-20 17:30:09 -05:00
Zim Kalinowski
9d11cd311b adding vmss instance module (#51461)
* adding vmss instance

* fix indent

* fixing doc
2019-02-20 13:50:46 -08:00
The Magician
471b20bab3 New Module: gcp_cloudbuild_trigger (#52621) 2019-02-20 13:11:40 -05:00
Christian Kotte
bd0cad6ed7 Improve vmware_vmkernel module (#47270)
* update description and examples
* show updated settings
* add check mode support
* Remove unused option `vlan_id`
* add vDS support
* add TCP/IP stack support
2019-02-20 21:27:35 +05:30
René Moser
4b379745ca
tests: cloudscale_server: convert legacy to target tests (#52576) 2019-02-20 16:15:40 +01:00
Zim Kalinowski
d75f118b5e
Adding subnet facts (#52611) 2019-02-20 13:56:36 +08:00
Martin Krizek
be9f07279e Add stats on rescued/ignored tasks (#48418)
* Adding rescued/ignored tasks to stats gathering

Fixes #31245

* Amend integration tests to pass

* callback/dense.py: fix too-many-format-args

* Add changelog

* Amend counter_enabled and unixy callbacks

* Fix syntax error

* Fix typo in the changelog

* Remove not needed comment

* Re-add skipped

* Add test for rescued

* Fix colors...

* Fix unstable tests?

* Add a note to the porting guide

* Re-word the note in the porting guide

Fixes #20346
Fixes #24525
Fixes #14393

Co-authored-by: James Cammarata <jimi@sngx.net>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2019-02-20 13:00:47 +10:00
Zim Kalinowski
b1a9e7b8c8
adding dlt vn facts (#52552) 2019-02-20 10:45:47 +08:00
David Soper
63ea76d174 intersight_rest_api module and integration tests. (#52430)
* intersight_rest_api module and integration tests.
Fix intersight module_utils issues when using POST/PATCH/DELETE.

* Update json returns based on code review
2019-02-19 16:40:40 +01:00
Abhijeet Kasurde
24d1886499
template: add additional variable for dest path (#52015)
Signed-off-by: Dustin Spicuzza <dustin@virtualroadside.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-19 14:15:19 +05:30
Zim Kalinowski
fbf4e32b43
adding sqldatabase facts (#43324) 2019-02-19 13:09:53 +08:00
Zim Kalinowski
3316f00131 adding devtest labs facts (#52001) 2019-02-19 13:01:44 +08:00
Yunge Zhu
79f9fc415d add redis cache facts (#48652) 2019-02-19 12:43:23 +08:00
Jordan Borean
c312287731
test suse: get tests working on newer OpenSUSE distributions (#52539) 2019-02-19 13:20:08 +10:00
Jordan Borean
2991c5d47c
foreman: Use generic python in test run (#52544) 2019-02-19 13:19:54 +10:00
Zim Kalinowski
103b4c1d09 Adding cosmosdb account facts module (#51993) 2019-02-19 11:18:12 +08:00
Kevin Breit
a499244a53 New module - meraki/meraki_content_filtering (#51223)
* Initial commit
- Module mostly works but doesn't work for URL categories
- Additional tests should be added
- Documentation is needed
- Module is close to being complete

* Improved documentation
- Added parameter documentation
- Added examples

* Lint changes and bug fixes
- Fixed content filtering syntax bug per Meraki documentation update

* Change test cases so they work

* Remove duplicate key

* Improve documentation and check mode
2019-02-18 19:27:21 -05:00
Kevin Breit
ef2c00e106 Rename orgAccess parameter to org_access (#51347) 2019-02-18 19:27:11 -05:00
Kevin Breit
48128ec2fc meraki_ssid - Modifying SSID won't work when specifying number (#51645)
* Fix bug when specifying SSID by number
- Migrated integration test to blocks with always
- Minor URL fixes

(cherry picked from commit ed79c294f2e3f82d4828226004c055dcd7ce9f63)

* Create changelog file

* Add new line
2019-02-18 19:25:41 -05:00
Hannes Ljungberg
0bf9052e06 docker_swarm_service: Remove defaults (#52420)
* Remove update_parallelism default

* Remove update_delay default

* Add documentation about removing defaults

* Present porting guide changes as a list
2019-02-18 14:19:19 -05:00
Abhijeet Kasurde
e8b3adeb2b
VMware: add new module vmware_host_kernel_manager (#52503)
Signed-off-by: Aaron Longchamps <a.j.longchamps@gmail.com>
2019-02-18 21:57:49 +05:30
Felix Fontein
5b28cd65f0 luks_device: add integration tests (#52359)
* Add first version of luks_device tests.

* Do ~ expansion manually.

* Try to enable RHEL8.

* Adjust to older losetup version.

* Make sure cryptsetup is installed.
2019-02-18 17:16:57 +01:00
Matt Clay
687279c7bd Set user expires on FreeBSD using UTC. (#52276) 2019-02-18 09:59:13 -05:00
Hannes Ljungberg
c80ad43371 docker_swarm_service: Add working_dir option (#52425)
* Add working_dir option

* Check local mounts var to align with other checks

* Add changelog fragment

* Add trailing comma
2019-02-18 13:42:19 +00:00
Felix Fontein
37b0f5c81b docker: provide alternatives to ansible_facts results (#51192)
* Try to stop using ansible_facts for docker modules.

* Stop using facts returned from regular modules.
2019-02-18 13:41:34 +00:00
Hannes Ljungberg
64b12d2c0d docker_swarm_service: Add groups option (#52428)
* Add groups option

* Add changelog fragment

* Remove whitespace

* Remove whitespace
2019-02-18 13:12:05 +00:00
Jordan Borean
bb0a69e084
git: kill gpg-agent in tests on newer OpenSUSE hosts (#52476) 2019-02-18 21:30:31 +10:00
Hannes Ljungberg
18b968d486 docker_swarm_service: Add healthcheck option (#52419)
* Define yaml versions as strings

* Add healthcheck option

* Add changelog fragment

* Don’t set version_added as strings

* Use single quoted string

* Disable healthcheck tests on python 2.6

* Bring back quoting on already quoted version-added

* Python 2.6 compat

* Move functions to docker-common

* Move parse_healthcheck to docker-common

* Cast exception to str before printing failure

* Extend parse_healthcheck tests
2019-02-18 09:46:14 +00:00
Hannes Ljungberg
77d116f66e docker_swarm_service: Add stop_signal option (#52424)
* Add stop_signal option

* Add changelog fragment
2019-02-18 09:43:35 +00:00
Yuwei Zhou
664e6fb9c8 modified storageaccount fact return curated result with connection string (#49702) 2019-02-18 16:48:56 +08:00
Zim Kalinowski
896e320142
adding postgresqlconfiguration facts (#45071) 2019-02-18 15:14:56 +08:00
Zim Kalinowski
fa73abcf5d
fixing force_update in azure_rm_mysqldatabase (#52389) 2019-02-18 14:20:30 +08:00
Jordan Borean
3ecd6e19f7
alternatives - fix OpenSUSE dir on newer distros (#52458) 2019-02-18 16:07:01 +10:00
Zim Kalinowski
8422e23533
Fixing azure_rm_postgresqldatabase force_update parameter (#52388) 2019-02-18 14:04:01 +08:00
Jordan Borean
d6453a79f5
zypper_repository: fix return check on newer OpenSUSE versions (#52457) 2019-02-18 15:52:15 +10:00
Jordan Borean
4b296da6a2
zypper: fix tests to use new URL for OpenSUSE 15.0 (#52453) 2019-02-18 15:04:02 +10:00
Zim Kalinowski
777441719f
azure_rm_cosmosdbaccount - fix for virtual network rules (#52416) 2019-02-18 11:58:43 +08:00
Jordan Borean
4a94bd8d9d
opensuse - install password-store from specific repo (#52439) 2019-02-18 13:12:01 +10:00
Piotr Wojciechowski
e284a1546f Integration tests for docker_node_facts (#52423) 2019-02-17 12:08:29 -05:00
Piotr Wojciechowski
d27ac7a816 Integration tests for module docker_swarm_facts (#52208)
* * docker_swarm_facts integration tests

* * docker_swarm_facts integration tests

* * docker_swarm_facts integration tests

* Removing commented lines

* Extended and updated integration tests for docker_swarm_facts module

* Cosmetic integtration tests playbook changes

* Cosmetic integtration tests playbook changes from PR comments
2019-02-16 16:20:54 -05:00
Matt Clay
f5c92f6bc1
Allow setting resource.RLIMIT_NOFILE in modules (#51989) 2019-02-15 17:52:35 -08:00
saranyasridharan
1db6d5598a Adding custom module to get PID of the process (#50896) 2019-02-15 17:08:55 -08:00
Matt Clay
6ac22416af Fix tests to use ANSIBLE_TEST_PYTHON_INTERPRETER. 2019-02-15 11:24:07 -08:00
David Soper
958653e282 Cisco Intersight module_utils and intersight_facts module (#51309)
* Cisco Intersight module_utils and intersight_facts module

* Add RETURN information and fix pylint, import, and pep8 issues.

* Review updates for specifying type of params/returns and not polluting ansible_facts.

* BSD one line license, validate_certs used, urls.fetch_urls replaces requests
2019-02-15 16:32:29 +01:00
Andrey Klychkov
8e0f95951d Module postgresql_idx: added ci tests, new params, returned values, code refactoring (#52230)
* postgresql_idx: ci tests, refactoring, return values

* postgresql_idx: ci tests, new params, return values

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* postgresql_idx: ci tests, fix

* New module postgresql_table - fix tests

* New module postgresql_table - fix tests

* New module postgresql_table - fix tests

* New module postgresql_table - fix state choices order
2019-02-15 15:38:56 +01:00
Zim Kalinowski
2f3960558d
Fix for PostgresSQL server update and storage_mb (#51653) 2019-02-15 17:46:52 +08:00
Zim Kalinowski
1f5cda37b3
Fix for MySQL server update and storage_mb (#51661) 2019-02-15 17:33:21 +08:00
Jordan Borean
de118734e9
Ansible.Basic - add required_by to module spec (#51407)
* Ansible.Basic - add required_by to module spec

* fix typo in docs
2019-02-15 13:00:25 +10:00
René Moser
0cc23de776
cloudstack: test: ensure network is implemented (#52204)
In ACS 4.12, it is no longer possbile to acquire IPs to a (...) network
not already in implemented state.

With deployment of a VM instance, we enforce the implementation of the
network. Also see 323f791efc
2019-02-14 23:44:50 +01:00
Jordan Borean
7b8e814a10 Ansible.Basic: make module options case insensitive with dep warning (#51583)
* Ansible.Basic: make module options case insensitive with dep warning

* Add porting guide info
2019-02-13 21:55:43 -05:00
Matt Clay
7016559b1a Fix openssl_privatekey test on FreeBSD 12.0. 2019-02-13 18:34:45 -08:00
Yunge Zhu
bccf6d31bd add azure_applicationsecuritygroup module (#51214)
* add applicationsecurity group module

* fix lint
2019-02-13 19:34:44 -05:00
Adam Miller
ea0e2bf2b3 yum always return changes dict, not only in check mode (#51987)
Previously the yum module would provide a `changes` dict when
executed in check mode but omit it when not in check mode in favor
of the `results` data which is raw output from the yum command. This
pull request makes that output uniform.

Fixes #51724

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-02-13 17:46:32 -05:00
おすし
c2a409a9e0 Fix: Yum module does not use proxy when username is not set #51548 (#51994)
* add test of yum with proxy

* Properly handle unauthenticated yum proxy config

Fixes #51548

* shell executable is bash
2019-02-13 14:10:47 -05:00
Sam Doran
ad386290b4
Update command/shell docs with note about modules for rebooting(#51499)
- Update integration test syntax
2019-02-13 13:54:36 -05:00
Matt Martz
cdb53ff1a4
Restore behavior for detecting only localhost, and no limit match. Fixes #52152 (#52172)
* Restore behavior for detecting only localhost, and no limit match. Fixes #52152

* Add test for non-matching limit
2019-02-13 11:52:30 -06:00
Jordan Borean
847d089d6b Re-add support for setting shell from play context (#52139)
* Re-add support for setting shell from play context

* Add integration tests

* Add more tests for shell override

* fix sanity issue
2019-02-13 11:49:13 -06:00
Abhijeet Kasurde
32fce43311
hashi_vault: fix multiple spaces in params (#51524)
Fixes param parsing in hashi_vault

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-13 18:32:00 +05:30
Abhijeet Kasurde
22bddb434a
test for ipaddr filter (#52088)
based upon work of mscherer

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-13 16:53:43 +05:30
Pilou
51270be883 tower modules: check that 'verify_ssl' defined in ~/.tower_cli.cfg isn't ignored (#50687)
* Check that verify_ssl defined in tower_cli.cfg isn't ignored

* Avoid to override verify_ssl value defined in tower_cli.cfg

By default, tower-cli library enables SSL certificates check. But
verify_ssl false value defined in config files read by default by
tower-cli library (for example /etc/tower/tower_cli.cfg) was ignored
because overriden by the tower_verify_ssl parameter default value.

* fix a typo in comment
2019-02-13 10:26:43 +00:00
Straff
d4a07f9573 Added support for user-specified log file in win_package (#51104)
* Added support for user-specified log file in win_package - feature (#38353)

* added integration tests for win_package log_path support feature (#38353), and applied review feedback

* win_package log_path support feature (#38353) - fixed typo in win-package.py documentation

* win_package log_path support feature (#38353) - improved an integration test and better doc in win-package.py
2019-02-13 19:08:07 +10:00
Amol Kahat
563725ba98 Fixed typo from adress to address (#52143)
Signed-off-by: Amol Kahat <akahat@redhat.com>
2019-02-13 13:57:13 +05:30
Abhijeet Kasurde
928c4f08ca
Fix test case in vmware_guest (#52142)
Due to changes in https://github.com/ansible/ansible/pull/45412
vmware_guest testcase delete_vm failed. This patch will fix that testcase.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-13 10:28:03 +05:30
Will Thames
46fbcf08bc
aws_kms enhancements (#31960)
* Allow creation and deletion of keys (deletion just schedules for
  deletion, recreating an old key is just cancelling its deletion)
* Allow grants to be set, thus enabling encryption contexts to be
  used with keys
* Allow tags to be added and modified
* Add testing for KMS module
* Tidy up aws_kms module to latest standards
2019-02-13 13:06:58 +10:00
Wojciech Sciesinski
a431e802ed Add posibilities to run the integration tests for PowerShell < 5.0 (#50808)
* Add posibilities to run the integration tests for PowerShell < 5.0

* Update of tests - based at a review comments for #50612

* The correction of YAML structure
2019-02-12 15:51:03 -05:00
Wojciech Sciesinski
a7528cdd25 Update the NuGet package provider when needed (#50759)
* Update the NuGet package provider when needed

* Update NuGet provider conditionally
2019-02-12 12:22:22 -08:00
Andrew Gaffney
9c35f18dd6 Custom jinja Undefined class for handling nested undefined attributes (#51768)
This commit creates a custom Jinja2 Undefined class that returns
Undefined for any further accesses, rather than raising an exception
2019-02-12 15:04:00 -05:00
Abhijeet Kasurde
fab815fc3b
VMware: Handle duplicate VM names in vmware_vm_facts (#45412)
This fix changes facts returned from vmware_vm_facts to list of dict from
dict of dict.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-12 16:31:42 +05:30
Abhijeet Kasurde
5c992fcc3f
ansible-vault: handle utf-8 filename in vault (#50341)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-12 16:13:51 +05:30
Hannes Ljungberg
70d8f02db7 docker_swarm_service: Extend env and add env_files support (#51762)
* Extend env and add env_files support

* Python 2.6 compat

* Handle lists passed as string

* Add changelog fragment

* Use correct link formatting

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Fix typo

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Handle empty env and env_files values
2019-02-12 08:06:58 +00:00
Felix Fontein
09f78d2f6c ufw: allow to insert rules relative to first/last IPv4/IPv6 rules (#49796)
* Insert should have type int.

* Add insert_relative_to option.

* Add changelog.

* Add tests.

* Improve comment.
2019-02-12 08:05:14 +00:00
Jordan Borean
179cbb9891
win_dsc - return warning from DSC invocation (#51927) 2019-02-12 13:50:00 +10:00
Ari Stark
2f85d62989 Add state option to git_config module (#50578)
* Add state option to git_config module

State present/absent option works like --set/--unset option for 'git config'.

* Change git_config to avoid useless parameter passed to git command

When unsetting value, command was : git config --unset foo ''.
Now command is : git config --unset foo.

* Add some integration tests to git_config module

* Add missing aliases file

* Change set up method

Using git command seems to cause troubles on some OS : changing config
by changing '.gitconfig' file.

* Remove some distros from tests pool

Git is not installed or is out of date on these distros.

* Fix aliases to skip tests on centos6

* Refactor tests of the git_config module

* Add use case when state=absent and value is defined
2019-02-11 21:49:53 -05:00
Dag Wieers
031a1a5cc2 vsphere_file: New module to manage files on datastores (#48180) 2019-02-11 21:26:12 +01:00
Matt Martz
445ff39f94
Become plugins (#50991)
* [WIP] become plugins

Move from hardcoded method to plugins for ease of use, expansion and overrides
  - load into connection as it is going to be the main consumer
  - play_context will also use to keep backwards compat API
  - ensure shell is used to construct commands when needed
  - migrate settings remove from base config in favor of plugin specific configs
  - cleanup ansible-doc
  - add become plugin docs
  - remove deprecated sudo/su code and keywords
  - adjust become options for cli
  - set plugin options from context
  - ensure config defs are avaialbe before instance
  - refactored getting the shell plugin, fixed tests
     - changed into regex as they were string matching, which does not work with random string generation
     - explicitly set flags for play context tests
 - moved plugin loading up front
 - now loads for basedir also
 - allow pyc/o for non m modules
 - fixes to tests and some plugins
 - migrate to play objects fro play_context
 - simiplify gathering
 -  added utf8 headers
 - moved option setting
 - add fail msg to dzdo
 - use tuple for multiple options on fail/missing
 - fix relative plugin paths
 - shift from play context to play
 - all tasks already inherit this from play directly
 - remove obsolete 'set play'
 - correct environment handling
 - add wrap_exe option to pfexec
 - fix runas to noop
 - fixed setting play context
 - added password configs
 - removed required false
 - remove from doc building till they are ready

future development:
  - deal with 'enable' and 'runas' which are not 'command wrappers' but 'state flags' and currently hardcoded in diff subsystems

* cleanup

  remove callers to removed func
  removed --sudo cli doc refs
  remove runas become_exe
  ensure keyerorr on plugin
  also fix backwards compat, missing method is attributeerror, not ansible error
  get remote_user consistently
  ignore missing system_tmpdirs on plugin load
  correct config precedence
  add deprecation
  fix networking imports
  backwards compat for plugins using BECOME_METHODS

* Port become_plugins to context.CLIARGS

This is a work in progress:
* Stop passing options around everywhere as we can use context.CLIARGS
  instead

* Refactor make_become_commands as asked for by alikins

* Typo in comment fix

* Stop loading values from the cli in more than one place

Both play and play_context were saving default values from the cli
arguments directly.  This changes things so that the default values are
loaded into the play and then play_context takes them from there.

* Rename BECOME_PLUGIN_PATH to DEFAULT_BECOME_PLUGIN_PATH

As alikins said, all other plugin paths are named
DEFAULT_plugintype_PLUGIN_PATH.  If we're going to rename these, that
should be done all at one time rather than piecemeal.

* One to throw away

This is a set of hacks to get setting FieldAttribute defaults to command
line args to work.  It's not fully done yet.

After talking it over with sivel and jimi-c this should be done by
fixing FieldAttributeBase and _get_parent_attribute() calls to do the
right thing when there is a non-None default.

What we want to be able to do ideally is something like this:

class Base(FieldAttributeBase):
    _check_mode = FieldAttribute([..] default=lambda: context.CLIARGS['check'])

class Play(Base):
    # lambda so that we have a chance to parse the command line args
    # before we get here.  In the future we might be able to restructure
    # this so that the cli parsing code runs before these classes are
    # defined.

class Task(Base):
    pass

And still have a playbook like this function:

---
- hosts:
  tasks:
  - command: whoami
    check_mode: True

(The check_mode test that is added as a separate commit in this PR will
let you test variations on this case).

There's a few separate reasons that the code doesn't let us do this or
a non-ugly workaround for this as written right now.  The fix that
jimi-c, sivel, and I talked about may let us do this or it may still
require a workaround (but less ugly) (having one class that has the
FieldAttributes with default values and one class that inherits from
that but just overrides the FieldAttributes which now have defaults)

* Revert "One to throw away"

This reverts commit 23aa883cbed11429ef1be2a2d0ed18f83a3b8064.

* Set FieldAttr defaults directly from CLIARGS

* Remove dead code

* Move timeout directly to PlayContext, it's never needed on Play

* just for backwards compat, add a static version of BECOME_METHODS to constants

* Make the become attr on the connection public, since it's used outside of the connection

* Logic fix

* Nuke connection testing if it supports specific become methods

* Remove unused vars

* Address rebase issues

* Fix path encoding issue

* Remove unused import

* Various cleanups

* Restore network_cli check in _low_level_execute_command

* type improvements for cliargs_deferred_get and swap shallowcopy to default to False

* minor cleanups

* Allow the su plugin to work, since it doesn't define a prompt the same way

* Fix up ksu become plugin

* Only set prompt if build_become_command was called

* Add helper to assist connection plugins in knowing they need to wait for a prompt

* Fix tests and code expectations

* Doc updates

* Various additional minor cleanups

* Make doas functional

* Don't change connection signature, load become plugin from TaskExecutor

* Remove unused imports

* Add comment about setting the become plugin on the playcontext

* Fix up tests for recent changes

* Support 'Password:' natively for the doas plugin

* Make default prompts raw

* wording cleanups. ci_complete

* Remove unrelated changes

* Address spelling mistake

* Restore removed test, and udpate to use new functionality

* Add changelog fragment

* Don't hard fail in set_attributes_from_cli on missing CLI keys

* Remove unrelated change to loader

* Remove internal deprecated FieldAttributes now

* Emit deprecation warnings now
2019-02-11 11:27:44 -06:00
Jérôme BAROTIN
b99de25f32 Enable changed var with ufw check mode (#49948)
* Enable 'changed' var with ufw check mode

* Fix from comment of the PR + Unit Test

* Fix on ufw module after the second review

- delete rules change works in check mode
- simplify execute def & use it on every call process
- improved regexp
- rename vars defaults to current_default_values

* Add ignore error to execute() and use it in get_current_rules()

* Update after third code review (introduce change in changed status)

* Adjust tests and fix some problems (#1)

* 'active' also appears in 'inactive'.

* 'reject' is also a valid option here.

* For example for reloaded, changed will be set back to False here.

* Improve and adjust tests.

* Fix after merging integration test

* handle "disabled" on default routed

* Add /var/lib/ufw/.. rules files

* add unit test

* Fix pep8 formatting error

* Separate ipv6 and ipv4 rules process from checkmode

* fix non-ascii error on ci

* Some change after review

* Add unit test with sub network mask

* rename is_match function by is_starting

* add changelog fragment
2019-02-11 11:05:35 +00:00
Felix Fontein
9b1cbcf3a4 openssl_csr: ignore empty strings in altnames (#51473)
* Ignore empty strings in altnames.

* Add changelog.

* Add idempotence check without SAN.

* Fix bug in cryptography backend.
2019-02-11 10:30:56 +00:00
Hannes Ljungberg
153e996760 docker_swarm_service: Remove defaults (#51216)
* Drop descriptions of docker-py constraints <=3.0.0

* Properly indent documentation

* Clearer examples

* Spelling

* Fix example

* Revert "Drop descriptions of docker-py constraints <=3.0.0"

This reverts commit 8106215af62ae5880c3b748cec562a85f2247bdc.

# Conflicts:
#	lib/ansible/modules/cloud/docker/docker_swarm_service.py

* Add min versions for placement preferences

* Add endpoint_mode and publish to option_minimal_versions

* Restrict update max_failure_ratio and monitor versions

* Remove defaults and only pass required arguments

* Fix indentation

* Fix args documentation

* Fix replicas documentation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Add type to all documented options

* Add suboptions for mounts, secrets and configs

* Add suboptions to argument spec

* Remove redundant validation and casting

* Don’t default Spec.EndpointSpec.Mode to vip

* Use single quotes as string literal

* Catch ImportError explicitly

* Move init to top of class

* Align closing brackets

* Spelling

* Import LooseVersion

* Documentation fixes

* Documentation fix

* Documentation fixes

* Remove required: false and default=None

* Defaults for update_delay and update_parallelism

* Set correct key for default

* Handle empty idempotency

* Clearer image documentation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Clearer constraint documentation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Better documentation of corresponding service opts
2019-02-10 14:17:59 +00:00
Adam Miller
2721ed260e Properly handle unauthenticated yum proxy config (#51915)
Fixes #51548

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-02-09 01:17:22 -05:00
gyorgypeter
7fa5694975 VMware: Module for managing mirroring sessions. (#50338)
This module manages the mirroring sessions, and the necessary port settings.

* Correct Documentation and CS
* PEP8, YAML, Documentation Error Fix
* Added empty return statement

Co-Authored-By: gyorgypeter <32464524+gyorgypeter@users.noreply.github.com>
2019-02-08 10:16:57 +05:30
Matt Davis
46bf38711c fix azure_rm_deployment test
* recent changes to args for hosted template file broke the test; changed test to use a specific known-working commit instead of `master`.
* long-term may want to consider hosting the template in httptester or just embedding a local copy
2019-02-07 12:21:36 -08:00
Jordan Borean
c92fcf0b57 Get docker tests working on OpenSUSE (#51896) 2019-02-07 15:18:08 -05:00
Abhijeet Kasurde
c20722474a
ec2_vol_facts: set filters to default value (#51589)
Fixes: #51554

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-02-07 21:53:25 +05:30
Jordan Borean
6fcbfcf6b6
win_rds: wait for reboot to be complete (#51849) 2019-02-07 10:51:11 +10:00
Zim Kalinowski
d252cc7a2b adding cosmos db account module (#47181)
* adding cosmos db account module

* fixes

* fixed issues

* cosmos db account test fixes

* updating cosmosdb

* fixed required

* version from autogereneator

* several upgrades

* idempotency changes

* idempotency improvements

* updated cosmos db module with new idempotency check

* and idempotency check shall fail now....

* try to fail it again

* now should really fail

* one more

* introducing comparison template

* fixes + sorting of arrays

* updated comparisons

* don't compare if parameter is none

* one more test

* fixed compare

* fixed idempotency?

* more logging

* fix comparison rules

* make smaller change

* actually compare multiple write locations

* just change failover

* remove debugging stuff

* one more fix

* fixed remaining sanity test

* updating comparison stuff

* fix pep8

* fix pep8

* will pep8 finally work?

* one more fix

* cosmos db updates

* updating cosmos db account

* fixed pep8

* fix type

* fixed indent

* fixed problem with python 3

* another fix for python 3

* bool type here

* cosmos db fixes

* fix

* fix

* fix

* fixed syntax
2019-02-06 16:06:44 -08:00
Jordan Borean
0f0d33a954 start getting modules to use shared import error code (#51787) 2019-02-06 12:39:17 -05:00
David Passante
cbde04606a Cloudstack: New module cs_vlan_ip_range (#51597) 2019-02-06 11:33:27 +01:00
Wojciech Sciesinski
b8a7e35b22 Correct integration tests for the win_disk_facts module (#51044)
* Correct integration tests for the win_disk_facts module

* Exclude W2K8, W2K8-R2 from tests run under CI
2019-02-06 07:42:11 +10:00
Jordan Borean
e284d21139
win_rds: move the tests into 1 target to make it quicker (#51728) 2019-02-06 05:28:49 +10:00
Martin Krizek
33b07f322c
yum: disableexcludes is supported on centos6 (#51698)
* yum: disableexcludes is supported on centos6

* Add changelog
2019-02-05 18:18:56 +01:00
Hannes Ljungberg
4a5d38b55a docker_swarm_service: Enable tests (#51170)
* Enable tests

* Comment fixes

* Try lowering timeouts

* Comment fix

* Comment fix

* Comment fix

* Add a pause to let service update

* Fix comment

* Disable dns_search tests

* Disable dns_servers test

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Revert "Disable dns_servers test"

This reverts commit 763e9da716b78f4986f313b3ba1ab98faacb742e.

* Revert "Disable dns_search tests"

This reverts commit 2859e4e3a5ebdca078de84d821bb53bbdf967dfd.

* Revert "Add a pause to let service update"

This reverts commit e990dfae1a62e9a42b07960819818bc75fd04427.

* Revert "Try lowering timeouts"

This reverts commit 1617772de81ecef0e560b38c7564646ec3874c3c.

* Ensure that services are running while testing

* Retry tasks on update out of sequence error

* Remove unnecessary check for APIError.explanation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Ignore errors when tearing down test suite

* Retry with a loop instead of tail recursion

* Initialize self.diff_trace in run

* Add change log fragment

* Actually raise error

* Add unit test for retrying

* Lint

* Change to bugfix

* Remove whitespace

* Mock docker dependency

* Use download.fedoraproject.org

* Revert "Use download.fedoraproject.org"

This reverts commit 5931791f7c.
2019-02-05 08:25:29 +00:00
Jordan Borean
c572d17c2e
ansible-test: fix incompatibilty with the RDS tests and httptester (#51716)
* test out win_uri on Shippable

* run all tests for group 3 - ci_complete

* use shared setup and cleanup role for RDS

* Set shippable matrix back to normal

* cleanup changes to support Server 2008 R2
2019-02-05 16:03:12 +10:00
Jordan Borean
6ad5002712
win_updates - mark as unstable again (#51713) 2019-02-05 06:44:24 +10:00
Jordan Borean
f78cdcd2c5
test win_setup - make py3 compatible (#51693) 2019-02-05 05:38:04 +10:00
Pilou
7a3582d651 uri: check unexpected failure doesn't occur when file cannot be saved (#45824)
* uri: fix TypeError when file can't be saved

Fix the following exception (and others):

    Traceback (most recent call last):
      File "/home/lilou/debug_dir/__main__.py", line 604, in <module>
        main()
      File "/home/lilou/debug_dir/__main__.py", line 554, in main
        write_file(module, url, dest, content, resp)
      File "/home/lilou/debug_dir/__main__.py", line 320, in write_file
        module.fail_json(msg="Destination dir '%s' not writable" % os.path.dirname(dest), **resp)
    TypeError: fail_json() got multiple values for keyword argument 'msg'

I would rather remove **resp from returned values but this module is
flagged as stableinterface.

* Static imports are more straight forward and preferred unless dynamic inclusion is required.
2019-02-04 10:29:05 -05:00
Jordan Borean
2e99dea867
win_service - use custom binary for tests (#51689) 2019-02-04 20:29:29 +10:00
Kairo Araujo
a355686987 new module: aix_devices, manage AIX devices (#32290)
* new module: aix_devices AIX devices management

This module discovery, defines, removes and modifies attributes of AIX
devices.

* Added hide attributes that can be used for aliases

Added hid attributes that can be used to manage aliases on en
interfaces.

* After tests: docs and attributes tests

Fixed attributes tests and doc explaining how to use
attributes with comma.

* Fixed grammar on module description

Fixed grammar on module description

* Included test/legacy/aix_devices.yml for tests

As discussed on IRC ansible-devel channes, was include the
legacy tests for further manual tests.

* Added 'attributes' as dictionary

Added 'attributes' as a dictionary makes the configuration
simple.

* Changed the added version from 2.5 to 2.7

Fixed the shippable error from 2.5 to 2.7

```
2018-06-01 08:28:02 ERROR: Found 1 validate-modules issue(s) which
need to be resolved:
2018-06-01 08:28:02 ERROR:
lib/ansible/modules/system/aix_devices.py:0:0: E307 version_added
should be 2.7. Currently 2.5 (75%)
```

* Various changes

* Revert

* Changed the tests to integration dir

* Implement 'available' state

'available' state is the AIX state used, that works same as 'present'

* The states were changed to AIX expressions and kept Ansible states.

Makes sense keep the states names to AIX and use the Ansible 'standards'
states.

'available' is 'present'
'removed' is 'absent'

It makes easy to AIX sysadmins use the module, however it keep the
Ansible meanings.

* Fixed choices according with latest patchset (commit)

* A few doc changes

Nothing material
2019-02-04 03:49:25 +01:00
Jordan Borean
ebc9e4caf7
add pause to make test more stable (#51680) 2019-02-04 11:42:40 +10:00
Felix Fontein
89a1c68f98 docker_volume: improve force option (deprecate, add new option) (#51145)
* docker_volume: Deprecating force option, adding recreate option.

* Add changelog.

* Remove mis-placed force: yes for docker_volume.
2019-02-03 15:09:24 -05:00
Feike Steenbergen
38e70ea317 Add session_role to postgresql modules (#43650)
* Allow session_role to be set for PostgreSQL

By implementing session_role it becomes possible to run the specific
PostgreSQL commands as a different role.
The usecase that is immediately served by this, is the one that one
ansible playbook can be shared by multiple users, which all have
their
own PostgreSQL login_user. They do not need to share login
credentials,
as they can share the role within the PostgreSQL database.

The following example may give some insight:

$ psql -U jdoe -X -d postgres

postgres=> CREATE DATABASE abc;
ERROR:  permission denied to create database
postgres=> set role postgres;
SET
postgres=# CREATE DATABASE abc;
CREATE DATABASE

fixes #43592

* Tests for session_role in PostgreSQL

* Bump version_added for session_role feature

* Remove explicit encrypted parameter from tests
2019-02-02 20:12:14 +01:00
Kevin Breit
a55838b013 Digital Ocean integration test for digital_ocean_tag (#49169)
* Add Digital Ocean integration test template

- Actual integration tests will come shortly

* Add digital_ocean-tag test

* Add integration test for creating and deleting tags

* Remove cloud confiugration file

* Enhancements for integration test for idempotency
- Added new lines per review
- Added proper tests for idempotency checks
- Actual module is broken so deletion test doesn't work

* Add check for do_api_key and instruct if it doesn't work.

* Fix indentation

* Remove idempotency test for nonidempotency action

* Add notes for delete idempotency
2019-02-02 05:19:25 +01:00
Dag Wieers
cfa028677d
ACI: Fix integration tests using urldecode (#51610)
This is in result of changes to use urlencode to encode query strings.
2019-02-01 16:19:35 +01:00
Federico87
f94378fc2f ios_ntp module (#50705)
* ios_ntp module

* add execute_module for config func

* fix units test

* test empty list

* update example

* change want logic to follow have - removed try/except

* update commands list for config test

* add idempotent test case

* add more test
2019-02-01 09:20:02 -05:00
Anil Kumar Muraleedharan
004d8b03d4 Lenovo cnos l3interface (#51322)
* Adding cnos_l3_interface module in alignment with others vendors.
2019-02-01 09:17:52 -05:00
Alex Stephen
27c5e38e10 Bug fixes for GCP modules (#51573) 2019-01-31 17:03:38 -05:00
Alex Stephen
2b0f16443c Bug fixes for GCP modules (#51574) 2019-01-31 17:03:24 -05:00
Alex Stephen
6a79468acf Bug fixes for GCP modules (#51576) 2019-01-31 17:02:56 -05:00
Alex Stephen
802827536c New Module: gcp_redis_instance (#51578) 2019-01-31 17:02:20 -05:00
Brian Coca
e010034151
unquote ev (#51560)
* unquote ev

* properly test for defined var
2019-01-31 16:55:10 -05:00
Jordan Borean
f27078df52
win_power_plan: fix for Windows 10 and Server 2008 compatibility (#51471) 2019-02-01 06:32:12 +10:00
Jordan Borean
2a701d22f4
win_rds move to test group 3 (#51559) 2019-02-01 06:29:03 +10:00
Andrea Tartaglia
042aeba46c Base integration test for gitlab modules (#51490)
* Added basic integration test targets for gitlab modules

* Removed cloud/gitlab config from aliases, it doesn't exist yet

* Fixed CI issues
2019-01-31 10:20:33 +00:00
Jordan Borean
6a2aac487d
win_stat - add follow option and fix broken tests (#51522)
* win_stat - add follow option and fix broken tests

* fix docs issues
2019-01-31 15:56:06 +10:00
Andrew Saraceni
30b25d53d2 Add "pure" state functionality for win_group_membership (#51298)
* add pure state functionality for win_group_membership

* fixing typos in docs

* fix syntax for adding removed array depending on state

* remove trailing whitespace from docs

* fix issue in testing pure (again)

* adding note for pure being added in Ansible 2.8
2019-01-31 11:48:49 +10:00
Yunge Zhu
dd2032a3ad add new module for webapp slot (#48862)
* add new module for webapp slot

* fix lint and resolve comments

* fix lint

* fix lint

* fix lint

* fix name in test

* add variable

* fix test parameter

* fix test frameworks

* fix test

* remove delete due to swap not finish

* resolve comments

* fix lint

* fix typo
2019-01-30 15:20:32 -08:00
Dag Wieers
3cfe08b191 win_stat: Rewrite using AnsibleModule (#49653)
* win_stat: Rewrite using AnsibleModule

Simple rewrite using AnsibleModule.

* Remove custom deprecate block

Since we already have the `removed_in_version` option set, this is not
really needed. However the error message was a bit more specific.

* Fix typo

* Fixes after review

* Fixes to get tests working
2019-01-31 06:02:23 +10:00
Brian Coca
4ac0c23db6
added unsafe toggle to vars_prompt (#49219)
* added unsafe toggle to vars_prompt

	fixes #47534
2019-01-30 15:01:13 -05:00
Brian Coca
4a0fceaa3b remove bare var handling in conditionals (#51030)
* remove bare var handling in conditionals

  this makes top level and multilevel vars (dicts keys) behave the same
  it will require adding |bool for 'string comparissons' in indirect templates

  - added new tests to ensure uniform handling
  - switched to 'is' testing for status
  - changed warning to 'conditional' as 'when:' is not only place it gets triggered

* updated to include toggle and deprecation

* fix deprecated

* updated tests to handle toggle

* fixed typo and added note about the future
2019-01-30 15:00:24 -05:00
Akshay Gaikwad
0493ef359a Add integration tests for docker_image options (#48574)
* Add integration tests for docker_image options

Tests for options in docker_image module

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add force option tests

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add repository option tests

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Modify test for option force

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2019-01-30 14:11:49 -05:00
Zim Kalinowski
f0f23378db
support for custom data in vmss (#51380) 2019-01-30 12:09:29 +08:00
Jordan Borean
670a45c3ac
test dnf - fix groups idempotency on RHEL and fix postgresql issue (#51319) 2019-01-30 10:56:57 +10:00
Dag Wieers
9eef9a3702
aci_aaa_user: Fix an issue with clear_password_history (#51459) 2019-01-30 01:49:33 +01:00
Varun Chopra
19441df7e9 Update module to use Ansible.Basic (#51365) 2019-01-30 07:30:59 +10:00
Kevin Subileau
5d15a539c7 Add modules to manage Remote Desktop Services (#43406)
* Add windows module win_rds_settings

* Add windows module win_rds_rap

* Add windows module win_rds_cap

* Add tests for module win_rds_settings

* Add tests for module win_rds_rap

* Add tests for module win_rds_cap

* Validate user and computer groups in module win_rds_cap

* Validate user groups in module win_rds_rap

* Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user and computer group names in module win_rds_cap

* Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user group names in module win_rds_rap

* Validate computer group parameter and support additional formats (UPN, Down-Level Login Name, SID and Login Name) in module win_rds_rap

* Validate allowed ports parameter in module win_rds_rap

* Ensure user group list is not empty in module win_rds_rap

* Remove unwanted value in result object

* Ensure user group list is not empty in module win_rds_cap

* Ensure order parameter value never exceed the number of existing CAPs in module win_rds_cap

* Add diff mode support to win_rds_cap

* Add diff mode support to win_rds_rap

* Add diff mode support to win_rds_settings

* Add SSL bridging and messaging policy settings to module win_rds_settings

* Fix copyright

[skip ci]

* Add missing trailing dots in documentation

[skip ci]

* Fix incorrect variable passed to Fail-Json

* Minor changes and doc update

* Avoid using Powershell aliases

* Use WMI instead of PSProvider to handle group names to avoid conversion in UPN form

* Use CIM instead of WMI cmdlets
2019-01-30 07:21:56 +10:00
Dag Wieers
d8a0e1a9b7
aci_aaa_user: Fix changing user description (#51408)
This fixes a reported problem with the aci_aaa_user module.
2019-01-29 03:16:58 +01:00
Jordan Borean
a259b810ad
Ansible.Basic - make choices validate case insensitive (#51203)
* Ansible.Basic - make choices validate case insensitive

* fix win_certificate_store tests
2019-01-29 05:42:01 +10:00
Zim Kalinowski
2bb8eea413 Adding mysql configuration facts module (#45075) 2019-01-28 16:36:23 +08:00
Karsten Jakobsen
99a4a3dc33 VMware: New module vmware_vm_host_drs_rule (#50651)
* Added new vmware module for creating DRS VM-HOST rules Host groups in a given cluster
* Fixing punctuation in lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py
* Added better Docstring
* Better messaging and documentation. Removed unused lib
* Added operation to determine create or update msg
* Fixed class params to only take module. This is less error prone
* Bugfix, undefined names
2019-01-28 06:15:45 +01:00
Zim Kalinowski
be859a9f8e
Automatically removing all resources allocated by VM (#50652) 2019-01-28 12:27:32 +08:00
Hannes Ljungberg
72a44e144a docker_swarm_service: Compare image by digest (#51134)
* Compare image by digest

* Add changelog fragment

* Fix version check

* Remove unused import

* Add note about image resolving

* Don’t overwrite image

* Fix documentation error

* Add resolve_image option

* Add version_added

* Remove whitespace

* Remove unused attribute

* Remove unused attribute
2019-01-27 11:48:16 -05:00
Samuel Carpentier
6846152c46 New module: tower_notification (#50512)
* New module: tower_notification

* Fix CI check failures

* Add integration tests and extend examples

* Add missing required field for deletion tests and examples

* Add missing required field for deletion tests and examples

* Set port type to int

* Add missing field for Slack notification

* Add missing field types for IRC notification

* Update module documentation

* Correct field name and type for IRC notification

* Uniformize 'targets' field

* Uniformize 'targets' field
2019-01-27 16:28:49 +00:00
Hannes Ljungberg
ee39853426 docker_swarm_service: Fix endpoint mode idempotency (#51232)
* Fix endpoint mode idempotency

* Remove newline
2019-01-27 09:06:09 -05:00
Matt Clay
a8116497ba More test fixes for split controller/remote tests. 2019-01-25 20:46:53 -08:00
Matt Clay
315434f676 Enable force_handlers for integration tests. 2019-01-25 08:51:57 -08:00
Will Thames
195de8b460 k8s: turn off wait in check_mode (#51310) 2019-01-25 11:08:46 +01:00
Matt Clay
35761a99c6 Make sure force_handlers is off for handlers test. 2019-01-25 00:26:09 -08:00
Matt Clay
215b27eb10 Enable paramiko connection tests on RHEL 8.0. 2019-01-24 19:57:35 -08:00
Matt Clay
d2a7cc0b9f Fix integration tests to support remote hosts. 2019-01-24 19:57:04 -08:00
Zim Kalinowski
6f63ba6520 vmss extension facts (#51263) 2019-01-25 10:04:44 +08:00
Zim Kalinowski
c788591580 Adding Azure Virtual Machine Extension Facts (#51258) 2019-01-25 09:47:23 +08:00
Brian Coca
be776daefe
add static facility and apply to register (#49737)
* add static facility and apply to register

* added warning

* added test for templated register

* test register 'static' status

* rely on subshell to deal with quote context

* use corrects pb for test

* bring constants back cause new code in devel
2019-01-24 11:51:52 -05:00
Jordan Borean
b2114a9ddf
test - skip dnf on RHEL 8 until test is fixed (#51260) 2019-01-24 16:43:20 +10:00
Ganesh Nalawade
70bf9b9919
Add backup filename and dir path option for config network modules (#50801)
* Add configurable backup path option for network config modules

Fixes #50283
Fixes #32724

*  Add back_options in network config module argspec
*  Handle backup path options in network action plugin

* Fix review comments

* Add integration tests

* Update changelog
2019-01-24 09:36:16 +05:30
Zim Kalinowski
4041f02389
adding devtestlabs (#50961) 2019-01-24 08:03:16 +08:00
Zim Kalinowski
a6bbf21282 adding vmss extension (#50709)
* adding vmss extension

* added alias

* fixed one thing

* + better idempotence handling

* fixed mistake in module

* removed location check as not reliable
2019-01-23 15:51:10 -08:00
Matt Clay
a20d0d1afb
Fix dnf integration test issues. (#51251)
* update/enable rhel8 beta integration tests for yum and dnf

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix typo in conditional for dnf/tasks/main.yml

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix var scoping for environment checks

Signed-off-by: Adam Miller <admiller@redhat.com>

* Disable install via path on RHEL.
2019-01-23 13:52:03 -08:00
Alex Stephen
73e7e663c6 New GCP module: gcp_iam_service_account_key (#50682) 2019-01-23 16:49:50 -05:00
Alex Stephen
7ceffb7ba2 New GCP module: gcp_sourcerepo_repository (#51249) 2019-01-23 16:44:54 -05:00
Adam Miller
2d83db7036 update/enable postgresql integration test target for rhel8 beta
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-23 11:09:10 -08:00
Adam Miller
14a1199dfc update/enable filesystem integration test target for rhel8 beta
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-23 11:08:52 -08:00
Adam Miller
1ad5bae359 update sefcontext integration target and enable for rhel8 beta
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-23 10:51:42 -08:00