Commit graph

5117 commits

Author SHA1 Message Date
Matt Davis
7f4328ad12
allow external collections under the ansible NS (#61908)
* fixes #59988
2019-09-05 18:50:22 -07:00
Mark Chappell
832e03d932 Fixup iam_group integration tests and return value documentation (#61243)
* iam_group: (integration tests) migrate tests to module_defaults

* iam_group: (integration tests) migrate to using temporary user and group with {{ resource_prefix }}

* iam_group: (integration tests) fix test, checking the return values

* iam_group: (integration tests) Add some more tests around the behaviour of 'changed'

* iam_group: (docs) Update documentation of iam_group return value

* Update AWS testing policies to enable group/user management
2019-09-05 19:25:36 -04:00
Mark Chappell
cbe511de1f ec2_vpc_subnet test cleanup (#61663)
* aws_vpc_subnet: (integration tests) migrate to module_defaults

* aws_vpc_subnet: (integration tests) remove hard coded assumption that AZ A exists.

While Amazon now tends to enable all AZs in a region, new customers in us-west-1 are only assigned 2 out of the 3 AZs, which might not include AZ a

* ec2_vpc_subnet: (integration tests) General cleanup

- use "is changed" rather than .changed
- clean up labelling of a couple of assertions (C&P fail)
2019-09-05 15:56:54 -07:00
Jill R
d49d52eb5f
Add tests for new alias deprecation functionality (#61476)
* Add tests for the alias deprecation added in #61245
2019-09-05 15:47:42 -07:00
Sumit Jaiswal
1425d23513 To fix IOSXR L3 Interfaces idempotency failures (#61860)
* fix zuul idemptency failures

* adding eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-05 16:39:15 -04:00
gen2kes
513bddb44a VMware: Add disk_mode parameter in vmware_guest_disk (#60406)
* Solve issue 58592

Added support to select disk_mode.
2019-09-05 11:52:12 -04:00
Gonéri Le Bouder
08e01380e6 azure_rm_iothub: disable the functional test (#61854)
The test fails with: Operation failed with status: 'Unauthorized'
This commit disable the test until the situation is resolved.

See: https://github.com/ansible/ansible/issues/61852
2019-09-05 11:03:12 -04:00
Gonéri Le Bouder
7132466327 test: disable the docker swarm tests (#61816)
`docker_swarm` tests tend to hang during the creation of the Swarn
cluster.

See: https://github.com/ansible/ansible/issues/61815
2019-09-05 10:47:31 -04:00
Sam Doran
173d47d1f4 Rebalance Azure tests groups 2019-09-05 09:28:26 -04:00
Mark Chappell
adfaefb732 ec2_launch_template: Fix integration tests (#61260)
* ec2_launch_template: (integration tests) make sure security_token is optional

* ec2_launch_template: (integration tests) add dependencies at the top level so they're pulled into the docker containers

* Update Hacking Compute Policies for Launch Templates
2019-09-04 15:33:01 -04:00
Sloane Hertel
d5c8d325e4 codebuild/codepipeline - fix regex for shippable resource_prefix (#61783)
* Fix bad assumption about shippable resource_prefix for codebuild and codepipeline tests
* Update test/integration/targets/aws_codepipeline/defaults/main.yml
2019-09-04 12:48:37 -04:00
kucharskim
1dea661ce8 Allow 13 asterisk characters in password field without warning (#54893)
On OpenBSD, 13 asterisk characters as a password hash, marks the
account as disabled. Otherwise daily(8) script which executes
security(8) will email operator about not properly locked accounts.

Before the diff, we see following warning:

> [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

After the diff, warning is gone.
2019-09-04 11:49:16 -04:00
Sloane Hertel
9ee0deea24 aws_codebuild tests - add retries and delay instead of a pause task (#61731)
- Add retries instead of a pause task
- Shorten the IAM role name length
- Put the IAM role name in defaults/main.yml instead
- Fix the aws_codepipeline tests too
2019-09-04 09:59:35 -04:00
Sumit Jaiswal
2672dc9694
Fixes IOS L3 intermittent zuul failure (#61682)
* fix ios l3 intermittent failure

* fix self

* dict to ordered dict

* fix diff_again fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* remove orderdict as its expensive

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* update verify fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-04 15:51:05 +05:30
Tim Rupp
2ebeadfc14 Migrate ec2_eip module to boto3 (#61575)
* Migrate ec2_eip module to boto3

This patch is a step towards the integration of several PRs that have
attempted to migrate this code

closes #55190
closes #45478

Follow-up PRs will address the outstanding changes made in #55190
2019-09-03 22:46:29 -04:00
Jordan Borean
00add5b668
Set win_pagefile as unstable as thats what it is (#61732) 2019-09-04 12:29:29 +10:00
John McDonough
86b38a0ead Add ucs_query (#60607)
* Add ucs_query

* fix sanity erros

* Change version_added to 2.10
2019-09-03 21:34:46 -04:00
Simon Legner
7dbd6116d8 Fix typesetting of "GitLab" (#61702) 2019-09-03 09:22:26 -05:00
Guillaume Leroy
21b101f8e1 add option to define keysize at luks partition creation (#61522)
* add option to define keysize at luks partition creation

* Bump version_added.

* Extend tests.
2019-08-31 19:32:41 +02:00
Felix Fontein
4d057e0331
Make sure postgresql tests are run for all postgres_* modules (#61647) 2019-08-31 18:12:40 +02:00
Sumit Jaiswal
24ad1dffc9 To fix iosxr_l3_interfaces module zuul tests (#61592)
* fix 61540

* fix utils
2019-08-30 19:36:15 -04:00
René Moser
fd4ff54580 apt: honor cache_update=false on auto-install deps (#56549)
* apt: honor cache_update=false on auto-install deps
* add porting guide
2019-08-30 15:57:58 -04:00
Mark Chappell
35359959de aws_codecommit: Fix integration tests and Add support for updating the description (#61263)
* Update DevOps AWS policy
- Fix typos in permission names
- While AWS claims you can use 'arn:aws:codecommit:*' it errors unless you use '*'

* aws_codecommit: (integration tests) Migrate to module_defaults

* aws_codecommit: (integration tests) Fix integration tests

* aws_codecommit: (integration tests) Add tests for updating the description

* aws_codecommit: Add support for updating the description and rename "comment" option to "description"
2019-08-30 11:25:37 -07:00
Sloane Hertel
0c2590d3df Run ec2_vol_facts integration tests in CI (#48755)
Filter owner aliases by 'amazon' since amazon marketplace may not be activated
2019-08-30 08:47:32 -07:00
Jordan Borean
951dac7691
Azure fix _info/_facts return values for some modules (#61584)
* Azure fix _info/_facts return values for some modules

* Further test fixes

* securitygroup fixes after the move to _info module
2019-08-30 16:00:47 +10:00
Jordan Borean
3bd69a47ec
Skip certain tests on 2016 (#61585) 2019-08-30 14:59:00 +10:00
Mike Wiebe
02572cb9ec Rewrite nxos_file_copy as an action plugin (#60643)
* Initial nxos_file_copy action plugin work
* Remove code from nxos_file_copy module
* Add file_push and file_pull support
* Additional refactoring and shipable updates
* Simplify outcomes and update doc header
* Add more error data information for easier debugging
* Reorder outcomes and add additional tests
* Capture more data for permission denied outcome
2019-08-29 12:57:39 -07:00
Ganesh Nalawade
b03fc093b4
Rename junos_lldp_global enable option to enabled (#61551)
*  Change `enable` option to `enabled` option to be in
   sync with other platforms
2019-08-29 22:32:48 +05:30
Toshio Kuratomi
68fa03138c Revert "New Module: NetApp Account (#59939)"
This reverts commit 6a8dcb8fcb.

Reverting this as it breaks CI for azure (more permissions would be
needed for our account)
2019-08-29 09:04:48 -07:00
Chris Archibald
6a8dcb8fcb New Module: NetApp Account (#59939)
* netapp account module for azure

* netapp account module for azure

* fixes

* fixes

* add requirements

* add requirements

* fix issues

* add units

* add units

* updates

* updates

* fixes

* fixes

* fies

* fixes
2019-08-29 11:25:20 -04:00
Diane Wang
54b108175b VMware: add support for multiple CD-ROMs (#51120)
Add support for create or re-configure VM with multiple CD-ROMs attaching to IDE controller now, will implement SATA controller support later.
parameters can be set as below:

    cdrom:
    - controller_type: ide
      controller_number: 0
      unit_number: 0
      type: client
2019-08-29 10:56:33 -04:00
Felix Fontein
0c592c8225
CloudStack modules: rename _facts -> _info (#61090)
* Rename cloudstack _facts -> _info

* Add changelog.

* Fix errors due to overloaded get_result having different parameter names.

* Fix examples.

* Change debug tasks.

* Remove unneeded code.

* Change from rename -> deprecate+new module.

* Make cs_zone_info return a list.

* Make cs_instance_info return a list.

* Fix return value docs.

* Fix typo.

* Improve tests.

* Fix cs_zone_info.

* Linting.

* Fix alias/option switch.

* Fix version numbers.

* Extend docs.
2019-08-29 16:14:51 +02:00
René Moser
9b5528ab8e
cloudscale_volume: refactor to implement tags support (#61531) 2019-08-29 16:08:54 +02:00
Sumit Jaiswal
4d73c7b397
Resource module for iosxr_l3_interfaces (#60464)
* iosxr_l3_interfaces module
2019-08-29 17:58:48 +05:30
Matt Clay
032bd3a030 Move the ansible-test output_dir.
This directory is currently a fixed location to make troubleshooting easier.
It is cleared before each test target runs, but is preserved when a test target finishes.
This allows the contents to be inspected when a test fails.

The previous location was `~/ansible_testing/`.
The new location is within the content root:

- `test/results/.tmp/output_dir` for Ansible
- `tests/output/.tmp/output_dir` for Ansible Collections

Moving the directory reduces the number of places on the filesystem where tests create output.
It also enables the results to be returned from delegated systems.
2019-08-29 02:32:31 -07:00
Matt Davis
d81ae27a4a
Collection role relative deps (#61517)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* disable default collection test under Windows

* enable collection search for role dependencies

* unqualified role deps in collection-hosted roles will first search the containing collection
* if the calling role has specified a collections search list in metadata, it will be appended to the search order for unqualified role deps

* disable cycle detection unit test

* failing on 3.7+, needs proper cycle detection
* see #61527
2019-08-29 02:25:44 -07:00
smile37773
7bb0556334 Rename Azure modules: facts -> info (#61505)
* rename

* add symlink

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename
2019-08-29 17:00:45 +08:00
Matt Clay
d92e2a6b0e
Simplify ansible-test target processing. (#61506)
* Clean up layout paths for integration tests.

* Remove "special" integration test target type.

* Remove unnecessary role detection logic.

* Remove support for non-sh runme scripts.

* Simplify reading of aliases.
2019-08-28 22:18:20 -07:00
Chris Van Heuveln
f890c9692f nxos_bfd_interfaces: new module (#61407)
* bfd_interfaces: initial commit

* fix state methods, add more UT

* Add integration tests, support for N6K

* minor comment cleanups

* lint 1

* lint 2

* lint 3

* lint 4

* lint 5

* retrigger shippable

* retrigger shippable

* PR review updates: /bfd_echo/echo/, updated tests

* fix overridden logic and integration test
2019-08-29 09:36:10 +05:30
James Cammarata
51b33b79c0
T woerner max concurrent (#60702)
* play, block, task: New attribute forks

With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.

The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.

A warning has been added because of the conflict with run_once. forks will
be ignored in this case.

The forks limitation in StrategyBase._queue_task is not used for the free
strategy.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Handle forks in free strategy

The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Test cases for forks with linear and free strategy

With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Changing forks keyword to throttle and adding some more docs
2019-08-28 18:47:39 -05:00
Matt Davis
7d1a981b61
default collection support (#61415)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* ignore bogus sanity error

* filed #61460

* fixed task unit test failure

* don't append an empty collections list to the ds

* ignore leftover local_action in mod_args ds action parsing

* fix async_extra_data test to not require ssh and bogus locale

* disable default collection test under Windows

* ensure collection location FS code is always bytes

* add changelog
2019-08-28 16:31:40 -07:00
robertchung
caa5abdfc9 Fix TypeError in ec2_group.py for Python3 when sorting dictionary list (#59844)
* Fix TypeError in ec2_group.py for Python3 when sorting dictionary list

* Using json.loads() and dumps() to replace sorting

* Bug fixes for ec2_group.py

* Dictionaries cannot be compared/sorted in Python3

* Diff will occur when the IpPermissions have the same IpRanges but have different ordering

* 'before' will be sorted by 'Type' with high priority than 'IP', but 'boto3.describe_security_groups()' function cannot get 'Type' from Amazon

* Add some basic diff mode testing to exercise the rule-sorting code
2019-08-28 16:28:42 -07:00
Chris Trufan
44c18b544f Addition of ECS_Certificate Module (#60883)
* Addition of ecs_certificate module.

* Documentation and code fixes

* Updates per code review

* Doc fixes, rename of chain_path to full_chain_path, add regex for cert_Expiry check

* Fixes to pep8 check to make regexp string 'raw'.

* Mistakes with find/replace of caseing.

* Added integration tests and some doc cleanup

* Some additional assertions and test typo cleanup

* Update lib/ansible/modules/crypto/entrust/ecs_certificate.py

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

* Responses to code review comments

* Remove fake passwords from aliases file.
2019-08-28 23:38:48 +02:00
Nathan Swartz
1d9b473e56 Add netapp_e_firmware module (#59529)
* Add na_santricity_firmware module.

Manages NetApp E-Series firmware upgrades.
Includes unit and integration tests.

* Add legacy support to na_santricity_firmware module.

* Rename na_santricity_firmware to netapp_e_firmware

* Improved netapp_e_firmware example documentation.
2019-08-28 17:17:35 -04:00
Nathan Swartz
f02a62db50 Add netapp_e_drive_firmware (#59528)
* Add na_santricity_drive_firmware module

Manage NetApp E-Series drive firmware downloads
Includes unit and integration tests

* Rename na_santricity_drive_firmware to netapp_e_drive_firmware
2019-08-28 17:15:19 -04:00
Ujwal Komarla
5e200f2d0a Resource Module for exos_lldp_global (#60988)
* Model->Role->Module.
Yet to import modules/exos_facts.py

* exos_facts refactor

* future-import and metaclass

* Fix unit tests

* Fix openconfig-lldp word and send_request API from Httpapi class

idempotent, json.dumps in base class, send_requests from base exos class

* action file for exos_lldp_global

* Add intergration tests for exos_lldp_global

* Test data field of the request
2019-08-28 13:58:45 -04:00
Nathaniel Case
841d204d0d
Fixes #61244 (#61432) 2019-08-28 13:53:33 -04:00
Sam Doran
58edfec145
Add listen_port_facts module (#61463)
Co-authored-by: Nathan Davison <ndavison85@gmail.com>
2019-08-28 13:16:13 -04:00
Nathaniel Case
a7a053defc
New module eos_lacp_interfaces (#61349)
* Prepare for lacp_interfaces.

* Import module from builder

* Implement facts

* Implement config

* Add tests
2019-08-28 13:06:45 -04:00
Diane Wang
d987dca2b1 VMware: vmware_guest_screenshot module fix get_parent_datacenter issue (#60626)
Fix get_parent_datacenter not found issue, and change "local_path" parameter to "path" type.

closes: #60565
2019-08-28 13:04:30 -04:00
Nathan Swartz
8ebed4002f Add tray/drawer loss protection preference and integration tests to netapp_e_storagepool module. (#60151) 2019-08-28 12:02:46 -04:00
Nathaniel Case
95ecf24b87
New module eos_lldp_interfaces (#61341)
* Prepare existing files for lldp_interfaces

* Initial commit of scaffolding

* Implement facts

* Implement config

* Add tests

* Appease Shippable
2019-08-28 11:56:43 -04:00
Ruturaj Vyawahare
f872c61712 Added integration tests for the following modules: (#55523)
- exos_facts
- exos_command
- exos_config
2019-08-28 10:48:32 -04:00
smile37773
161c1ce17e Rename Azure modules: "facts"->"info" (#61417)
* rename

* add symlink

* add the log

* fix the ignore file

* fix

* fix
2019-08-28 19:01:10 +08:00
Andrey Klychkov
a6f6256a0a new module postgresql_publication (#59439)
* new module postgresql_publication: initial commit

* new module postgresql_publication: add seealso section

* new module postgresql_publication: fix RETURN section, fix typo

* new module postgresql_publication: add __exec_sql method

* new module postgresql_publication: fix typos

* new module postgresql_publication: fix typos

* new module postgresql_publication: fix typos
2019-08-28 10:24:59 +02:00
Zim Kalinowski
bf108ee7bf
Adding snapshot module (#61418)
* adding snapshot module

* adding snapshott module

* updates

* updates

* positional args
2019-08-28 14:17:40 +08:00
Matt Clay
f510d59943
Support relative imports in AnsiballZ. (#61196) 2019-08-27 18:11:21 -07:00
Ruben-Bosch
5549788c8d win_updates: Add flag to only download updates without installing them (#58631)
* win_updates: Add flag to only download updates without installing them

* Fix test

* Fixes ansible-test (pep8)

* Fix integration test

* Fix actual fix.
2019-08-28 09:46:59 +10:00
Shachaf92
03bbba4a9f win modules - standarize regex and regxp as alias (#59037)
* win modules - standarize regex  and regxp as alias

* Changes to reflect desired state

* Update parameter names of funtions

* Update main.yml

* Update win_lineinfile.py

* Update win_wait_for.py
2019-08-28 09:38:23 +10:00
Jordan Borean
66f52b74b1 Change collection PS util import pattern (#61307)
* Change collection PS util import pattern

* Add changes for py2 compat

* fix up regex and doc errors

* fix up import analysis

* Sanity fix for 2.6 CI workers

* Get collection util path for coverage collection
2019-08-27 16:02:27 -07:00
Brian Scholer
eaa6848932 Allow password to be null in Scheduled Task for gMSA (#60990)
* Allow password to be null in Scheduled Task for gMSA

* Remove test for removed password validation, linting fixes
2019-08-28 08:44:45 +10:00
Yuwei Zhou
41778a8e12 Add azure resource lock module (#55700)
* add locks

* rename the module

* add test

* add test

* address comments

* add quote

* can list child scope lock

* minor docs tweaks

* Add files via upload (#62)

* change '\r\n' to '\n' (#63)

* Small changes, just to trigger CI verify.

* trigger CI verify

* remove 's'

* Update according by comments

* change small for trigger CI check
2019-08-28 05:35:12 +08:00
smile37773
31a1eadab2 Add the azure_rm_azurefirewall_info module (#58697)
* add the info module of azure firewall

* fix the format_item()

* add the test

* fix the indented line

* fix

* fix the test

* change the test file
2019-08-28 05:23:29 +08:00
Jordan Borean
faaa669764
PowerShell - Added coverage collector (#59009)
* Added coverage collection for PowerShell - ci_complete ci_coverage

* uncomment out coverage uploader call

* Generate XML for PowerShell coverage

* Use whitelist to exclude coverage run on non content plugins

* Remove uneeded ignore entry

* Try to reduce diff in cover.py

* Fix up coverage report package - ci_complete ci_coverage
2019-08-28 07:03:23 +10:00
smile37773
5438013191 Rename Azure modules: facts -> info (#60987) 2019-08-28 04:44:57 +08:00
Felix Fontein
e176023c6b Scaleway: rename _facts -> _info (#61095)
* Rename scaleway _facts -> _info

* Add changelog.

* Improve docs.
2019-08-27 16:39:24 -04:00
Sam Doran
32eeeab831
Revert "Disable Hetzner Cloud integration tests due to authentication issues (#61375)" (#61383)
This reverts commit 31b49334b9.
2019-08-27 15:30:28 -04:00
Nilashish Chakraborty
36f4af203c
Add iosxr_lag_interfaces resource module (#61303)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-27 23:01:05 +05:30
Strahinja Kustudic
a213b9160c Fix extended loop_control with includes (#61231)
* Fix extended loop_control with includes

* Use assert for testing extended loop_control

* fix typo
2019-08-27 12:09:56 -05:00
ygelfand
36b7baca4d getent - add service support(#60295) 2019-08-27 11:58:37 -04:00
Gonéri Le Bouder
d29aaffb16 vmware_guest_disk_info/test: ensure the test VM is running
`vmware_guest_disk_info` expects the VM to be running. Since
964783fbd2, `prepare_vmware_tests`
creates the test VM with the `powered-off` state. This to increase
the performance.

This commit ensures the test-suite actually run against a running VM,
as expected.
2019-08-27 11:31:14 -04:00
Gonéri Le Bouder
ef69f3a3b5 vmware/test: clean up dvswitch_0001 and dvswitch_0002
Ensure `dvswitch_0001` and `dvswitch_0002` won't remain after
`vmware_dvswitch` test execution.
2019-08-27 11:30:44 -04:00
Sam Doran
31b49334b9
Disable Hetzner Cloud integration tests due to authentication issues (#61375) 2019-08-27 10:47:08 -04:00
jasonjuenger
dfd1b29777 Add aci_vmm_credential.py (#60910)
* add module to create aci VMM credential objects
add initial remove and add integration tests for VMM credential objects

* update 'credential' var name to 'name'

* move vmware tests to domain type specific file

* move vmware tests to domain type specific file
add include task in main file to reference domain type specific tests

* update task names
add test to remove credential prior to first credential add
add tests for querying individual credentials
add tests for query all credentials
add additional tests for removing credentials

* update version added to 2.9
remove invalid module references from 'seealso' section

* fix list reference in query all assertions

* add reference to VM_PROVIDER_MAPPING keys for vm_provider arg
2019-08-27 14:08:24 +02:00
Sumit Jaiswal
b53bc94cc5
Resource module for iosxr_l2_interfaces (#59964)
* iosxr_l2 resource
2019-08-27 17:20:47 +05:30
Adharsh Srivats R
ee05d6bde2 Added nxos_lldp_global resource module (#60072)
* Added nxos_lldp_global module

Tests

Correction

remove q

* Added tests

* Corrections

Changes

Last few changes please

Final

Finall

Finalll

* Key error and punctuation changes

* .gitignore edit

* Facts file edit

* Changed facts collection and 'replaced' state

Changed facts collection and replaced state

Changed facts collection and replaced state

* Spacing and module error correction

* return facts as empty dict not list

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-27 14:52:24 +05:30
Ganesh Nalawade
2a13ad7adf
Fix junos resource modules group based config and minor updates (#61224)
* Fix junos resource modules group based config and minor updates

Fixes https://github.com/ansible/ansible/issues/61183

*  Add support to get inherited configuration for resource
   modules to handle group based configuration
*  Add task input check for merged, replaced and overridden
   states in junos resource modules
*  Integration test for group based configuration

* Fix CI test failures

* Fix test failures
2019-08-27 11:06:06 +05:30
Yuwei Zhou
b4732dd2e6 Support Azure IoT hub and related module (#55121)
* Support iothub creation

* raise errordetailexception rather than clouderror

* add facts

* change requirement

* compare endpoint

* add documentation

* add documentation

* add iot device facts

* modify line ending

* add auth method

* add iot module

* add consumer group

* add the test

* enhencement of  doc

* add list consumer groups

* fix lint

* fix lint

* fix doc

* fix doc

* Update auzre_rm_iothub related document

* changed paramter's type

* update type

* rename facts -> info

* fixed sanity

* missed during merge
2019-08-27 13:18:28 +08:00
Yuwei Zhou
1c06b302bc Support automation account managment (#56429)
* add automation account

* add test

* update sdk version

* fix doc

* Update azure_rm_automationaccount.py

* Update azure_rm_automationaccount_facts.py

* Update main.yml

* add type define (#64)

* add new (#67)

* change 'example' to 'sample'

* changed 'path' to 'ID'
2019-08-27 07:38:47 +08:00
Bruno Meneguello
954416932a route53: optimize zone_id lookup when hosted_zone_id is provided (#60437) 2019-08-26 16:21:17 -07:00
Yunge Zhu
749662d776 add azure monitor log profile module (#54702)
* add azure monitor log profile module

* fix version

* fix lint

* mark test as unsupported

* fix lint

* fix lint

* Fix the error prompted in the comments
2019-08-27 05:00:28 +08:00
The Magician
1631554c1b Bug fixes for GCP modules (#61251) 2019-08-26 15:04:24 -04:00
pratikgadiya12
8ee7d9f598 VMWare - Rename _facts to _info (#57474)
Deprecate vmware's _facts modules and add new modules.

Fixes: #57278
2019-08-26 14:45:34 -04:00
Sumit Jaiswal
30714682c9
Fixes iosxr interfaces zuul failure (#61313)
* fixes 61311

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix loopback

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-26 22:25:43 +05:30
Felix Fontein
e536d0e128
openssl_*: deprecate PyOpenSSL backends (#59907)
* Deprecate PyOpenSSL backends.

* Add changelog.

* Add porting guide entry.

* Improve tests to ignore deprecations when comparing results.

* Deprecating pyopenssl backend for get_certificate and openssl_publickey.

* Fix typo.
2019-08-26 18:26:10 +02:00
Felix Fontein
039123ec6b
acme_account_info: retrieve orders (#59697)
* Add retrieve_orders option.

* Run acme_certificate tests also for acme_account_info; use acme_account_info to get list of orders.

* Doing some quoting.

* Improve returned description.
2019-08-26 18:16:43 +02:00
Felix Fontein
14974f5fc2
openssl_certificate_info: add ocsp_uri return value (#60393)
* Add ocsp_uri return value.

* Add changelog.

* Add integration test.

* Fix rebase error.
2019-08-26 17:42:52 +02:00
Nathaniel Case
a567a3fae0
New module eos_lldp_global (#60975)
* New module eos_lldp_global

* Implement facts

* Implement config, add tests

* Assorted fixes
2019-08-26 11:34:41 -04:00
Mario Lenz
0ac57941c1 VMware: Add missing HA admission control policies in vmware_cluster_ha (#60233)
* Add missing HA admission control policies
* Add new parameter host_isolation_response
* Bugfix: 'das_vm_config' referenced before assignment
* Implement test cases
2019-08-26 09:40:38 -04:00
Trishna Guha
5a04b4feb6
Add nxos_l2_interfaces resource module (#61120)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-26 16:46:05 +05:30
Michał Szczepańczyk
8ed3a0b360 fix bug - k8s was crashing when yaml ended with 3 dashes (#61182)
* fix bug - k8s was crashing when yaml ended with 3 dashes

* #61182 - add changelog
2019-08-26 17:28:01 +10:00
PRASOON KARUNAN V
48eed0b6c8 adding group parameter for win_firewall_rule (#55109)
* adding group parameter for win_firewall_rule

* integration test fix

* changing the version add to 2.9

* setting group optional

* fix:setting required to optional
2019-08-25 19:10:31 -04:00
Mark Chappell
4e6298b847 AWS dynamic inventory: fixup RDS integration tests (#61259)
* ec2 inventory/rds: (integration tests) migrate to module_defaults and cope with missing security_token

* ec2 inventory/rds: (integration tests) Avoid hard coding the parameter group name

Generated it based on the information returned when creating the RDS instance.

* ec2 inventory/rds: (integration tests) rename templates to .j2 rather than .yml
- avoids throwing yamllint errors
- makes it clear they're templates not the final yaml files.
2019-08-25 10:32:18 -04:00
Felix Fontein
c3b1a0a7e8 Vultr: rename _facts -> _info (#61239) 2019-08-24 17:54:17 +02:00
Mark Chappell
5434bf74c6 Fix issues with aws_kms when working cross-account and with IDs (#60805)
* aws_kms: (integration tests) Test updating a key by ID rather than just my alias

* aws_kms: (integration tests) Test deletion of non-existent and keys that are already marked for deletion

* aws_kms: Ensure we can perform actions on a specific key_id rather than just aliases

In the process switch over to using get_key_details rather than listing all keys.

* aws_kms: When updating keys use the ARN rather than just the ID.

This is important when working with cross-account trusts.
2019-08-23 16:56:45 -07:00
Felix Fontein
4551965af1 ACME modules: bump test container version (#61192)
* Fix root cert path.

* Bump testing container version.

* Improve check (needed due to letsencrypt/pebble#257).
2019-08-23 15:30:28 -07:00
Mark Chappell
1f733e2d55 ec2_asg: fix the integration tests (#61212) 2019-08-23 14:53:47 -04:00
The Magician
d3b493020d New Module: gcp_kms_crypto_key (#61096) 2019-08-23 13:27:46 -04:00
The Magician
ba026939bb New Module: gcp_kms_key_ring (#61098) 2019-08-23 13:27:28 -04:00
Sumit Jaiswal
c9f0b0fb42
Resource module for ios_l3_interfaces (#60405)
* ios_l3_interfaces

* fix shippable

* fix tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix ignore txt file

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix doc

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable n tests

* fix replace test

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix zuul failures

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable n zuul

* fix zuul

* fix zuul

* fix zuul test

* fix zuul

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* code zuul fix

* fix merge

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix merge

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-23 22:09:20 +05:30
Felix Fontein
fa70690e5c
openssl_certificate/csr(_info): add support for SubjectKeyIdentifier and AuthorityKeyIdentifier (#60741)
* Add support for SubjectKeyIdentifier and AuthorityKeyIdentifier to _info modules.

* Adding SubjectKeyIdentifier and AuthorityKeyIdentifier support to openssl_certificate and openssl_csr.

* Fix type of authority_cert_issuer.

* Add basic tests.

* Add changelog.

* Added proper tests for _info modules.

* Fix docs bug.

* Make sure new features are only used when cryptography backend for openssl_csr is available.

* Work around jinja2 being too old on some CI hosts.

* Add tests for openssl_csr.

* Add openssl_certificate tests.

* Fix idempotence test.

* Move one level up.

* Add ownca_create_authority_key_identifier option.

* Add ownca_create_authority_key_identifier option.

* Add idempotency check.

* Apparently the function call expected different args for cryptography < 2.7.

* Fix copy'n'paste errors and typos.

* string -> general name.

* Add disclaimer.

* Implement always_create / create_if_not_provided / never_create for openssl_certificate.

* Update changelog and porting guide.

* Add comments for defaults.
2019-08-23 14:01:42 +02:00
Mark Chappell
77e4371460 aws_kms: Update policy on existing keys (when passed) (#60059)
* aws_kms: (integration tests) Use module_defaults to reduce the copy and paste

* aws_kms: (integration tests) make sure policy option functions.

* aws_kms: (integration tests) Move iam_role creation to start of playbook.

iam_roles aren't fully created when iam_role completes, there's a delay on the Amazon side before they're fully recognised.

* aws_kms: Update policy on existing keys (when passed)
2019-08-23 20:38:38 +10:00
Chris Van Heuveln
f1054f575d bfd_global: minor test-only fix (#60965) 2019-08-23 15:12:59 +05:30
Trishna Guha
f0ef624cff
Add nxos_l3_interfaces resource module (#61021)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-23 15:06:26 +05:30
Andrey Klychkov
e3cf76533c postgresql_user: add groups parameter (#60638)
* postgresql_user: add groups parameter

* postgresql_user: add groups parameter, fail_on_role default True

* postgresql_user: add groups parameter, add changelog fragment
2019-08-23 08:17:23 +02:00
Sumit Jaiswal
47243b0b2d
Resource module for iosxr_interfaces (#59853)
* iosxr interfaces resource

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-22 21:27:41 +05:30
Mark Chappell
70777020c4 Fix iam_password_policy integration tests (#60930)
* iam_password_policy: (integration tests) Use module defaults for AWS connection details

* iam_password_policy: (integration tests) Ensure the policy is removed when tests fail

* iam_password_policy: (integration tests) Add regression test for #59102

* iam_password_policy: Only return changed when the policy changes.

* iam_password_policy: PasswordReusePrevention must be omitted to remove/set to 0

* #60930 add changelog

* Update hacking AWS security policy to allow testing of Password Policy Management
2019-08-22 23:25:25 +10:00
Nathaniel Case
8c5936671e
Add new module eos_l3_interfaces (#59820)
* Update base files for resource modules

* Add modules

* Add module_utils

* Add tests

* Deprecate eos_l3_interface

* Update facts
2019-08-22 09:06:38 -04:00
Markus Bergholz
2fff40d409 add max_allocated_storage parameter to rds_instance (#61008)
* #60921 add max_allocated_storage parameter add apply that parameter also to the integration test

* version_added 2.9

* test value of  max allocated storage
2019-08-22 22:20:50 +10:00
Andrey Klychkov
191068a286 Issue 59955: add array handling to postgresql_query module (#60559)
* Issue 59955: add array handling to postgresql_query module

* Issue 59955: add array handling to postgresql_query module, improvements

* Issue 59955: add array handling to postgresql_query module, fix example comment
2019-08-22 08:53:29 +02:00
Sumit Jaiswal
a5a1f01d1e
Resource module for ios_lldp_interfaces (#61012)
* ios_lldp_interfaces resource

* fix shippable n reviews

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* add enable lldp tc
2019-08-22 10:02:25 +05:30
The Magician
76cc8e9fc3 New Module: gcp_filestore_instance (#60996) 2019-08-21 15:31:38 -04:00
Matt Clay
29ac0273d4
Update ansible-test collection inventory handling. (#61031)
* Update ansible-test collection inventory handling.

- The `windows-integration` command now supports the `--inventory` option.
- The incomplete support for host_vars and group_vars directories has been removed.
- The incomplete support for an inventory directory has been removed.
- The inventory specified by `--inventory` can now reside outside the install and content roots.
- Using `ansible_ssh_private_key_file` with `--docker` or `--remote` results in a warning about the combination being unsupported and likely to fail.

* Fix config handling.

* Fix payload handling of ssh keys.

* Disable pylint no-self-use rule for ansible-test.

* De-duplicate payload paths.
2019-08-21 12:12:37 -07:00
Sumit Jaiswal
35d457a14f
Resource module for ios_lldp_global (#60506)
* ios_lldp_global model

* final fix for lldp_global

* fix shippable n reviews

* fix reviews
2019-08-21 23:02:25 +05:30
Christopher Schmitt
4e7cd76c56 Add hcloud network info (#60932)
* Add hcloud network facts

* Add tests

* Rename fact to info, adjust tests

* Fix style

* Fix test

* Fix typo

* Adjust test

* Adjust test

* Rename subnets to subnetworks

* Adjustments

* Apply suggestions from code review

Co-Authored-By: Lukas Kämmerling <4281581+LKaemmerling@users.noreply.github.com>
2019-08-21 15:47:02 +02:00
Lukas Kämmerling
96199be96b Rename hcloud_*_facts to hcloud_*_info (#60926)
* Rename hcloud_datacenter_facts to hcloud_datacenter_info

* Rename hcloud_location_facts to hcloud_location_info

* Rename hcloud_image_facts to hcloud_image_info

* Rename hcloud_floating_ip_facts to hcloud_floating_ip_info

* Rename hcloud_server_type_facts to hcloud_server_type_info

* Rename hcloud_server_facts to hcloud_server_info

* Rename hcloud_ssh_key_facts to hcloud_ssh_key_info

* Rename hcloud_volume_facts to hcloud_volume_info

* Fix typo in hcloud_image_info

* Add to porting guide and add changelog fragment

* Reword porting guide
2019-08-21 14:55:37 +02:00
Matt Davis
bfa004930a
add subdir support to collection loading (#60682)
* add subdir support to collection loading

* collections may now load plugins from subdirs under a plugin type or roles dir, eg `ns.coll.subdir1.subdir2.myrole`->ns.coll's roles/subdir1/subdir2/myrole, `ns.coll.subdir1.mymodule`->ns.coll's plugins/modules/subdir1/mymodule.py
* centralize parsing/validation in AnsibleCollectionRef class
* fix issues loading Jinja2 plugins from multiple sources 
* resolves #59462, #59890,

* sanity test fixes

* string fixes

* add changelog entry
2019-08-21 10:45:04 +01:00
Rohit
8b3ff933af
Vyos lldp interfaces (#60931)
* module_utils checkin

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* vyos lldp_interfaces merging

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* shippable fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* merge changes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* failure added in ignore list

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* remove global commands

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-08-21 12:30:13 +05:30
Pavan Bidkar
b75fc87a86 VMware: New module for deploy VM from content library template (#60203)
* Fixed format issues reported by pre-check tests

* Changes as per review comments. using single api_client between util class and module

* re-running the task to check the idempotency of module object
2019-08-21 11:17:29 +05:30
Nathaniel Case
764a81fce7
New module eos_lacp (#60698)
* Initial builder import

* Add tests

* Implement facts & config
2019-08-20 16:11:31 -04:00
Matt Clay
92380d7050
Update ansible-test --windows inventory creation. (#60911)
Host specific settings are created as part of the generated inventory instead of using a host_vars directory.

Also update connection tests to work properly with the generated inventory changes.
2019-08-20 07:17:32 -07:00
Will Thames
362c45517d aws_kms: fix failing tests (#60206)
Preserve tag key case by only calling camel_dict_to_snake_dict once,
before the tags are added.

Don't call assert_policy_shape as it seems to fail

Use aws_caller_info in the test suite now that it exists rather
than running `aws sts get_caller_identity`

Ensure that calls using `grant_types` can also use key aliases
2019-08-20 07:15:40 -04:00
Trishna Guha
41dc8e84e4
fix nxos test failure (#60928)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-20 16:14:00 +05:30
Sumit Jaiswal
8a8798c373
Resource module for ios_lacp_interfaces (#59516)
* ios lacp interfaces

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-20 13:37:31 +05:30
Sumit Jaiswal
642e54f958
Resource module for ios_lacp (#60884)
* ios lacp resource

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-20 12:05:14 +05:30
Nathaniel Case
efa163a2e8
New module eos_lag_interfaces (#60610)
* Copy module files

* Deprecate eos_linkagg

* Add tests
2019-08-19 15:34:20 -04:00
Nathaniel Case
d9ffc61539
Add new module eos_l2_interfaces (#59794)
* Add module files for l2_interfaces

* Add module_utils

* Add tests

* Deprecate eos_l2_interface

* Clean up tests so eos_vlan will still pass
2019-08-19 11:24:36 -04:00
Sumit Jaiswal
04ef376ab2
Resource module for ios_lag_interfaces (#60672)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-19 20:41:00 +05:30
Ganesh Nalawade
49736b6b27
Add support to configure network_cli terminal related options (#60086)
* Add support for configurable terminal plugin options

Fixes #59404

*  Add terminal options to support platform specific login menu
*  Add terminal options to support configurable options for stdout
   and stderr regex list

* Fix CI failures

* Fix CI issues

* Fix review comments and add integration test

* Fix sanity test failures

* Fix review comments

* Fix integration test case

* Fix integration test failure

* Add support to configure terminal related options

Fixes https://github.com/ansible/ansible/issues/59404

*  Add network_cli configurable options to support platform specific login menu
*  Add network_cli configurable options to support configurable options for stdout
   and stderr regex list

* Fix review comment

* Fix review comment
2019-08-19 18:56:20 +05:30
Nathaniel Case
446dcb7c96
New module eos_vlans (#60652)
* Initial commit of module files

* Add tests, implement facts

* Implement config, fix issues

* Handle vlan ranges from the device

* Deprecate eos_vlan
2019-08-19 09:02:38 -04:00
Rohit
d8f9904f43
vyos_lldp_global (#59627)
* vyos_lldp_global

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity checks

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* deprecated changes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* branch conflict resolved

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity check passes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-08-19 17:31:09 +05:30
Sumit Jaiswal
b55a54469c
Resource module for ios_vlans (#59640)
* ios_vlans resource module

* fix shippable error

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix vlans resource

* fix facts doc

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable n review

* fix test

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix indentation

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix review

* fix shebang

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-19 16:03:29 +05:30
Trishna Guha
f1cf838797
fix nxos CI failures (#60752)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-19 14:24:39 +05:30
Ryan Butler
555b8413a1 VMware: Add uptime and maintenance mode in vmware_host_facts (#60688)
* adding host facts
* adding to test
2019-08-19 10:57:01 +05:30
Felix Fontein
0d88ec241f
openssl_certificate: fix idempotency (#60745)
* Fix openssl_certificate idempotency.

* Add changelog.

* Add integration test.
2019-08-18 20:48:34 +02:00
Hannes Ljungberg
13364fc530 docker_swarm_service: Allow passing dicts in networks (#58961)
* Add support for passing networks as dicts

* Add function to compare a list of different objects

* Handle comparing falsy values to missing values

* Pass docker versions to Service

* Move can_update_networks to Service class

* Pass Networks in TaskTemplate when supported

* Remove weird __str__

* Add networks integration tests

* Add unit tests

* Add example

* Add changelog fragment

* Make sure that network options are clean

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

* Set networks elements as raw in arg spec

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

* Fix wrong variable naming

* Check for network options that are not valid

* Only check for None options

* Validate that aliases is a list
2019-08-18 08:55:54 +02:00
Felix Fontein
26b9c81a8e
crypto modules: fix sanity errors (#60046)
* Remove sanity warnings.

* Linting.

* More linting.

* Forgot one place.

* no_bytes -> num_bytes
2019-08-18 05:37:57 +02:00
Sumit Jaiswal
ab07c206aa
Resource module for ios_l2_interfaces (#60344)
* ios_l2_interface checkin

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-17 23:02:36 +05:30
Felix Fontein
6a786d0d93
openssl_publickey: add cryptography backend (#60387)
* Add cryptography backend.

* Add changelog.

* Make sure requirements are satisfied.

* Use more compatible elliptic curve.

* Decrease required version numbers.

* PyOpenSSL >= 16.0.0 is really needed.

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

Co-Authored-By: MarkusTeufelberger <mteufelberger@mgit.at>
2019-08-17 18:52:14 +02:00
Paul Belanger
13996aaff6
Fix missing variable with nxos_install_os tests (#60351)
Today we are getting an Ansible templating exception because this
variable isn't defined. But we also don't want testing to run, as we
don't have ability to run this test in DCI.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-08-17 10:04:50 -04:00
Felix Fontein
601a4b8f47
get_certificate: add cryptography backend (#60599)
* Add cryptography backend for get_certificate.

* Add changelog.

* Use short names (if possible).

* Adjust version (to behave as pyOpenSSL).

* Work around bugs (needed for cryptography 1.2.3).

* Don't run cryptography backend tests for CentOS 6.

* Bump cryptography requirement to 1.6 or newer.

Otherwise, signature_algorithm_oid isn't there, either.

* Simplify requirement text.

* CentOS 6 has cryptography 1.9, so we still need to block.

* Add auto-detect test.

* Improve YAML.
2019-08-17 16:02:14 +02:00
Felix Fontein
cf69b73c04
openssl_certificate/csr_info: add ordered issuer/subject return value (#60708)
* Add ordered issuer/subject return value.

* Add changelog.
2019-08-17 15:49:54 +02:00
Lukas Kämmerling
100b56439e hcloud_server: Allow users to enable/disable the rescue mode (#60070) 2019-08-17 11:29:58 +02:00
The Magician
818d1b2e45 New Module: gcp_cloudfunctions_cloud_function (#60668) 2019-08-16 15:23:39 -04:00
Mitsuru Nakakawaji
064cd63f3d fix: docker_swarm_service does not publish both tcp and udp ports (#60616)
* fix: docker_swarm_service does not publish both tcp and udp ports for same published port

* fix the linting problems and add the changelog fragment.

* add test

* modify test to ensure result rather than return value
2019-08-16 15:23:45 +02:00
Felix Fontein
48541910bf
docker_container: add mount endpoint collision detection (#60384)
* Add mount endpoint collision detection.

* Add changelog.

* Fix error.
2019-08-16 15:23:03 +02:00
Gonéri Le Bouder
218f4276d5 vmware_drs_group: creates test vm properly
Creates the test VMs with `prepare_vmware_test`. Before this commit,
only one VM was created and the next step was failing because this was
not matching the expected list of VMs.
2019-08-15 16:57:39 +02:00
Matt Clay
7968dc4c00 Load integration config test vars from content.
The `test/integration/integration_config.yml` vars file will now be loaded from the content under test and is now optional.

The `output_dir` and `win_output_dir` vars are now provided by ansible-test.
2019-08-14 20:40:59 -07:00
Matt Clay
0c74ee4352
Clean up various integration tests. (#60613)
* Fix var_blending test temp dir usage.

* Fix filters integration test:

- Fix use of `output_dir`.
- Use `localhost` instead of `testhost` since we're only testing filters.
- Fix `fileglob` test to actually test a directory that exists.

* Fix lookups integration test:

- Fix use of `output_dir`.
- Use `localhost` instead of `testhost` since we're only testing lookups.

* Fix ansible-runner test temp dir usage.

* Fix template and template_jinja2_latest test.

Use the `OUTPUT_DIR` env var to get the output directory for the tests.

* Fix Python version compat in filters test.

* Skip filters test on Python 2.6.
2019-08-14 16:33:45 -07:00
René Moser
f02f5c4b5d
cloudscale_server: add tags support (#60396) 2019-08-14 22:55:31 +02:00
René Moser
5298d312a2
cloudscale_server_group: add tags support (#60397) 2019-08-14 22:54:25 +02:00
Lukas Kämmerling
4a09c7a920 hcloud: Add hcloud_rdns Module (#60123) 2019-08-14 22:51:05 +02:00
Gonéri Le Bouder
b8430a3221 vmware_guest_screenshot: fix the functional test
- VM are off my default since 964783fbd2
- `infra.vm_list[0]` → `virtual_machines_in_cluster[0].name`
- `datacenter` key is currently mandatory, see: https://github.com/ansible/ansible/issues/60565
2019-08-14 18:59:58 +02:00
Matt Clay
27ff8b1a80 Clean up unused config usage in integration tests. 2019-08-14 09:44:36 -07:00
Rohit
69bc24f607
lag interfaces resource module (#59175)
* lag interfaces resource module

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity check imports

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* dict_diff usage issue fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* new task

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* overridden updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* dict update

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* facts merged

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* rebased and merged

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* new failures added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* obsolete file removed

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* dependency added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-08-14 17:31:49 +05:30
Trishna Guha
d5d88f9b11
Add nxos_interfaces resource module (#60421)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-14 13:38:22 +05:30
Matt Clay
b07f96c31d
Fix integration test temp dir usage. (#60555)
* Fix xfs_quota integration test temp dir usage.
* Fix lvg integration test temp dir usage.
* Fix filesystem integration test temp dir usage.
* Fix connection_windows_ssh test temp dir usage.
2019-08-14 00:12:05 -07:00
Matt Clay
1b8aa798df
Update ansible-test integration config handling. (#60448)
* Move Ansible test config into env vars.

This allows ansible-test to use an empty Ansible config file, leaving open the option for users to customize the one used to run tests (although such usage is discouraged).

* Use config from content under test when present.
2019-08-13 13:18:55 -07:00
Matt Clay
60f8483603
Add missing boilerplate to collections test. (#60507)
* Add missing boilerplate to collections test.
* Remove redundant Python version check.
2019-08-13 12:20:14 -07:00
Iain Madder
1b1216d2d1 Update file.py's help doc, and narrow down diff logic, for recent pull 56353 (#59069)
* Limiting when path_content is generated

path_content will be empty and unnecessary in all scenarios except when changing the state of a folder to absent, so adding in a check to limit when this parameter is defined
2019-08-13 12:59:13 -04:00
Nathaniel Case
6b5c7f7c42
Add new module eos_interfaces (#59729)
* Move module_utils

* Add eos_interfaces and deprecate eos_interface

* Add boilerplate, update ignores.txt

* Try to reconcile eos provider documentation with argspec

* Try to work around unknown interfaces

* Move param_list_to_dict to utils
2019-08-13 10:09:52 -04:00
Nilashish Chakraborty
ef0f28097e
Remove lo from config (#60480)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-13 19:10:56 +05:30
Shaun M
fa783c027b Adding waiter to cluster remove process (#57324)
* Adding waiter to cluster remove process

* blank line contains whitespace

* update aws_eks integration test

* Refactor aws_eks test suite to use pip

* update version testing

* missing parens...

* add changelog fragment

* Add waiter to module_utils, fix exception handling.

* Correct EKS waiter checks
2019-08-13 23:11:21 +10:00
Felix Fontein
2d98734ad5 Amazon modules: rename _facts with ansible_facts result to _info (#60178)
* aws_s3_bucket_facts -> aws_s3_bucket_info

* cloudformation_facts -> cloudformation_info

* cloudfront_facts -> cloudfront_info

* ecs_service_facts -> ecs_service_info

* efs_facts -> efs_info

* Add changelog and porting guide entry.

* lambda_facts -> lambda_info

* Improve examples.

* Add subsection on renamed modules.

* Add sentence on registering variables.

* Fix ReST.

* Instead of renaming lambda_facts, deprecate it and replace with new module.

* Rename internal variable.

* Re-add sanity ignores for lambda_facts.
2019-08-13 08:01:37 -04:00
Nilashish Chakraborty
6110dcc789
Add iosxr_lldp_interfaces resource module (#60411)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-13 14:58:55 +05:30
Matt Davis
a40baf22fa
various mod_args fixes (#60290)
* various mod_args fixes

* filter task keywords when parsing actions from task_ds- prevents repeatedly banging on the pluginloader for things we know aren't modules/actions
* clean up module/action error messaging. Death to `no action in task!`- actually list the candidate modules/actions from the task if present.

* remove shadowed_module test

* previous discussion was that this behavior isn't worth the complexity or performance costs in mod_args

* fix/add test, remove module shadow logic

* address review feedback
2019-08-13 09:57:49 +01:00
Ganesh Nalawade
9efa00e762
Add [junos_lldp_global] model (#59712)
* Add [junos_lldp_global] model

*  Add new resource module junos_lldp_global
*  Targets model https://github.com/ansible/network/pull/30
*  Deprecate junos_lldp module

* Run lldp integration test only if protocol supported
2019-08-13 13:05:17 +05:30
Trishna Guha
0acf7be56a
Add nxos_lacp_interfaces resource module (#60313)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-13 12:13:35 +05:30
Matt Clay
d36919856f
Update integration tests. (#60447)
* Remove unnecessary ANSIBLE_CONFIG override.
* Fix pull integration test.
* Fix inventory_foreman integration test.
2019-08-12 16:23:47 -07:00
Sam Doran
c485a1b91e
Fix sanity tests based on newer version of shellcheck (#60423)
- change egrep to grep -E
- store exit codes and check them directly
- ignore SC1091
2019-08-12 16:24:28 -04:00
The Magician
6cb5b67b22 Bug fixes for GCP modules (#60115) 2019-08-12 14:34:20 -04:00
The Magician
be459c00bf Bug fixes for GCP modules (#60337) 2019-08-12 14:31:35 -04:00
The Magician
687da46a85 Bug fixes for GCP modules (#60338) 2019-08-12 13:41:41 -04:00
Marius Gedminas
c71622b31a user: createhome=no home=/no/such/dir (#60310)
Fixes #60307.

This bug was introduced in commit d2edf1d435
("User - Create parent directories if they do not exist in the specified
home path (#51043)") and did not make it into any releases.
2019-08-12 10:37:45 -04:00
Nilashish Chakraborty
09f712c7f3
Add iosxr_lldp_global resource module (#60074)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-12 18:03:23 +05:30
René Moser
602aded6ec
vultr: vultr_block_storage_facts to info (#60230) 2019-08-12 10:36:21 +02:00
Ganesh Nalawade
8cbfa75038
Add [junos_lacp] model (#59705)
* Add [junos_lacp] model

*  Add new resource module junos_lacp.
*  Targets model https://github.com/ansible-network/resource_module_models/pull/28

* Fix CI issues

* Fix CI failures
2019-08-12 13:54:44 +05:30
Nilashish Chakraborty
f4502a8f1c
Set eth0 to dhcp explicitly (#60305)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-12 11:36:54 +05:30
Ganesh Nalawade
fdf48ed0b4
Add [junos_lacp_interfaces] resource module (#59708)
* Add [junos_lacp_interfaces] resource module

*  Add new resource module junos_lacp_interfaces.
*  Targets model https://github.com/ansible-network/resource_module_models/pull/36

* Fix sanity test failure
2019-08-12 11:24:34 +05:30
Jordan Borean
35b87b8633
Move windows test to another group (#60391) 2019-08-12 10:00:09 +10:00
Maxim Babushkin
dda80c46e9 openssh_keypair - Add key `comment` to return output (#59268)
If the comment will be provided during the key creation, it will be
diplayed in the return values.
Same will be on the comment change.
2019-08-11 13:47:34 +02:00
Maxim Babushkin
27e414200f openssh_keypair - Add public key and key comment validation (#57993)
- Split the key validation to separate private and public.
- In case public key does not exist, recreate it.
- Validate comment of the key.
- In case comment changed, update the private and public keys.
2019-08-10 18:57:35 -04:00
The Magician
30ad73f1c1 Bug fixes for GCP modules (#60339) 2019-08-09 19:17:44 -04:00
Felix Fontein
8b68feb67e
acme_certificate: allow to download alternate certificate chains (#56334)
* Improve link handling.

* Also fetch alternate certificate chains.

* Add retrieve_all_alternates option.

* Simplify code.

* Forgot when condition.

* Add tests for retrieve_all_alternates.

* Fixes.

* Moved utility function for link parsing to module_utils.

* Fix grammar.
2019-08-09 23:54:48 +02:00
Alex Stephen
2e90efd4a7 Changing GCP Facts modules to Info Modules (#60172)
* file changes, porting guide, changelog fragment, renaming autoscaler, removing rst links
* Apply suggestions from code review

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-08-09 15:13:08 -05:00
Matt Clay
cb68110296
Clean up ansible-test inventory templates. (#60321)
* Move ansible-test inventory templates.
* Remove obsolete inventoy.remote.template file.
2019-08-09 11:06:21 -07:00
Nathan Swartz
d61df0a9ba Lun mapping upstream dev (#57096)
* Fix hosts with same lun number conflict in netapp_e_lun_mapping.

This patch fixes an issue of when multiple hosts are created and then
subsequently volume(s) are mapped to them using the same specified number.

* Fix netapp_e_host module bug when lun=0

* Add thin-volumes to the netapp_e_lun_mapping update_mapping_info method.
2019-08-09 08:25:38 -04:00
Jordan Borean
dbd082efe4
Ansible.AccessToken - Added shared util for managing a Windows access token (#60302)
* Ansible.AccessToken - Added shared util for managing a Windows access token

* Fix tests when running in CI

* More fixes for older servers

* More fixes for Server 2008
2019-08-09 21:10:44 +10:00
Ganesh Nalawade
309a58eafd
Add [junos_l2_interfaces] resource module (#59693)
* Add [junos_l2_interfaces] resource module

*  Add new resource module junos_lag_interfaces.
*  Targets model https://github.com/ansible-network/resource_module_models/pull/12
*  Deprecate junos_l2_interface module

* Fix CI failures

* Fix CI issues
2019-08-09 13:09:19 +05:30
Matt Clay
3777c2e93d Fix plugin names when loading all plugins. (#59950)
* Fix plugin names when loading all plugins.

Add an integration test to verify plugin __package__ and __name__ are correct.

* Make sure filter and test names are unique.

* Remove __package__ test.

On Python 2.x __package__ is not set, but it is on Python 3.x.
2019-08-09 07:23:12 +01:00
Abhijeet Kasurde
d3624cf4a4
VMware: test - add missing datacenter parameter (#60273)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-08-09 11:17:44 +05:30
Matt Clay
07051473f8 Disable failing inventory_docker_machine test. 2019-08-08 20:39:04 -07:00
Ganesh Nalawade
6f0aae256d
Add [junos_lldp_interfaces] model (#59720)
* Add [junos_lldp_interfaces] model

*  Add new resource module junos_lldp_interface
*  Targets model https://github.com/ansible-network/resource_module_models/pull/40
*  Deprecate junos_lldp_interface module

* Fix CI issues
2019-08-08 18:23:54 +05:30
Trishna Guha
87a568da0b
Add nxos_lacp resource module (#59717)
* Add nxos_lacp resource module

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

* Add commands in module doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-08 16:52:16 +05:30
Nilashish Chakraborty
a595c60d4c
Add eth0 in prepare_vyos_tests (#60212)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-08 16:45:01 +05:30
Jordan Borean
534a40c5cd
Move win target back a group (#60257) 2019-08-08 12:03:32 +10:00
Matt Clay
2e7d36a3f9
Fix placement and handling of ansible-test cloud config (#60253)
* Move cloud templates.
* Update paths for cloud config templates.
* Fix cloud config paths.
* Fix cloud-config classification.
2019-08-07 18:32:30 -07:00
Jordan Borean
81cb6f366a
Added group 7 to Windows groups - ci_complete (#60240) 2019-08-08 10:13:28 +10:00
ximon18
2cca9176a7 Added a Docker Machine dynamic inventory plugin (#54946)
* Added my Docker Machine dynamic inventory plugin (from https://github.com/ximon18/ansible-docker-machine-inventory-plugin) to begin the process of proposing it for inclusion in Ansible core. There are no integration tests yet. The docker_swarm inventory plugin has such tests but has some concerning note in its 'aliases' file about disabling docker due to test instability and also I wouldn't know at his point how to get Docker Machine installed on the integration test platform.
2019-08-07 18:14:14 -04:00
Nilashish Chakraborty
7b90e8aec4
Add iosxr_lacp_resource module (#59724)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-08 00:13:06 +05:30
Sam Doran
47796af64f
Change dummy package name in yum/dnf tests to not collide with an actual package (#60225)
When targeting 'foo*' in tests, it pulled in packages other than the dummy packages in our testing repo that have many dependencies, some of which were causing tests to fail.

Also change 'bar' package name to avoid the same issue in the future.
2019-08-07 14:26:55 -04:00
Nathan Swartz
e80f8048ee Fix netapp_e_volume wait-for-initialization to complete issue. (#58304)
* Fix netapp_e_volume wait-for-initialization to complete issue.

* Add unit tests for wait_for operations in netapp_e_volume module.
2019-08-07 11:28:39 -04:00
Marat Sharafutdinov
8751319820 Add wait_sleep parameter for the k8s module (#59714) (#59854) 2019-08-07 21:27:54 +10:00
Matt Clay
233efe0886 Add missing boilerplate. 2019-08-06 15:45:22 -07:00
Matt Clay
d651bda123
Relocate ansible-test code. (#60147)
* Initial move of `test/runner/` content.

`test/runner/lib/` -> `test/lib/ansible_test/_internal/`
`test/runner/`     -> `test/lib/ansible_test/_internal/data/`

* Initial move of `test/sanity/` content.

`test/sanity/` -> `test/lib/ansible_test/_internal/data/sanity/` (except `test/sanity/ignore.txt`)

* Initial move of `test/units/pytest/` content.

`test/units/pytest/` -> `test/lib/ansible_test/_internal/data/pytest/`

* Follow-up move of `test/runner/unit/` content.

`test/lib/ansible_test/_internal/data/unit/` -> `test/lib/ansible_test/tests/unit/`

* Initial move of `ansible.cfg` content.

`test/units/ansible.cfg` -> `test/lib/ansible_test/_internal/data/units/ansible.cfg`
`test/env/ansible.cfg` -> `test/lib/ansible_test/_internal/data/env/ansible.cfg`

* Follow-up move of `data` directory.

`test/lib/ansible_test/_internal/data/` -> `test/lib/ansible_test/_data/`

* Update import statements.

* Add missing __init__.py for unit tests.

* Fix path references and miscellaneous issues.
2019-08-06 14:43:29 -07:00
Matt Martz
923e21836b
Move plugin loader playbook dir additions back to Playbook instead of PlaybookCLI (#59557)
* Move plugin loader playbook dir additions back to Playbook instead of PlaybookCLI. Fixes #59548

* Restore cli additions
2019-08-06 15:58:15 -05:00
Nathan Swartz
acbffce079 Host dev upstream (#57086)
* Improve netapp_e_host module

Add host type strings for windows, windows cluster, linux and vmware to netapp_e_host module
Make host port information case-insensitive in netapp_e_host module
Fix port removal and default group.
Fix port reassignment in netapp_e_host module.
Fix port label or address change within existing host object in module netapp_e_host
Add unit and integration tests

* Created new unit test for netapp_e_host module
2019-08-06 15:01:22 -04:00
Nilashish Chakraborty
2c432f8bc7
Add vyos_l3_interfaces resource module (#59929)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-06 19:30:58 +05:30
Daniel Mellado Area
e3681c049c
Add junos vlans resource module (#59041) 2019-08-06 16:00:01 +02:00
The Magician
4317a97c42 New Module: gcp_compute_autoscaler (#60096) 2019-08-05 18:38:00 -04:00
The Magician
26a2d84dba New Module: gcp_compute_snapshot (#60098) 2019-08-05 18:37:51 -04:00
The Magician
820cfbbb77 Bug fixes for GCP modules (#60089) 2019-08-05 18:26:14 -04:00
The Magician
8241fd88de Bug fixes for GCP modules (#60090) 2019-08-05 18:26:06 -04:00
The Magician
fcc869ab7a Bug fixes for GCP modules (#60091) 2019-08-05 18:25:57 -04:00
The Magician
0234937ca3 Bug fixes for GCP modules (#60092) 2019-08-05 18:25:49 -04:00
The Magician
c1a99c390c Bug fixes for GCP modules (#60088) 2019-08-05 18:16:26 -04:00
Matt Clay
9fd244319e
Clean up ansible-test references in tests. (#60108)
* Clean up comments in integration tests.

Tests reference soon to be outdated paths and implementation details.

* Remove unused test/runner/ reference in test.
2019-08-05 14:55:30 -07:00
The Magician
5e0bcc60b5 New Module: gcp_cloudtasks_queue (#60094) 2019-08-05 16:47:52 -04:00
Felix Fontein
aecdfd397e ecs_taskdefinition_facts: rename to ecs_taskdefinition_info (#60023)
* Rename ecs_taskdefinition_facts to ecs_taskdefinition_info.
2019-08-05 12:47:35 -07:00
Sam Doran
0892d48ebc
Do not install requests[security] for MongoDB tests (#60083)
Cleanup packages installed via pip for MongoDB tests

ci_complete
2019-08-05 15:01:58 -04:00
Lukas Kämmerling
38848a4b0c hcloud: Add basic hcloud_route module (#59908) 2019-08-05 14:35:05 +02:00
Trishna Guha
e46237d705
Fix nxos_facts httpapi (#60055)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-05 18:01:29 +05:30
Lukas Kämmerling
8a5bde798a hcloud: Add hcloud_server_network module (#60061) 2019-08-05 14:06:22 +02:00
Lukas Kämmerling
0377c51c3a hcloud: Add hcloud_subnetwork module (#59781) 2019-08-05 11:13:28 +02:00
Trishna Guha
021b1810c9
Add nxos_vlans resource module (#59294)
* Add nxos_vlans resource module

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

* address review comments

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

* fix CI failure and udpate tests

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

* Add commands in module doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-05 12:50:16 +05:30
Mike Wiebe
9610f2b8ac NX-OS Telemetry Resource Module (#59126)
* Combined telemetry module commit

* Minor fixes

* Add back whitespace

* Add telemetry subscription support and simplify

* Remove comment line

* Make ansibot happy

* Create common build_args method

* More ansibot fixes

* Refactored integration tests, remove old files

* Add subscription tests

* Add integration tests

* Update module docs

* Test updates

* Address review comments

* Comment should be one line, not two

* Address Trishna comments

* State deleted should purge all config

* Remove misleading comment

* Doc fixes

* Fix source int bug and remove local debug msg

* Add additional integration test checks
2019-08-05 11:35:46 +05:30
Dave Bendit
fc558fb85f [docker_container] Adding support for mounts option (#49808)
* [WIP][docker_container] Adding support for `mounts` option

Fixes #42054

* Adjusting to current standards.

* Add changelog.

* Adjust types.

* Cleanup.

* Add idempotency checks for mounts.

* Improve diff for mounts.

* Linting.

* Python 2.6 compatibility.

* Fix error message formatting.

* Move mounts and volumes tests into own file.

* Add set of mount tests.

* Golang's omitempty for bool omits false values.

* Simplify sanity checks. Correct order of volume_options sanitization and usage.

* Fix key.

* Fix check.

* Add tests where both volumes and mounts show up.

* Add collision test.
2019-08-02 17:11:14 +02:00
Felix Fontein
a7573102bc
docker_container: fix port bindings with IPv6 addresses (#59715)
* Pass IPv6 addresses for port bindings without square brackets.

* Add changelog.

* Add test.
2019-08-02 17:10:39 +02:00
Ruediger Pluem
f94772f807 Only error out if the gid exists with a different group name (#59769)
Only error out if the gid exists with a different group name as
otherwise it will error out if the group with this gid already
exists, like on a rerun of the playbook. This fixes a regression
introduced by 4898b0a4a2.
2019-08-02 15:51:10 +02:00
Sumit Jaiswal
b847327645
Resource module for ios_interfaces and Facts Update (#59716)
* ios interfaces resource
2019-08-02 14:34:05 +05:30
Markus Bergholz
18aae0a02b add new module with integration tests to manage gitlab project variables (#56574)
* add new module with integration tests to manage gitlab project variables

* fix invalid yaml in DOCUMENTATION variable and don't import * from ansible module

* remove extends_documentation_fragment and put imports after DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA

* fix author in documentation and remove import from display

* add alias file for integration test

* split long lines and try to fix the author key

remove tailing whitespace

* replace email address with github username

* adding the at style to username

* add metaclass and future import

* add state variable to be able to delete selected variables

* add test with state = absent

* update documentation. scheme is necessary

* use singular in exmaple section

* use key purge instead of purge_vars

use purge instead of purge_vars also in the integration test

* create gitlab object in the ansible main function

* remove usedless .format

* follow best practice fail message

* add return documentation, return information about which variables were added, updated or removed and catch gitlab api auth error

* use module_utils.api with api_url and api_token

* use dict instead of list for vars

* use project name instead of name as playbook key

* add ansible checkmode_support, reduce variables in gitlab_project_variables class, remove wrong/duplicated HAS_GITLAB_PACKAGE check

* use extends_documentation_fragment and don't pop elements from basic_auth_argument_spec

* use just project_variable as output variable

* update mutually_exclusive as suggested

* re-add api_token documentation, because it is not included in api basic auth

* remove useless statement

remove unnecessary if

* add one test with a changing value

* put type at first position

* keep item to reduce api calls, build array and keep indexes by replacing with None instead of poping

* more asserts

* Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

* remove unused return key from documentation

msg is only returned when failed

* Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

* remove error key, because it is not returned

* change also documentation from purged_vars to purge

* Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

Update test/integration/targets/gitlab_project_variable/tasks/main.yml

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

Update test/integration/targets/gitlab_project_variable/tasks/main.yml

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

* remove extra spaces

fix wrong spelling

* expand return value documentation with examples

* add check_mode test

reorder tests. first the check_mode test, later all other tests

* Update lib/ansible/modules/source_control/gitlab_project_variable.py

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

* fix existing keys in 'present' array

rework key handling (reduce code)

fix integration tests

use untouched instead of present to identify unchanged variable keys

fix wrong replacement

minor fixes on request

set aliases to unsupported, because the test succeed

remove posix group1 because it conflicts with unsupported

remove useless item from aliases

* rework gitlab connection
2019-08-02 09:08:37 +02:00
Jesse Evers
e410dcbfed Add logic to handle multiple actions in an ALB listener rule, Fixes #41861 (#41975)
* added logic to handle multiple actions in an ALB listener rule (#41861)

* fix linting and pep8 issues

* added test for multiple actions using OIDC authentication

* added error messages related to old versions of botocore and multiple actions

* fix action validation error checks (need to check the exception string)

* added logic to make oidc configs idempotent (remove clientsecret for check)

* modified TargetGroupName to TargetGroupArn substitution to account for multiple rule actions

* refactored tests so that it can be run against different versions of botocore

* fix runme.sh to refelct changes to cloud testsuite

* add UseExistingClientSecret to oidc config (AWS api change)

* remove tests for OIDC auth action; add tests for redirect and fixed-response

* add in fixes from markuman and mjmayer

* remove documentation for cognito integration (not sure how to test); added example config for fixed-response and redirect actions

* renamed oidc/multiple action tests; leaving commented due to some AWS API changes

* pep8 fix

* more pep8 fixes

* Restructure elb_application_lb test suite

Move from runme.sh to virtualenv based roles

Update policies to fix tests

Don't log temp dir deletion, so many files in the diff!
2019-08-02 10:40:53 +10:00
Sam Doran
bb1256ca9a Disable mongodb_shard and mongodb_replicaset tests
They are causing failures when run as part of the  entire group shippable/posix/group1/
2019-08-01 14:40:31 -07:00
dx0xm
c35b512413 vmware: new module vmware_dvs_portgroup_find (#59567)
* vmware: new module to find portgroup(s) based on different criteria
2019-08-01 14:52:51 +05:30
Mario Lenz
3aa73cb6b8 VMware: Refactor vmware_cluster into several modules (#58468)
Refactor vmware_cluster into several modules (vmware_cluster, vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan) as discussed in #58023.

vmware_cluster lacks a lot of configuration options for DRS, HA and vSAN. Implementing them
all in vmware_cluster would make the module hard to maintain. Therefore, splitting it into several
modules and implementing the missing configuration options in them seems a good idea to me.

This is step one, refactoring vmware_cluster into several modules. Step two, implementing more
configuration options for DRS, HA and vSAN, will follow.
2019-08-01 10:35:29 +02:00
Jordan Borean
349b2bdf43
Rebalance Windows CI groups based on recent delays to 2016 (#59838)
* Change to test out server 2016 CI issues

* ci_complete
2019-08-01 07:44:49 +10:00
Jordan Borean
093e2460b2
Windows testing - share code for creating a network device (#59847) 2019-08-01 07:43:31 +10:00
Rhys Campbell
dacfd72bd6 Integeration tests for mongodb_shard and mongodb_replicaset modules (#53900) 2019-07-31 12:45:21 -07:00
Nilashish Chakraborty
730fa78ca4
Add vyos_interfaces resource module (#58589)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-07-31 23:06:53 +05:30
Maciej Delmanowski
75be309242 Don't warn if local user is found in user database (#56838)
If the 'local' parameter of the 'user' Ansible module is enabled, and
the user has been found in the local user database, don't emit
a warning, because this is an expected outcome.

Add changelog and integration tests

Co-authored-by: drybed <drybjed@gmail.com>
2019-07-31 12:14:22 -04:00
Kevin Breit
b09fbc3bf3 New module - meraki_webhook (#57855)
* Initial commit for meraki_webhook

* Split integration tests into two files to avoid delegate_to
2019-07-31 11:31:16 -04:00
Kevin Breit
d105c205ef meraki_snmp - Add support for network SNMP settings (#57708)
* meraki_snmp module supports network SNMP settings
- Network SNMP settings were added to the API
- Parameters are different so it's a new data structure
- Full suite of integration tests
- Commit includes some cleanup as well

* Add reset task for SNMPv3
2019-07-31 11:29:57 -04:00
Kevin Breit
516b39b79a meraki_organization - Add deletion support (#59415)
* Add support for deleting organizations
- Still working on integration tests

* Update documentation and verify check mode works
2019-07-31 11:29:42 -04:00
Daniel Mellado Area
58a53fe0eb
Add junos_l3_interfaces (#59026) 2019-07-31 16:29:32 +02:00
Jill R
57e4312a36
Add metaclass-boilerplate to elb_target lamda test function (#59832)
* Add metaclass-boilerplate to elb_target lamda test function

This change makes elb_target pass after #59831
2019-07-30 17:40:24 -07:00
Markus Bergholz
196347ff32 ability to use lambda target in elb_target_group (#57394)
* enable elb_lambda_target test
2019-07-30 15:35:36 -07:00
Jordan Borean
652bfc7e19
win_template - use shared doc fragment for shared options (#59701)
* win_template - use shared doc fragment for shared options

* Change smart quote to em dash and fix whitespace issue
2019-07-31 08:05:24 +10:00
Sam Doran
691976c3d0
Fix podman_image integration tests (#59805)
Pin podman package at a specific version
2019-07-30 15:11:35 -04:00
Abhijeet Kasurde
2ebc4e1e7e inventory: Handle IndexError while parsing limit file (#59776)
Handle IndexError exception raised while parsing the limit file.

Fixes: #59695

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-30 13:02:17 -04:00
Gonéri Le Bouder
1ec155e773 vmware_guest: clone VM with attached CDROM
If a VM has an attached CDROM, `backing` attribute of the CDROM will
be defined.
As a result, we cannot just loop `vm_obj.config.hardware.device` and check
for the existance of the attribute to decide if the entry is a
harddrive.

Instead, we check the type of the device, and only keep the
`vim.vm.device.VirtualDisk` disk.

This issue is actually breaking our test-suite with regular environment
because we keep a Fedora ISO attached to the VM.
2019-07-30 14:09:07 +02:00
Lukas Kämmerling
5bddd2f04a Add hcloud_network module (#59366)
* Add hcloud_network module

* Apply suggestions from code review

Co-Authored-By: Matt Clay <matt@mystile.com>

* Add notice about dependency

* Adjust tests

* Apply suggestions from code review

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

* Allow changing of ip range

* Add Setup step
2019-07-30 14:00:33 +02:00
Abhijeet Kasurde
dbe618c084 podman_image: Disable unstable test
Disabling tests for podman_image until CI is green.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-30 11:43:03 +02:00
Sam Doran
19299f3310
Order data in xml integration test (#59742)
A recent update to lxml for Python >= 3.6 now preserves key order. Change the test input so the input is sorted, making tests pass on previous versions of lxml as well as the latest version.
2019-07-29 16:18:46 -04:00
Gonéri Le Bouder
93ea961205 vmware_guest: enable 3 extra tests
- network_with_dvpg
- network_with_portgroup.yml
- template_d1_c1_f0.yml
2019-07-29 15:28:52 +02:00
Tommy Brecher
4d775cbbf1 ec2_eip - added support for BYOIP and filtering reuse addresses by tag/value (#59180)
* change variable name from isinstance to is_instance (prevent overriding builtin function)

* Added support for:
  - Filtering existing Elastic IPs based on a tag name or it's value (when reuse_existing_ip_allowed is true)
  - Allocating new Elastic IPs from a given IPv4 pool (BYOIP support)

* yamllint corrections

* added examples for:
  -  tag_name,
  -  tag_value
  -  public_ipv4_pool

* remove aliases

* Added changelog fragment

* added integration tests for ec2_eip module

* removed space to trigger rebuild
2019-07-29 19:40:19 +10:00
Trishna Guha
6aaf0ea382
fix test typo nxos_lag_interfaces (#59710)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-07-29 12:40:23 +05:30
Paul Belanger
c562b53cb2 Fix nxos_facts integration tests (#59643)
This was incorrectly asserting the result of previous nxos_facts task.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-07-29 12:05:35 +05:30
Tom Moore
a589cac18a Windows: new win_netbios module (#58331)
* Initial commit win_netbios module

* Ansibot sanity improvements.

* Corrected file permissions.

* Windows: module description update

* Adding integration tests

* Added missing alias file

* Improvements made to tests and WMI efficiency.

* Correction from sanity check failures

* Shippable corrections

* Moved reboot flag.

* Slight tweak to return value conditoin
2019-07-29 07:56:53 +10:00
Sorin Sbarnea
7c6fb57b7d Implements extra_hosts for docker_image module (#59540)
* Implements etc_hosts for docker_image module

Allows custom hosts on docker_image module.

The of this option made impossible to use docker_image module to build
images that required a custom hostname in /etc/hosts. For running
containers this option was already present.

While the python-docker API uses extra_hosts term, our existing module
already uses etc_hosts argument, so it sounds better to have some
consistency between docker_container and docker_image.

Fixes: #59233

* Update test/integration/targets/docker_image/files/EtcHostsDockerfile

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

* Update lib/ansible/modules/cloud/docker/docker_image.py

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

* Update changelogs/fragments/docker_image_etc_hosts.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-07-26 16:39:21 -04:00
Andrey Klychkov
5b1a4f959a postgresql_set: improve CI tests (#59583) 2019-07-26 19:53:34 +02:00
Kevin Breit
3cdc667888 New module - meraki_mx_l7_firewall (#55485)
* Initial commit for meraki_mx_l7_firewall module

* Add argument checking

* Sanity fixes

* Fix crash and improve integration tests

* Improved integration tests and coverage

* Reformat response data
- Module does not match argument structure of API
- PR reformats the response to match Ansible arg spec
- Improved integration tests

* Fix reformatting for diffs

* Create rename_* functions
- is_update_required() ignores the key id
- Meraki expects one of the keys to be id
- Function temporarily renames key to appId to get around this

* Tweak documentation and tests
- Tests now do an include so each task doesn't need delegate_to

* Fix which files I'm editing
2019-07-26 11:43:28 -04:00
Kevin Breit
f8f3986871 New module - meraki_nat (#52889)
* Initial commit for meraki_nat module
- Query fully works
- Present is still very much in development

* Add initial code for present functionality, not complete

* Add request documentation

* Add examples and return documentation.

* Added payload to requests
- Module seems to need new idempotency check

* Allow 1:1 and 1:many NAT to work
- New idempotency check method is probably required to work

* Make all three options work
- Module isn't idempotent

* Diff support
- Added integration tests
- Diff support isn't quite done

* Fix diff output

* Enable idempotency assertion in tests

* Add test assertions for code coverage

* Update documentation and tests
- Split tests to separate file to avoid delegate_to

* Fix blank line
2019-07-26 11:42:36 -04:00
Kevin Breit
db783eb2b9 New module - meraki_firewalled_services (#57289)
* Initial commit for module
- Module can query or modify network services on Meraki gear
- Check mode supported
- Integration tests included

* Small change to examples

* Move mutual exclusive to build in approach

* Sanity err

* Split integration tests into two files to avoid delegate_to

* Add the integration tests, woops
2019-07-26 11:39:20 -04:00
Pilou
65013c4001 consul_session: ensure certificate is checked when HTTPS is used (#58693)
* consul_session: ensure SSL certificate is checked

* consul_session: don't ignore validate_certs param
2019-07-26 15:05:38 +02:00
Gonéri Le Bouder
8a821d57bd vmware_cluster_facts: fix the functional test
Fix the variable names.
2019-07-26 14:10:44 +02:00
Gonéri Le Bouder
964783fbd2 vmware_guest: speed up vmware_guest tests
- Use predictable VM name during the tests (test_vm1, test_vm2 and
  test_vm2). This to simplify the teardown of the newly created resource
  before the next test.
- Update the documentation to explain the new requirement
- Avoid VM creation with `with_items` when it's not mandatory. This to:
    - speed up the test execution, our hypervisors have limited resources
    - simplify the teardown
- Remove `create_d1_c1_f0_env.yml`, the test was just testing how Ansible
  pass environment variables.
- Correct the name for the `f0` variable (`f1`)
- Fix the DVS tests, the hosts can now reach the dvswitch1 vswitch
- Provision the VM with a poweroff status, this to improve the
  idempotency and sleep up the tests
- Avoid the use of `prepare_vmware_tests` to prepare virtual machines
  when we just need one machine
2019-07-26 14:07:01 +02:00
Nilashish Chakraborty
3da4c0dd3a
Update argspec to normalize across platforms (#59596)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-07-26 12:30:26 +05:30
Sam Doran
3ceeae0de9
Make docker swarm integration tests more reliable (#59473) 2019-07-25 12:49:30 -04:00
basos g
3c8838f0f7 Add check mode indicators at the beginning and the end of the playbook, play, and task (#49432)
* Add integration tests for default callback check mode markers
2019-07-25 12:05:43 -04:00
Will Thames
60c76be03c rds_instance: add point-in-time instance restore test (#59411) 2019-07-25 09:49:08 -04:00
Gonéri Le Bouder
ef59dd2ca2 vmware_guest_network: fix the network look up
Before this fix, the module was not able to look up a `VM Network` located at
`/DC0/network/VM Network`. As a consequence, the test module was failing
with a real environment (Non-govcsim).
2019-07-25 14:02:52 +02:00
Nilashish Chakraborty
f2b0bfd4aa
Add iosxr_lacp resource module (#59281)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-07-24 22:55:42 +05:30
Gonéri Le Bouder
fb96f0b8ae vmware_content_library_info: init the functional test
`vmware_content_library_info` functional test is currently broken because it
assumes the vCenter content library is not empty.
With this commit, the test inits the vCenter content library database using
`prepapre_vmware_tests`, this before the functional test execution.
2019-07-24 16:47:25 +02:00
Gonéri Le Bouder
47496098e7 vmware_dvs_portgroup_facts: test depends on a dvswitch
Creates the missing dvswitch that is used by the test.
2019-07-24 16:46:48 +02:00
Strahinja Kustudic
5fc769f6b1 sysctl - Reload also when current system values differ (#56153)
Previously if `sysctl_set=no` (which is the default) this module only
checked for changes in the sysctl.conf file to decide whether it should
reload it or not. This means that if the values in the conf file are the
same as they are set with the module, but the current values on the
system are different, that this module wouldn't apply the changes on the
system and thus the value set with the module wouldn't be applied on the
OS. This isn't obvious and it doesn't make sense that the module works
like that by default, especially because there is a separate option
`reload`. Now sysctl will also check if the current value differs on the
system and if it does, it will reload the file again.
2019-07-24 10:04:15 -04:00
Abhijeet Kasurde
401e70c0a2
VMware: add facts about tags in vmware_cluster_facts (#56848)
Fixes: #46458

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-24 15:45:15 +05:30
Martin Krizek
1010363c0b
Preserve original variables when using a loop (#59426)
Fixes #59414
2019-07-24 11:35:14 +02:00
Jordan Borean
ba7097cba3
Collection test (#59488)
* Add missing __init__.py for collection unit tests

* Added more tests for collection install and remove default path
2019-07-24 12:38:32 +10:00
Felix Fontein
266d6e77a9 Re-enable docker_container tests (#59425)
Mark dependent container's ipc_mode as shareable
2019-07-23 10:20:18 -04:00
Ganesh Nalawade
1092ee55d4
Add [junos_lag_interfaces] resource module (#59011)
* Add junos_lag_interfaces resource module

*  Add new resource module junos_lag_interfaces.
*  Targets model https://github.com/ansible-network/resource_module_models/pull/29
*  Deprecate junos_linkagg module

* Fix CI issues

* Fix junos integration test cases

* Fail if base lag interface is not configured
2019-07-23 11:53:15 +05:30
Trishna Guha
3bad4d6a50
Add nxos_lag_interfaces resource module (#59031)
* Add nxos_lag_interfaces resource module

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

* ix CI failure

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

* module_utils nxos transport-provider fix

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

* CI failure

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

* nxos_lag_interfaces tests

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

* Integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-07-23 11:11:37 +05:30
Sam Doran
67c69f3540 Mark Docker tests unstable (#59408)
* Mark Docker tests unstable

- docker_swarm is unstable on RHEL 8
- docker_container is unstable on RHEL 7

* Disable docker_container test.
2019-07-22 16:40:45 -07:00
PRASOON KARUNAN V
a20afb5822 Add support for test script parameters in win_pester (#58790)
* add parameter list argument

* add tests

* fix test and add doc

* correct test file

* fix typo

* fix tests

* fix typo in file name

* correct file name reverting the previous commit

* correct property name

* add checkmode message

* changes as per review comments

* variable casing and other review comment changes

* define $test_parameters_check_mode_msg variable
2019-07-23 05:46:26 +10:00
Trois-Six
6f9f67be18 virt_net: add way to get facts for only one specified network 2019-07-22 16:34:07 +02:00
Evert Mulder
66d12f6f1e Only convert VirtualDiskFix for #57653 clone_with_convert is failing 2019-07-22 12:52:48 +02:00
Martin Krizek
b7868529ee
Revert "Speed up VariableManager by preserving Templar state. (#45572)" (#59280)
This reverts commit 6069d09b9d.

Fixes #57351
2019-07-22 10:27:11 +02:00
Abhijeet Kasurde
791e565802
VMware: Additional testcase for mem_reservation (#59365)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-22 10:44:19 +05:30
Abhijeet Kasurde
1f49abb51c
VMware: Accept 0 as valid value for memory reservation (#59230)
vmware_guest accepts 0MB as valid value for memory reservation in
virtual machine hardware configuration. This fixes the regression
introduced via 193f69064f.

Fixes: #59190

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-22 09:03:25 +05:30
Jordan Borean
2f2b106423
Fix win_reg_stat for HKU hives (#59359) 2019-07-22 09:12:14 +10:00
Jordan Borean
015119df8c
Windows - Add common util for web requests (#54759)
* Windows - Add common util for web requests

* Use different method of retrieving options from module arg spec

* Added proper version_added for module options

* Fix linting errors

* Fix proxy issues and updated cred docs

* Fix FTP usage with proxy settings

* Removed uneeded function added in bad rebase

* Fix up client certificate auth

* fix new sanity checks

* Edit http agent code and update porting guide
2019-07-22 08:42:24 +10:00
The Magician
e7fba5cea0 New Module: gcp_mlengine_version (#59224) 2019-07-19 16:52:40 -04:00
The Magician
5b0214bcce New Module: gcp_appengine_firewall_rule (#58852) 2019-07-19 16:42:37 -04:00
The Magician
40ff1949fb New Module: gcp_mlengine_model (#59222) 2019-07-19 16:41:07 -04:00
Sam Doran
8edad83ae0
User - make groups and append mutually exclusive with local (#59309)
* Update intigration tests
2019-07-19 16:05:15 -04:00
The Magician
b75e8d19be Bug fixes for GCP (as of 2019-07-09T06:06:53Z) (#59132)
* Bug fixes for GCP modules

* ignore syntax
2019-07-19 11:32:05 -07:00
Sloane Hertel
1d3f2c7764
disable s3_lifecycle tests (#59311) 2019-07-19 13:20:15 -04:00
Nilashish Chakraborty
bb006db7c8
Add exclusive configuration mode support (#59289)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-07-19 19:03:35 +05:30
Raul Mahiques
fd2116e26a Added state "remount" which will remount the device (#52649) 2019-07-19 08:59:27 +02:00
Aljaž Košir
42073b6331 Add lambda_bucket_event module (#58059) 2019-07-18 10:54:01 -07:00
Jill R
1c1da3c11d
Re-enable ec2_vpc_vpn_facts test (#58893) 2019-07-18 09:17:15 -07:00