Commit graph

3439 commits

Author SHA1 Message Date
Paul Belanger
94e007ed77 ansible-test: use become for connection=local on ios_user (#56960)
ios_user requires escalated privledges, rather then doing this in the
inventory, we can just add it into the playbook tasks.

Also add missing provider settings for authorize.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-28 17:38:36 +05:30
Felix Fontein
d8dcd20294 docker_container: fix container creation with networks_cli_compatible=yes (#56687)
* Fix behavior.

* Add changelog.

* Add simple test to prevent #56620.
2019-05-28 03:19:52 -04:00
Andrey Klychkov
baac1df935 New module mysql_info - Gather information about MySQL servers (#55434)
* New module mysql_info: collect info about MySQL server instance

* mysql_info - CI tests

* mysql_info: fixes

* mysql_info: fixes Decimal

* mysql_info: fixes Decimal converters.py

* mysql_info: fixed err conn message and check_mode

* mysql_info: added decimal.Decimal to lib/ansible/parsing/ajson.py

* mysql_info: convert Decimal to float

* mysql_info: fix

* mysql_info: fix

* mysql_info: returned the args list as it was

* mysql_info: fix typo

* mysql_info: fixes

* mysql_info: removed aliases for login_db

* mysql_info: changed RETURN condition info

* mysql_info: fixed doc

* mysql_info: fixed role's parsing

* mysql_info: fixed role's parsing

* mysql_info: fixes

* mysql_info: fixed integration tests
2019-05-28 09:10:12 +02:00
Paul Belanger
89b73cb535
ios_ntp: Switch interface to GigabitEthernet0/1 for tests (#56964)
* ios_ntp: Switch interface to GigabitEthernet0/1 for tests

Lets use an interface we know that exists for testing, in some cases
Loopback0 maybe not be configured.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>

* ios_ntp: properly register result variable for testing

This is currently broken, and tests don't work. Fix this by properly
registering the result variable.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-27 13:11:58 -04:00
Felix Fontein
7a0af34ba9
First batch _facts -> _info rename. (#56822) 2019-05-27 18:17:42 +02:00
Paul Belanger
4f8abde081 Fix syntax issue with ios_ntp tests (#56958)
This was missing a yaml anchor.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-27 19:51:07 +05:30
Lukas Kämmerling
7f08de6b6c hcloud_volume attach step should be idempotent (#56906) 2019-05-27 07:48:48 +02:00
Paul Belanger
d7f4f886f8 ansible-test: ios_command cli test should only be network_cli (#56955)
We do not support testing under ansible_connection=local

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-27 10:04:02 +05:30
SirFerdek
6a50c6aae4 docker_network: Integration tests for IPAM config idempotence (#56975)
Integration tests for pull request #56901 which fixes found issues with idempotence.
2019-05-26 16:41:06 -04:00
Brian Coca
30210e7de0
added tests for log_plays (#56811)
* added tests for log_plays

* grep for warning

* Update tests to work with ansible-test.
2019-05-24 12:24:31 -04:00
Nathaniel Case
7834da41ff
Move eos l3 test IP addresses to documentation ranges (#56726) 2019-05-23 21:22:27 -04:00
Gonéri Le Bouder
6bb21c3db0 vmware: test-refactoring
- In order to keep the integration with `ansible-test`, we prefer to avoid any
  interaction with the Ansible inventory file.
- split up the prepare_vmware_tests/defaults/main.yml in two
  configuration files: one for vcsim and one for a real environment
- remove all the access to hostvars
- directly interact with the ESXi to mount/umount the datastore
  https://github.com/ansible/ansible/pull/56516
- record the virtual machine folder in the environment configuration
- vmware_guest_move: Use https://github.com/ansible/ansible/pull/55237
2019-05-23 17:40:19 -04:00
Gonéri Le Bouder
8cee127ee4 vmware_host_datastore: ability to target a ESXi
Until now, the module was only able to interact with vcenter. This
commit adds the ability to directly target an ESXi without the
`esxi_hostname` parameter.
2019-05-23 16:01:22 -04:00
Sam Doran
8f4f3750fe
Ensure uri module always returns status even on failure (#56240)
- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
2019-05-23 10:17:17 -04:00
Brian Coca
1da47bfa8c
Prevent vars premature templating (#56117)
Avoid premature vars templating
  * added tests
  * avoid 'is template' warning in vars, since we want them for latter templating
2019-05-23 09:42:19 -04:00
Abhijeet Kasurde
26d38dd642 VMware: Add folder param in vmware_datastore_cluster
* Make datacenter as alias and optional
* Add folder param to place datastore cluster in specific folder
* Updated examples
* Updated tests

Fixes: #48010

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-23 09:12:10 -04:00
Nathaniel Case
cebb363fcc eos_l2_interface handle "Interface does not exist" (#56787)
* Quick and dirty attempt to handle eapi error

* Well this should probably change

* Hopefully this works correctly?

* Fix check_rc handling with httpapi

* Add tests that should hopefully cover the error

* Fix warnings

* Improve tests
2019-05-23 17:02:46 +05:30
Jordan Borean
124400f319 win_get_url: ignore defender false positive in tests (#56812) 2019-05-22 23:16:47 -07:00
tknipper11
54aa6f3921 ACI CDP Interface Policy Module Creation (#54818)
* initial commit

* Fix typo in integration test which caused an assertion to fail

* Updated integration testing

* Fix Ansible Sanity Errors

* Changed version added to 2.8 from 2.9

* added from __future__ import absolute_import, division, print_function
__metaclass__ = type
2019-05-23 00:47:44 +02:00
Yunge Zhu
831d3c7b62 add azure_rm_keyvault_info (#55497) 2019-05-23 03:39:37 +08:00
Brian Coca
69b2d7e0f3 fix collection adjacent loading with --playbook-dir (#56194)
* added inventory adjacent test
2019-05-22 11:06:54 -04:00
Dag Wieers
4f89c1d508
Revert "ACI: Implement encoded query_string" (#56783)
This reverts commit 1690af04fe.
2019-05-22 15:44:22 +02:00
Abhijeet Kasurde
459776eb82
VMware: Add folder option for vmware_dvswitch (#56707)
* Added folder param
* Mark datacenter as optional parameter
* Updated docs
* Updated tests

Fixes: #54986

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-22 11:40:09 +05:30
Will Thames
4065692e13 k8s minor bug fixes (#56168)
Ensure `wait_condition`s with `Status: Unknown` actually
complete

Return k8s object after wait rather than k8s object before
wait when object is patched.
2019-05-22 08:08:22 +02:00
Martin Krizek
77f997474a yum: use Custom Group in integration tests (#56439) 2019-05-21 11:32:36 -04:00
Jakob Ackermann
3b4b2e5021 [docker] support the lookup of images by digest (#56649)
* [docker] images: add support for lookup by sha256 digest

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

* [tests] docker image by digest: work on a minimal test case

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

* [docker] group branch conditions per lookup

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

* [misc] add a news fragment for the added digest lookup for docker images

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-05-21 02:54:05 -04:00
Will Thames
8e1dd58c2b Allow python_requirements_facts to cope with packages with dashes (#56166)
* Allow python_requirements_facts to cope with packages with dashes

```
python_requirements_facts:
  dependencies:
    - kubernetes-validate
```

should work as expected

* Ensure tests run for python_requirements_facts
2019-05-20 23:38:50 -04:00
The Magician
b712b01f6e Bug fixes for GCP modules (#55973) 2019-05-20 14:44:29 -04:00
The Magician
8d82df56ff Bug fixes for GCP modules (#55974) 2019-05-20 14:44:14 -04:00
The Magician
d4b29e7838 Bug fixes for GCP modules (#55975) 2019-05-20 14:43:57 -04:00
The Magician
e598eeeebe Bug fixes for GCP modules (#55977) 2019-05-20 14:43:37 -04:00
Zim Kalinowski
b37ae35ba0 azure_rm_azurefirewall (#56359)
* azure_rm_azurefirewall

* a few updates

* fixed mistake

* updated docs, fixed syntax

* updated priority

* use checkmode for idempotence test, as it's very long

* fix check mode
2019-05-20 10:38:55 -07:00
Matt Martz
576593e175
Whitelist listen as a valid keyword on TaskInclude (#56586)
* Whitelist listen as a valid keyword on TaskInclude. Fixes #56580

* Move 'listen' to HandlerTaskInclude

* Remove trailing newline
2019-05-17 12:52:39 -05:00
Nathaniel Case
63e33f7e71
Fix eos_l2_interface idempotency (#56531)
* Attempt to handle just mode trunk properly

* Add test for trunk-only config and clean up tests

* Add missing eapi tests and remove references to provider as we do not test local
2019-05-17 13:06:27 -04:00
Lukas Kämmerling
6c1a255d98 Fix hcloud tests 2019-05-17 07:25:25 -07:00
Martin Krizek
c6b40f4d40
register: fail when invalid var name is specified (#56456) 2019-05-17 11:02:03 +02:00
Yuwei Zhou
6c1dbbe554 Fix the test syntax (#56557) 2019-05-17 13:41:30 +08:00
Kevin Breit
2a187f362a meraki - Unchanged requests now return the original data (#53576)
* Unchanged requests now return the original data

* Add changelog fragment

* Add integration tests for returned data for meraki_network

* Add integration tests for returned data

* Improve idempoetent output
- Make MX l3 rules always show default rule
- Add integration tests

* Add integration tests for returned data on meraki_network

* Improved idempotency in a few modules and improved tests
2019-05-17 08:34:16 +05:30
mjmayer
c8e179fbf1 Aws waf region (#48953)
* Add waiter for AWSRegional

* Add support for WAF Regional

* Add support for regional waf web acl

* Remove set_trace, pep formatting

* Add paginator for regional_waf

* Change name of param for waf_regional

This is more in line with how AWS refers to the service. Additional
 changes made to how client is called. Used ternary to reduce if
 statements

* Change parameter name to waf_regional

* Add support for removal waf regional condition

* Change parameter from cloudfront to waf_regional

* Added state: absent waf rule

* Remove set_trace

* Add integration tests for waf regional

* WIP: adding region parameter to tests

* Add support for waf facts module

* Add region to waf regional integration tests

* Update security policy for waf regional testing

* Add type to documentation for waf_regional param
2019-05-17 10:36:14 +10:00
s-hamann
730456b402 Add seed parameter to random_mac filter (#51841) 2019-05-16 13:41:08 -04:00
Kevin Breit
d59eb9edab meraki_switchport - Improve reliability (#54275)
* Rewrite much of the execution of meraki_switchport
- Previous versions had problems with idempotency and allowed_vlans

* Modified payload creation
- Parameter map is used
- propsed is created using .copy()
- Much cleaner this way

* Add whitespace for lint

* Add bugfix snippet for changelog
2019-05-16 12:10:32 -04:00
Matt Martz
4b0014166b Bump erlang ping to 1:20.3.8.18-1 2019-05-16 11:35:54 -04:00
Andrey Klychkov
75046f8410 postgresql_db: added tablespace support (#56390) 2019-05-16 12:13:40 +02:00
David Hewitt
50e9955a23 VMware: Add new module vmware_folder_info (#54344)
* Adds a new vmware module to support getting the folders and their paths within a datacenter
* Add integration tests
* Bump version added
* Refactor integration test
* Improve grammar in docs
2019-05-16 14:18:07 +05:30
Kevin Breit
322cfa49d0 Meraki - Add check for auth_key parameter (#56199)
* auth_key parameter is required
- This will have to change when httpapi is implemented

* Add integration test

* Add assertion

* Enable VLANs on network

* Add required for auth_key
2019-05-15 11:45:07 -04:00
Paul Belanger
fa7aedc4c3 Remove hardcoded ansible user for junos_user integration tests (#56452)
It is possible we are using a different username then 'ansible' for
testing junos. By using ansible_user_id, this should be a more dynamic
check.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-15 11:09:09 -04:00
Abhijeet Kasurde
8ce09a0057 VMware: fix inventory plugin (#56431)
* Fixed regression introduced in #56071
* Added test to check if hostvars are populated
* Fix toml installation logic

Fixes: #56413

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-15 10:15:49 -04:00
Adam Miller
666dfdc551 YUM - handle enable of non-existent repo (#53286) 2019-05-15 08:45:54 +02:00
Abhijeet Kasurde
5ef2c5314e Fixed error handling in github_issue module (#39652)
* Fixed error handling in github_issue module

Due to recent changes in github3.py library module stopped working.
This fix adds extra error handling for new changes in library.

Fixes: #39627

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

* Check version

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

* Refactor github_issue

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-15 02:35:11 -04:00
ShachafGoldstein
8e2bff407a Change S3 bucket urls to new method as per #56124 (#56418)
* Change S3 bucket urls to new method as per #56124

* duplicate / and dded changelog fragment

* Revert "duplicate / and dded changelog fragment"

This reverts commit b89d5cbe6d.

* duplicate /
2019-05-14 20:50:56 -04:00