Commit graph

7513 commits

Author SHA1 Message Date
Felix Fontein
50d56ca89d docker_image: stop pulling by default on build (#53911)
* Prepare to change default of build.pull from yes to no in Ansible 2.12.

* Specify build.pull.

* Add changelog.

* Fix bad indent.
2019-03-18 01:34:07 -04:00
Felix Fontein
35b295f6af docker_swarm inventory plugin: extend tests (#53913)
* Extend tests.

* Update BOTMETA so that docker* inventory tests are associated with .
2019-03-17 10:28:55 +00:00
René Moser
f20575e2a8
tests: vultr_server: adjust plan names, fixes integration test (#53914)
* vultr_server: update plan name, fixes integration tests

* remove superfluous templating in assert
2019-03-17 11:28:29 +01:00
Felix Fontein
259b2e06a4 docker_swarm inventory plugin: add basic integration tests (#53908)
* Add basic docker_swarm inventory plugin integration tests.

* Call dependency explicitly.
2019-03-17 08:16:18 +00:00
David Passante
ef6da8ec5c cloudstack: streamline modules doc (part 4) (#53874)
* cloudstack: streamline modules doc (part 4)

* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* validate-module errors fixes

* cs_network_offering: Rollback of the deletion of the choice list for supported_services param
2019-03-17 08:38:02 +01:00
Patryk D. Cichy
851cfc0c18 Add new Cloudstack module cs_image_store (#53617) 2019-03-16 07:58:55 +01:00
Abhijeet Kasurde
142732dba9 dataloader: check exact value of dir (#52021)
Include path in role with directory which has 'tasks' as end.
For example, roles/sometasks/templates is now considered while searching path.

Fixes: #42585

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-16 01:48:01 -04:00
The Magician
92fd49de77 Bug fixes for GCP modules (#53880) 2019-03-15 17:49:49 -04:00
The Magician
3a43e41b39 Bug fixes for GCP modules (#53881) 2019-03-15 17:49:38 -04:00
The Magician
b429ba61dc Bug fixes for GCP modules (#53879) 2019-03-15 17:38:27 -04:00
The Magician
e8e69bf069 Bug fixes for GCP modules (#53878) 2019-03-15 15:43:12 -04:00
The Magician
204ae88491 Bug fixes for GCP modules (#53882) 2019-03-15 15:43:00 -04:00
Matt Clay
b25a37bb38
Convert k8s test to role and fix virtulenv usage. (#53883) 2019-03-15 12:37:46 -07:00
Matt Martz
85138a78a8 Cleanup yaml files with incorrect task attrs (#53813) 2019-03-15 13:05:09 -04:00
Matt Clay
906427caba
Add shippable/posix/group4/ for CI. (#53816) 2019-03-15 07:25:37 -07:00
Olivier Bourdon
668f014b3c Add more tests for method option change (#52228) 2019-03-15 09:53:32 +00:00
Gaudenz Steinlin
a65a137cdd Fix failure of cloudscale_floating_ip without server (#53702)
The cloudscale_floating_ip module failed if no server was assigned to
the floating IP. This also adds a test to avoid a regression.

The only way to have a floating IP without a server assigned is to
delete the server where the floating IP is currently assigned. Under
normal circumstances it's not possible to have an unassigned floating
IP.
2019-03-15 09:50:09 +00:00
Jordan Borean
980ca564ce
windows - Fix module utils with glob paths (#53835)
* windows - Fix module utils with glob paths

* fix link util tests when using DOS 8.3 paths
2019-03-15 19:44:53 +10:00
Lindsay Hill
b92d81cc01 Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
rajaspachipulusu17
e2d92e82c4 Pluribus Networks network cli terminal and cliconf plugins (#53735)
* Pluribus Networks network cli terminal and cliconf plugins

* Changes in Unit tests and modules according to network_cli connection

* Changes in Unit tests and modules according to network_cli connection
2019-03-15 13:51:50 +05:30
Felix Fontein
77f7e5a986 Only use ports in the range 9001-9060. 2019-03-14 23:50:41 -07:00
Jordan Borean
cac3c6efcf
win_chocolatey - Fix incompatibilities with latest Chocolatey release (#53841) 2019-03-15 16:40:30 +10:00
Jordan Borean
e0c0e9a10b
win_chocolatey_source - don't rely on cmd to get source info (#53837) 2019-03-15 16:26:48 +10:00
Jordan Borean
d00418c924
win_slurp - fix glob like paths (#53831) 2019-03-15 14:59:01 +10:00
Jordan Borean
d063cefb64
win_owner - fix glob like paths (#53830)
* win_owner - fix glob like paths

* Fix issues on older PS versions
2019-03-15 14:58:15 +10:00
Jordan Borean
3cfa71bff0
win_acl_inheritance - fix glob like paths (#53829) 2019-03-15 14:57:59 +10:00
Jordan Borean
aba6f5f50d
win_acl - fix glob file paths (#53828) 2019-03-15 14:57:41 +10:00
Jordan Borean
4f9de45785
win_tempfile - return absolute path on created temp file (#53827)
* win_tempfile - return absolute path on created temp file

* Fix tests for CI
2019-03-15 14:57:27 +10:00
Matt Clay
17ed39a009
Fix uri integration test uninstall of urllib3. (#53834) 2019-03-14 21:52:03 -07:00
Sam Doran
1e595493d9
User module - Check local database when local is specified in the task (#51088)
The output of pw.getpwnam() does not distinbuish between local and remote accounts. It will return a result if an account exists locally or in the directory. When local is set to True in the task parameters, look through the local password database explicitly.

* Ensure luseradd is present for tests
* Add docs and warnings about local mode
2019-03-14 22:16:53 -04:00
Sam Doran
43a44e6f35
Move utility functions out of basic.py (#51715)
Move the following methods to lib/anisble/module_utils/common/validation.py:

- _count_terms()
- _check_mutually_exclusive()
- _check_required_one_of()
- _check_required_together()
- _check_required_by()
- _check_required_arguments()
- _check_required_if
- fail_on_missing_params() --> create check_missing_parameters()
2019-03-14 21:29:55 -04:00
Matt Clay
34b928d283 Remove conflicting urllib3 from pip in uri test.
The uri test will fail on centos6 if run after a test that installs urllib3 via pip unless it is uninstalled.
2019-03-14 18:00:13 -07:00
Matt Clay
b8349b1d61 Fix aliases for order integration test. 2019-03-14 13:24:32 -07:00
Sloane Hertel
87ebc56de6 Allow parent groups to be variables or literal (#53649)
* Allow parent groups to be variables or literal, requires {{ }}
* Check strict before failing on templating errors
* Don't add a group if an invalid parent group was provided
2019-03-14 14:22:18 -04:00
Alan Rominger
8c2037aaa9 do not error in case of empty list constructed group (#53748) 2019-03-14 12:27:56 -04:00
Chris Archibald
14d670573a Ability to add port in portset (#52734)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* add ports
2019-03-14 15:39:11 +00:00
Chris Archibald
b5144a36ab New Module: na_elementsw_initiators (#52375)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* new module

* update author

* update copyright

* fixes
2019-03-14 15:38:49 +00:00
Brian Coca
e280f2f7b0
Try to get correct buffer size to avoid races (#53547)
* Try to get correct buffer size to avoid races

  fixes #51393

* fix test, mock buffer function since all is mocked
2019-03-14 11:04:56 -04:00
Matteo Ferrando
86405b8fe4 (postgresql_privs) accept 'ALL_IN_SCHEMA' objs for 'function' type (#35331)
* avoid using Postgres formatting function
* add tests for ALL FUNCTIONS IN SCHEMA
* documentation and changelog
* requested changes in tests
* fixed changelog
2019-03-14 20:21:05 +05:30
Sam Doran
55306906cf
Correctly count processors on ARM systems. (#52884)
- Add unit tests for Linux CPU info
- Add cpuinfo output from several systems for unit tests

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-14 10:31:47 -04:00
Chris Archibald
fa2e8d8fe1 New Module: na_ontap_snapshot_policy.py (#52299)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* add snapshot policy

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* review change
2019-03-14 13:30:51 +00:00
Bojan Vitnik
edcd921258 XenServer: Fix wrong FakeXenAPI module import in unit tests (#53634) 2019-03-14 17:03:52 +05:30
Felix Fontein
4573f349ea luks_device: add allow_to_remove_last_key option (#52371)
* Add allow_to_remove_last_key option.

* Dump headers.

* Add support for old versions of cryptsetup luksDump.

* Update lib/ansible/modules/crypto/luks_device.py

Co-Authored-By: felixfontein <felix@fontein.de>

* Rename allow_to_remove_last_key -> force_remove_last_key.
2019-03-14 09:55:35 +00:00
Felix Fontein
35e7fb776a docker_image: improve usage (#52894)
* Add source option.

* Split force parameter into force_source, force_absent and force_tag.

* Move all build-related options into a suboption called build.

* Add changelog.
2019-03-14 09:46:38 +00:00
Zim Kalinowski
a202509ba4
fixing resource facts (#53727) 2019-03-14 11:46:33 +08:00
Jordan Borean
c2466c545b
Handle binary files when scanning metadata in python 3 (#53773) 2019-03-14 10:00:30 +10:00
Bob Boldin
b67505d271 AWS: new module ec2_transit_gateway fixes #49376 (#53651)
* AWS: new module ec2_transit_gateway fixes #49376

* Add permissions neeeded for integration tests

* uncomment nolog on creds

* add unsupported to integration test aliases

* remove the shippable/aws/group alias so doesn't conflict with unsupported
2019-03-14 09:42:33 +10:00
Matt Clay
7c315170c6 Reduce verbosity of blocks test. 2019-03-13 15:05:10 -07:00
Jordan Borean
d3792145d5
win_get_url - refactor tests to use httptester (#53765)
* win_get_url - refactor tests to use httptester

* Use the file lookup instead of slurp
2019-03-14 08:04:49 +10:00
Gabriel do Nascimento Ribeiro
f97a593da5 Add non_unique parameter for group module (#53085) 2019-03-13 15:40:07 -04:00
Chris Archibald
0e77eeb205 Merging of broadcast domain and Broadcast domain port (#51978)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Add domain ports in to broadcast domain

* ansibot fixes

* Revert "Revert "changes to clusteR""

This reverts commit 2713c75f31.

* Fix author
2019-03-13 18:32:54 +00:00
albinpopote
473596a472 New module: na_ontap_net_subnet (#50491)
* New module: na_ontap_net_subnet

* Sanity tests Fix

* Fix: correct examples

* Fix: examples syntax

* Correction: Sanity 1

* Code review

* Code review + Bugfix

* Add Unit Tests

* Fix Sanity Indentation tests

* FIX: Validator change request

* FIX : Change unit test json fail message

* FIX: Typo ip_ranges in example section

* FIX: Remove NetApp copyright
2019-03-13 18:31:55 +00:00
David Passante
244a9a83aa cs_iso: fix missing param "is_public" (#53740)
* cs_iso: fix missing param "is_public"

* add changelog fragment
2019-03-13 19:06:44 +01:00
Matt Martz
07ff2a6494 cliconf and httpapi are documentable plugins now 2019-03-13 10:28:44 -07:00
Alex Stephen
08918c6c2b GCP IAM Role (#53490)
* GCP IAM Role

* module util file

* test fix

* unit tests

* test fixes

* doc fragment fixes

* test fixes

* test fix
2019-03-13 13:28:01 -04:00
Matt Clay
a8e328f474
Overhaul ansible-test code coverage and injector. (#53510) 2019-03-13 07:14:12 -07:00
Chris Archibald
2e47e9fffa Modify na_ontap_net_port NetAppModule module format, allow for multiple ports, unit tests (#52286)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* add update to netport

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* fix docs

* fix option
2019-03-13 13:06:37 +00:00
Abhijeet Kasurde
8d4343b94c
iptables: implement log_level parameter (#52880)
Fixes: #25100

Based upon https://github.com/ansible/ansible/pull/25118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-13 18:10:59 +05:30
Abhijeet Kasurde
f0ef4dae05
iptables: Add support for gateway parameter (#53465)
When user specifies the JUMP value to 'tee', gateway is required.
This fix adds new parameter 'gateway' to support this functionality.

Fixes: #53170

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-13 17:47:44 +05:30
Felix Fontein
c2cb82ec14 ACME: add support for IP identifiers (#53660)
* Adding support for IP identifiers according to https://tools.ietf.org/html/draft-ietf-acme-ip-05.

* Add changelog.

* Make sure that the authorizations return value is unchanged for CSRs with DNS-only SANs.

* Remove unneeded import.

* type -> identifier_type

* Python 2.6 compatibility.

* Fix unit tests.

* Add IP address normalization.

* Extend tests.

* Move data into fixtures.

* Adjust BOTMETA.
2019-03-13 10:16:56 +01:00
Fedor V
8ac6145180 vmware_vm_facts: custom attributes support (#45773)
* Add toggle to attribute facts gathering

Signed-off-by: Fedor V <f.vompe@comptek.ru>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-13 09:49:20 +05:30
Jordan Borean
b044bb431e
Use shared remote_tmp_dir to simplfy tests (#53721) 2019-03-13 12:26:59 +10:00
Jordan Borean
d9795bad98
win_reboot - fix broken tests after recent commit (#53722) 2019-03-13 12:24:41 +10:00
Jordan Borean
33939f7fe8
win_psexec: make the tests more stable (#53716) 2019-03-13 11:22:59 +10:00
David Passante
495c197770 cloudstack: streamline modules doc (part 3) (#53412)
* cloudstack: streamline modules doc (part 3)

* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* Remove cs_loadbalancer_rule from ignore.txt

* cs_loadbalancer_rule: add "version_added" for params added into the documentation

* cs_loadbalancer_rule: ignore E309 for now

* cs_loadbalancer_rule: remove E309 from ignore.txt
2019-03-12 23:19:07 +01:00
Brian Coca
b793f08a92
fixes for stripping (#52930)
function changed to do in place replacement, should be less expensive even with copy as it avoids 'sub copies', can compose with module_args_copy to create replacement for old behavior

  attempt to fix #52910

* handle lists and subdicts correctly
* added  missing exception case, which was not noticed since 'cleaning' was not working
* added comments to clarify exceptions
2019-03-12 18:18:38 -04:00
Matt Clay
7a387e216e Disable failing azure_rm_keyvault test. 2019-03-12 14:29:15 -07:00
Matt Clay
6fd83f96d1 Disable old_style_cache_plugins integration test. 2019-03-12 14:04:30 -07:00
Gaudenz Steinlin
8111425a96 Cloudscale server password (#53701)
* cloudscale_server: remove required parameter check

The valid parameter combinations are already checked by the API. There
is no need to check a subset of this in the Ansible module as well. This
makes it more likely that future changes in the API won't require
changes in the Ansible module.

* cloudscale_server: add password parameter

Recent revisions of the cloudscale.ch API allow setting a password for a
server. Add this option to the cloudscale_server module.
2019-03-12 21:56:05 +01:00
Gaudenz Steinlin
6471e4653d Integration test cleanup for cloudscale modules (#53629)
* Integration test cleanup for cloudscale modules

This refactors the cleanup procedure for the integration tests of the
cloudscale_server and cloudscale_volume modules to use an "always"
section for cleanup. The cleanup code also deletes all resources which
contain the test run prefix. This ensures that all resources are cleaned
up regardless of the actual test result which is a prerequisite for
running these tests in CI.

* Move cloudscale_floating_ip tests from legacy to integration

This also adds code to make sure that floating IPs are deleted even if a
test run fails. This is unfortunately not possible for floatint IPv6
networks.
2019-03-12 17:53:49 +01:00
Chris Van Heuveln
15303b05ef nxos_vxlan_vtep: sanity.yaml test needs cast for httpapi tcam check (#53531)
This check was working for network_cli (returns value as int) but
failing for httpapi (returns value as str). Casting to int fixes the problem.
2019-03-12 19:19:27 +05:30
krisvasudevan
651fc88303 Added support for infoblox member object (#53174)
* changes for member module
2019-03-12 17:48:51 +05:30
Nilashish Chakraborty
f615011de3
New module for BGP configuration management in iosxr (#53121)
* Add iosxr_bgp module

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

* Remove unused code

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

* Remove netconf code

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-03-12 17:47:40 +05:30
Nilashish Chakraborty
9365c0f468
New module for BGP configuration management in Arista EOS (#52722)
* New module for BGP in EOS

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

* Add function to validate input

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

* Fix line indentation

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

* Add integration tests

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

* Fix CI

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

* Fix sanity test failure

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

* Remove unused code

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-03-12 17:31:58 +05:30
Matt Clay
1143889f26 Fix integration test inventory. 2019-03-12 00:00:32 -07:00
Matt Clay
759e037edc Fix integration tests with custom inventory.
All inventory hosts to which a connection is actually established
should declare ansible_python_interpreter to avoid interpreter
auto-discovery, as that may select the wrong interpreter.
2019-03-11 21:43:58 -07:00
Jordan Borean
c8c326d88e
Use unicode string for auto interpreter warnings (#53671)
* Use unicode string for auto interpreter warnings

* Added some unit tests for interpreter selection

* Fix python 3 syntax issues
2019-03-12 14:16:49 +10:00
Brian Coca
f73e03632f
remove obsolete set_play on play_context (#47934)
* remove redundant assignments from play

 - fix unit tests
2019-03-11 18:25:48 -04:00
Matt Clay
8fa294a33a
Fix ansible-test coverage stub memory usage. (#53652)
Split coverage stub files into multiple parts based on the number
of lines in files included in each stub. This will keep memory usage
down to avoid hanging on Shippable.
2019-03-11 15:14:09 -07:00
Matt Clay
887ab35656
Add support for ansible-test --coverage-check. (#53573) 2019-03-11 15:13:09 -07:00
Simon Metzger
0d7ea0bae6 new module aci_access_sub_port_block_to_access_port (#51940)
* new module aci_access_sub_port_block_to_access_port

* new line at end of file
2019-03-11 18:05:57 -04:00
Jordan Borean
f297229b52
Add arg and doc validation for PowerShell modules (#53615)
* Add arg and doc validation for PowerShell modules

* Verify if pwsh exists before running it
2019-03-12 07:56:51 +10:00
Lukas Kämmerling
32c337ee39 hcloud_server: streamline label handling (#53633) 2019-03-11 16:57:23 +01:00
Chris Archibald
1a306ce871 Rewrite of na_ontap_snapshot to follow NetAppModule, add new option to rename snapshot, bug fix to modify snapmirror_label (#52297)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* upadets

* fix docs

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* review change
2019-03-11 15:49:59 +00:00
Chris Archibald
48098ba688 Updates to na_ontap_net_route (#49656)
* new option and rewrite

* update documentation

* fix documentation

* Review change

* add comment
2019-03-11 14:43:26 +00:00
Lukas Kämmerling
3e02502056 Add hcloud_ssh_key module (#53550) 2019-03-11 15:42:49 +01:00
Sam Doran
a4b2ce5e13
Add test to ordered integration tests to exercise shuffle code path (#53138)
This is meant to exercise the code path not test for randomness, though it somewhat does that.
2019-03-11 10:14:06 -04:00
Chris Archibald
dbcfb3d0fe Update to na_ontap_firewall_policy (#51976)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Fix issue and unit tests

* update to firewall

* fix import issues

* Revert "Revert "changes to clusteR""

This reverts commit 2713c75f31.

* fix docs

* stop pylint on unicode line, line can only be run in python2

* Review comment

* add pylint skip

* add pylint skip
2019-03-11 13:56:30 +00:00
Chris Van Heuveln
591e0ffb69 nxos_user: auth.yaml test: stronger test password needed (#53533)
Basic passwords are rejected by the nxos device unless `no password strength-check`
is configured. This change just makes the password meet the minimum strength checks.
2019-03-11 18:06:25 +05:30
Chris Van Heuveln
c5de2233d0 nxos_pim_rp_address: N7K sanity test fix when removing rp w/pfx-list (#53556)
The N7K is another platform that raises an error when trying to remove
an RP w/prefix-list specified. These tests are now skipped for N7K.
2019-03-11 18:05:59 +05:30
Chris Van Heuveln
c1e9f594d2 nxos_ospf_vrf: sanity.yaml test: fix timer_throttle_lsa_hold (#53561)
* The test was setting `lsa max` value to 2222 but the default `lsa hold` value is 5000.

* `hold` must be less than `max` or else the device raises a clierror, so I just added a lower non-default `hold` value to satisfy the cli.
2019-03-11 18:05:03 +05:30
Felix Fontein
3117900b1e docker_container: show warnings, fix/improve tests (#53440)
* Output warnings from docker daemon on container create and update.

* Accept warning for blkio_weight instead of idempotency.

* Value quoting.

* Avoid loop variable conflict.

* Add changelog.

* Make one test case faster.

* Add 'Docker warning: ' prefix.

* Add a generalized warning reporting function.
2019-03-11 19:04:06 +10:00
Hannes Ljungberg
7bb174214c docker_swarm_service: Add option rollback_config (#53594)
* Add rollback_config

* Add change log fragment

* Fix broken test

* Actually fix broken tests

* Add rollback_config example

* Default rollback_config as None

* Abort early if rollback_config does not exist
2019-03-11 18:55:41 +10:00
Trishna Guha
a41028244d
Add platform facts in network facts modules (#51434)
* Add platform facts in network facts modules

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add vyos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add iosxr

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add junos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix pep8

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix vyos_facts unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix ios_facts unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix iosxr unittests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix junos test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-03-11 10:56:39 +05:30
Bojan Vitnik
e775434a52 XenServer: Documentation improvements and fixes for XenServer related modules (#53498)
- More info added to module docs.
 - Fixed errors and typos in module docs.
 - Added parameter types to module docs.
 - Some error messages are fixed and/or changed to be more helpful.
 - Some code comments changed and added.
 - Updated unit tests that test changed error messages.
 - Improved module examples.
 - Improved docs for custom_params xenserver_guest module parameter
2019-03-11 08:56:17 +05:30
Jordan Borean
830a11dd38
test: optimize win_psmodule tests (#53431) 2019-03-11 05:43:21 +10:00
Hannes Ljungberg
57f706e5a0 docker_swarm_service: Extend mount options (#53559)
* Add mount options

* Remove mount readonly default

* Fix driver_config test

* Add documentation

* Add changelog fragment

* Properly indent tmpfs_ options

* Use correct service suffix for mount tests

* Check for None value on tmpfs usage check

* Document change of mounts.readonly return key

* Use correct change log type

* Really use correct change log type

* Revert changing mount.readonly to read_only
2019-03-09 14:35:57 -06:00
Matt Clay
5134ba95ca
Fix conditionals integration test. (#53583)
* Fix inventory for conditionals test.
* Remove extra groups from conditionals test.
2019-03-08 22:59:00 -08:00
Matt Clay
6588df505c Improve display of test timeout message. 2019-03-08 22:43:06 -08:00
Matt Clay
40318b49b2 Check extensions on changelog fragments. 2019-03-08 22:42:19 -08:00
Matt Clay
37bfa92076 Disable DevTest Labs tests. 2019-03-08 22:22:41 -08:00
Matt Clay
9546761407 Fix coverage stub generation in CI. 2019-03-08 16:29:14 -08:00
Matt Clay
8fe9eb7b92 Show invalid coverage paths with verbosity > 1. 2019-03-08 15:47:44 -08:00
Matt Clay
7c0bc9e4ac Fix no-assert code-smell regex. 2019-03-08 13:20:20 -08:00
Matt Martz
414440e323
Allow dict2items to work with hostvars (#53538) 2019-03-08 14:36:53 -06:00
ndswartz
26d87a912b Added eseries base with tests (#49269) 2019-03-08 18:13:45 +00:00
Brian Coca
8940732b58
Configurable and parallel gather facts (#49399)
* Configurable list of facts modules (#31783)

 - allow for args dict for specific modules
 - add way to pass parameters
 - avoid facts poluting test
 - move to 'facts gathered' flag
 - add 'gathering' setting tests
 - allow parallel option in case serialization is too slow
 - added support to automatically map network facts
   uses "smart" connection mapping
2019-03-08 13:08:37 -05:00
Felix Fontein
caf7fd2245 openssl_*: improve passphrase handling for private keys in PyOpenSSL (#53489)
* Raise OpenSSLBadPassphraseError if passphrase is wrong.

* Improve handling of passphrase errors.

Current behavior for modules is: if passphrase is wrong (or wrongly specified), fail.
Current behavior for openssl_privatekey is: if passphrase is worng (or wrongly specified), regenerate.

* Add changelog.

* Add tests.

* Adjustments for some versions of PyOpenSSL.

* Update lib/ansible/modules/crypto/openssl_certificate.py

Improve text.

Co-Authored-By: felixfontein <felix@fontein.de>
2019-03-08 16:21:18 +00:00
Sam Doran
1d91e03119
Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298)
Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.

Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.

* Add changelog

* Add unit tests

Only add tests for Clear Linux parsing since that was the cause of this issue.
2019-03-08 10:40:49 -05:00
Lukas Kämmerling
d4bd01c7ac hcloud: Add labels support to hcloud_server (#53514) 2019-03-08 11:10:30 +01:00
Chris Van Heuveln
8c33ba3ecd nxos_igmp_snooping: group-timeout fails when igmp snooping disabled (#53079)
* nxos_igmp_snooping: group-timeout fails when igmp snooping disabled

group-timeout config will be rejected by the device if `ip igmp snooping` is disabled.

  * raise a failure for this condition

  * reorder the command list so that group-timeout is always last

* SA fixes

* SA fixes

* only call gt_dependency if gt
2019-03-08 15:33:24 +05:30
Chris Van Heuveln
ea0ef3b2e1 nxos_pim_rp_address: update sanity test to work with legacy N3K (#53471)
Test yaml fixes for n3048:

* 3048 does not support bidir option
* 3048 cannot remove rp-address if prefix-list/route-map is present
  * yes: no ip pim rp-address x.x.x.x
  *  no: no ip pim rp-address x.x.x.x prefix-list foo
  *  no: no ip pim rp-address x.x.x.x route-map bar

This test now passes on N9k/N7k/N6k/N3k.
2019-03-08 15:29:34 +05:30
Bartosz Licheński
6e198487c9 postgresql_privs: Support FOREIGN DATA WRAPPER and FOREIGN SERVER (#38803)
* Support FOREIGN DATA WRAPPER and FOREIGN SERVER in postgresql_privs module
* Added available from note to fdw and fs object types
* Integration tests, examples in documentation
* Complete integration tests
2019-03-08 14:51:03 +05:30
Hannes Ljungberg
f5faf8211d docker_swarm_service: Add read_only option (#53482)
* Add read_only option

* Add changelog fragment

* Add version_added

* Fix broken test
2019-03-08 03:34:49 -05:00
Jakob Ackermann
13ab9a61a8 [docker_image] fix the changed state for tagging and pushing (#53451)
* [docker_image] fix the changed state for tagging and pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add tests for (force) tagging and force pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add a news fragment for the fixed force tag/push behavior

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-03-08 08:28:42 +00:00
Matt Clay
36baf7d83a
Make ansible-test less noisy for change detection. (#53497)
* Make ansible-test less noisy for change detection.
* Set verbosity=2 for dependent file expansion.
2019-03-07 22:50:10 -08:00
S
3bc474bf99 Fixed win_file crash with hidden files (#52584)
* Fixed crash with hidden files

added "-force" parameter on "Get-Item" cmdlet. this is needed to get file info if the file is "hidden" 
without this option modules like win_file, win_template, win_copy crashes on hidden files. this is because with "test-path" it sees that the file exists, but "get-item" can't get the file info. 
for more information on "-force option": https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-item

* Add changelog and integration tests

* fix tests for older Windows versions
2019-03-08 15:32:32 +10:00
Chris Van Heuveln
cfe4477c10 nxos_vxlan_vtep: Add dependency checks (#53288)
* nxos_vxlan_vtep: Add dependency checks

Some of the N9k-specific attrs are failing due to hardware/feature/resources.

 * `global_suppress_arp`
   - dependency on TCAM resources

 * `global_mcast_group_L3`
   - hardware dependency on specific chassis/linecards
   - feature dependency on `ngmvpn`

 * `global_ingress_replication_bgp`
   - hardware dependency on specific chassis/linecards

Tested on N9k with/without TCAM resources, various N9k chassis, N7k, N6k. All 100% Pass.

* pylint
2019-03-08 10:33:54 +05:30
Jordan Borean
0f2041abbd test: fix get_url issues in CI for Ubuntu 14.04 2019-03-07 20:37:31 -08:00
Matt Clay
8535c05b29 Add ansible-test finally block after tests run.
This will record data from passing tests even when tests fail.
2019-03-07 18:31:02 -08:00
Jordan Borean
8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* Add support for Windows hosts in the SSH connection plugin

* fix Python 2.6 unit test and sanity issues

* fix up connection tests in CI, disable SCP for now

* ensure we don't pollute the existing environment during the test

* Add connection_windows_ssh to classifier

* use test dir for inventory file

* Required powershell as default shell and fix tests

* Remove exlicit become_methods on connection

* clarify console encoding comment

* ignore recent SCP errors in integration tests

* Add cmd shell type and added more tests

* Fix some doc issues

* revises windows faq

* add anchors for windows links

* revises windows setup page

* Update changelogs/fragments/windows-ssh.yaml

Co-Authored-By: jborean93 <jborean93@gmail.com>
2019-03-07 16:38:02 -08:00
Hannes Ljungberg
3d07e7241a docker_swarm_service: Documentation fixes (#53479)
* Document and validate mode choices

* Update examples

* Test cpu float values

* Test correct option

* Fix module return sample

* Add secrets and user to module return value

* Order options alphabetically

* Add changelog

* yaml indentation

* Revert "Order options alphabetically"

This reverts commit 51dabccda7.

* Be consistent with choices type
2019-03-07 16:51:59 -06:00
Jordan Borean
072fa54b50
win reg - Support special chars in path (#53305)
* win reg - Support special chars in path

* Added deprecation warning for path separators
2019-03-08 05:41:52 +10:00
Felix Fontein
e4f2e15b96 Trying to work around spurious test failures. (#53472) 2019-03-07 14:35:47 -05:00
Matt Clay
3907ea31f5 Rebalance docker_* integration tests. 2019-03-07 10:59:40 -08:00
Sam Doran
bf28b5ceca
Use distro.id() instead of distro.name() (#52199)
* Update sys_info unit tests

* Correct distribution values in hostname.py

* Normalize Rhel to Redhat
2019-03-07 13:25:59 -05:00
Ankit Bhansali
85ba4d7c73 itential iap_start_workflow module (#51238)
* initial commit

* fixed the linting and requests error

* updated test file setup

* updated code as per feedback

* updated test import

* updated test import with unittest

* updated validate certs for https

* updated after pep8 test

* removed under-construction remark

* Initial commit

* removed type for tests

* removed types and added ssl compatibility

* applied return type

* applied return type as dict instead of obj

* applied types in eact field

* tested with a playbook

* modified owner

* added unit test

* following pep8 guidelines

* added mock and unittest separately

* Sanity check using pep8

* added full path on patch
2019-03-07 13:23:40 -05:00
Matt Clay
1c780e79c6 Fix ansible-test junit timeout xml output. 2019-03-07 09:34:46 -08:00
Andrey Klychkov
b41027b6cd New module postgresql_tablespace (#52914)
* New module postgresql_tablespace
2019-03-07 16:27:20 +00:00
Felix Fontein
b2e992cecd openssl_csr: improve subject validation (#53198)
* Improve subject field validation.

* Add country name idempotency test.

* Add failed country name test.

* Add changelog.
2019-03-07 15:29:35 +00:00
Matt Martz
264d9a9008
Allocate an explicit stdin in async_wrapper (#53410)
* add changelog fragment

* Add stdin async test

* Allocate an explicit stdin in async_wrapper. Fixes #50758
2019-03-07 09:28:44 -06:00
Chris Van Heuveln
495bd02dbf nxos_evpn_vni: exclude legacy N3k from sanity test (#53452)
The test was only skipping N3K|N35, needs to also skip N3L (legacy n3048 chassis).
2019-03-07 18:39:47 +05:30
hexdump0x0200
4d407d1781 ios_logging: fix idempotence errors (#53109)
* ios_logging: fix the error checking the existence of "host" destinations (IOS 12)

In the "have" list, records of type "host" do not contain the key "size",
although in the list "want" it is always there. Because of this, the module
assumes that the "host" type destinations is not configured and does it again.
This does not change the configuration on the device, but is redundant and
the status of the task will always be "changed". This patch fixes it.

* ios_logging: fixes #53227

* ios_logging: minor changes in string matching
2019-03-07 17:40:03 +05:30
abirami-n
ce9fc9b912 opx_cps_changes (#51952) 2019-03-07 03:41:36 -05:00
ftntcorecse
be3fe8f364 FortiManager Plugin Module Conversion: fmgr_ha (#52768)
* Auto Commit for: fmgr_ha

* Auto Commit for: fmgr_ha

* Removed about 50 lines of validation in favor of "required_if" clauses.
2019-03-07 12:31:17 +05:30
Zim Kalinowski
16571ec8a6 Updating azure-mgmt-resource package version to 2.1.0 (#53437) 2019-03-07 14:55:28 +08:00
Zim Kalinowski
b906db5f2a
removed state present which is default (#53434) 2019-03-07 13:13:12 +08:00
Matt Clay
9ed9cfb40c Split Windows tests into 5 groups. 2019-03-06 20:52:17 -08:00
Matt Clay
3d2c0f4973
Fix ansible-test timeout junit output. (#53427)
Fix ansible-test timeout junit output.

Implemented a hack to work around not having junit-xml when running on Shippable outside of our test containers.
2019-03-06 19:46:41 -08:00
Matt Clay
156613f025 Fix coverage handling for non_local tests. 2019-03-06 16:30:37 -08:00
Matt Clay
77a03af394 Use sed instead of perl in assert test. 2019-03-06 15:11:47 -08:00
Felix Fontein
a904bc7797 improve docker_* test speed (#53417)
* docker_swarm_service tests: use 'resolve_image: no' to avoid registry lookup if image is up-to-date.

* Improve docker_node performance: don't sleep after last try.
2019-03-06 14:01:00 -08:00
Hannes Ljungberg
c563caf451 docker_swarm_service: Set minimum docker-py version to 2.0.2 (#53295)
* Fix version checks in tests

* Set minimum version to 2.0.2

* Networks can only be updated >= docker-py 2.7

* Constraints require docker-py 2.4.0

* Healthchecks require docker-py 2.6.0

* Properly run tests different docker_py_versions

* Add changelog fragment

* Specify lowest version on placement.constraints

* Fix running new tests on older docker-py

* Handle different hosts formats returned by docker

* FIx test naming

* Quote str options

* secrets options require docker-py 2.4.0
2019-03-06 20:50:05 +00:00
Yunge Zhu
5ef7b7d767 add azure role definition module (#52468)
* add role definition module

* fix sample

* fix lint

* fix lint

* add facts module

* fix lint

* disable test due to no owner permission

* use unsupported

* fix lint

* resolve comments

* fix not_xxx_actions
2019-03-06 11:09:54 -08:00
Sloane Hertel
9687879840
Fix inventory cache interface (#50446)
* Replace InventoryFileCacheModule with a better developer-interface

Use new interface for inventory plugins with backwards compatibility

Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin

* Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader

* Fix foreman inventory caching

* Add tests

* Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins

* Add some developer documentation for inventory and cache plugins

* Add user documentation for inventory caching

* Add deprecation docs

* Apply suggestions from docs review

* Add changelog
2019-03-06 12:12:35 -06:00
Brian Coca
b94bfed1a6
scan_packages: made adding package managers easier (#49079)
* made adding package managers easier

  added portage support

* moar pkg mgrs and moar info

 - added 'pkg' pkg manager (freebsd)
 - added pip
 - more apt info

* updated clgo

* Updates from feedback

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>

* incorporated more feedback and added docstrings

* moar from feedback

  - made manager list dynamic and names based on class
  - better not found msg
  - made abstract metaclass again
  - test is now init exception
  - module to global
  - better dedupe comments

* more targetted errors/warnings

* added strategy, reordered to conserve priority

* rpm > apt

* move break to top

* fix trate

* piping it

* lines and meta

* refactored common functions

 - moved pip into it's own module
 - cleaned up base clases
 - ensure 'lower' match in package_facts

* missing license

* avoid facts

* update clog

* addressed feedback

* fix clog

* cleanup

* upd

* removed pip as that was removed

* renamed cpan

* added a single line since 2 lines are needed to be

readabnle instead of just 1 line, it is a huge problem otherwise

* fix internal ref

* not intended in this round

* updated as per fb
2019-03-06 12:29:51 -05:00
Anil Kumar Muraleedharan
77565554c8 To fix bug on switch port issue of L3 interfaces. (#53267)
* To fix bug on switch port issue of L3 interfaces.

* Adding mock return value for is_switch_port method
2019-03-06 12:08:53 -05:00
Brian Coca
d241794daa
Add toggle to control invalid character substitution in group names (#52748)
* make add_group return proper name
* ensure central transform/check
* added 'silent' option to avoid spamming current users
  those already using the plugins were used to the transformations, so no need to alert them
* centralized valid var names
* dont display dupes
* comment on regex
* added regex tests
  ini and script will now warn about deprecation
* more complete errormsg
2019-03-06 11:49:40 -05:00
René Moser
4ac317239c
cloudscale_server: fix missing param use_private_network (#53381) 2019-03-06 16:22:15 +01:00
Dag Wieers
c44e83ee13 rhevm: Fix validate-modules issues (#52436)
This PR includes:

* Adding parameter types
* Fix validate-modules issue
* Improve parameter types and resulting changes

This PR needs to be verified and tested by maintainer(s).
2019-03-06 14:05:14 +00:00