Commit graph

43468 commits

Author SHA1 Message Date
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
Brian Coca
90bcff3d92
allow nontype configdata (#53365) 2019-03-08 13:03:46 -05:00
Hannes Ljungberg
25a8e47783 Order options alphabetically (#53511) 2019-03-08 11:51:37 -05:00
Pierre-yves Fontaniere
1dba160d9d Adds SKU to properties returned by get_system_inventory (#53464) 2019-03-08 16:22:43 +00: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
Masaki Furuta
ba3345b52b Make "absent" runnable with specifying NVR in DNF module. (#53206)
* Make "absent" runnable with specifying NVR in DNF module.

* Fix indent and comment.

* Adjust indent.

* Fix removing multiple packages with NVR.

* Replace nevra_strict with nevra , since it's not included in libdnf on Fedora 28.
2019-03-08 09:48:18 -05:00
bhavikbhavsar
bcb2f59458 Minor Undefined variable fixes (#53383)
Signed-off-by: Bhavik Bhavsar <bbhavsar@redhat.com>
2019-03-08 08:35:13 -05:00
Nijin Ashok
5a4940d197 ovirt_vnic_profile: Fix issue in resetting the network filter (#53392)
Currently, there is no way to reset the network profile of vNIC profiles
to "No Network Filter". To reset the vNIC profile, we have to pass an
None value to "types.NetworkFilter". The patch allows to reset it by
passing empty string ('') to "network_filter".
2019-03-08 07:54:55 -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
John Wesley
853f65059a Warn user to send a password if the privatekey is password protected (#53360)
* Warn user to send a password if the privatekey is password protected

* Edit openssl_cert doc change

* remove trailing whitespace

* update openssl_csr doc to warn user of private key passphrase requirement.

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

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

* grammer correction, privatekey => private key
2019-03-08 08:24:54 +00:00
Timo Runge
b45b599433 Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#53445)
* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#1)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191)

* Adding changelog fragment for issue #49191 and the following PR.

* Update lib/ansible/module_utils/mysql.py

Co-Authored-By: timorunge <timorunge@users.noreply.github.com>
2019-03-08 08:21:56 +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
Shivam Singhal
f08a26d77b Fixes typo of dicionaries to dictionaries (#53505) 2019-03-08 07:28:39 +01: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
Abhijeet Kasurde
a5d3647eca
include_vars: include main.yml (#51926)
Enhance the conditional check to include main.yml if it is not
from 'role/vars/'

Fixes: #29135

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-08 10:03:01 +05:30
synical
f470736476 ipa_dnsrecord: Add SRV and MX record type (#42482)
* Add dnsrecord_show method for supporting base domain record
* Replace dnsrecord_show with conditional in dnsrecord_find
* Added changelog entry for MX and SRV

Signed-off-by: synical <sjohnsondot@gmail.com>
2019-03-08 09:48:00 +05:30
thefaftek
b9ec7bb253 VMware: fail module when unable to find the user specified folder (#53474) 2019-03-08 09:39:55 +05:30
Gonéri Le Bouder
6421e89e23 docs: refresh testing_integration.rst (#53338)
* docs: refresh testing_integration.rst

Ensures the examples can be run:
- fedora25 is not available anymore, use fedora29 instead
- the posix/ci alias does not exist anymore, use shippable/posix/ instead
- explain how to list the target without argcomplete

* ansible-test should be in $PATH
* call ansible-runner from bin/, not test/runner
* we don't use credentials.template anymore, we use a collection of .template files.
* low-case bash bc we refresh to name of the binary
* refresh the command of Windows-CI example
* Update docs/docsite/rst/dev_guide/testing_integration.rst

Co-Authored-By: goneri <goneri@lebouder.net>
2019-03-07 20:43:04 -06: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
decentral1se
cdf475e830 Fix ssh_keys: ... docs example for hcloud_server (#53466)
Signed-off-by: Luke Murphy <lukewm@riseup.net>
2019-03-07 18:34:12 -05: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
008db85d44
win_domain: fix issue when running without credential delegation (#53480)
* win_domain: fix issue when running without credential delegation

* Add check for reboot is required to complete role e install

* Fix changelog sanity issue

* removed meta file accidentally committed
2019-03-08 08:44:12 +10:00
Maxim Babushkin
bf58f84167 Add port_security_enabled argument to os_port module (#47715)
Port security could be set during creation of the port on the network.
Add port_security_enabled boolean during port creation.
2019-03-07 14:56:50 -05: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
Brian Coca
efd5222c17
fix locals not getting updated (#41798)
* fix locals not getting updated

switched to updating the args/assignments as locals doesn't work

* add missing import
2019-03-07 13:38:07 -05:00
Chris Archibald
106c7885b8 Fix Examples with bad options (#53279)
* 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.

* documentation changes

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* Doc updates

* fix doc
2019-03-07 13:35:50 -05: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 Martz
728970232e
Properly quote the username to support usernames with spaces (#53420) 2019-03-07 11:47:33 -06: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
Brian Coca
b0ddb88f13 fix non bool path 2019-03-07 11:23:07 -05: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
Nathaniel Case
72eb8672bf
Don't fail if ConnectionError has no code (#53455)
Fall back to normal error handling instead
2019-03-07 10:04:08 -05:00
James Cassell
e55e8fe2c4 regex_escape: support POSIX basic regex (#50327) 2019-03-07 08:51:19 -05:00
Chris Van Heuveln
874fd70d10 httpapi/nxos_facts: raise ConnectionError is missing code (#53406)
* `nxos_facts` crashes with certain nxos images; e.g. `7.0(3)I7(3)` as a result of this call:
  ```
        data = self.run('show lldp neighbors', output='json')
  ```
  ...which returns `ERROR: No neighbour information` when the device has no neighbors.

* This response causes httpapi's `handle_reponse()` to raise a ConnectionError, which is caught by `utils/jsonrpc.py` which is expecting `code` in the exception data:

  ```
             except ConnectionError as exc:
                 display.vvv(traceback.format_exc())
                 error = self.error(code=exc.code, message=to_text(exc))
  ```

* Found by: `nxos_facts/tests/common/not_hardware.yaml:7`
2019-03-07 08:16:28 -05:00
Chris Van Heuveln
fd6e45bc75 nxos_user: fails to remove usernames with embedded '\' (#53149)
Example: username ucs-DOMAIN\\x password 0 foo

Found by `common/sanity` test.
2019-03-07 18:45:26 +05:30