Commit graph

4610 commits

Author SHA1 Message Date
Paul Belanger
b975fd407d
Remove timeout from nxos tests (#65470)
This fixes the following:

  Unsupported parameters for (nxos_rollback) module: timeout unsupported

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-05 10:39:35 -05:00
Andrey Klychkov
c59e061cff mysql_info: add exclude_fields parameter (#63371)
* mysql_info: add exclude_fields parameter

* mysql_info: add exclude_fields parameter, add changelog fragment

* change logic
2019-12-05 13:29:58 +00:00
Andrey Klychkov
8f78a0f8bf postgresql_publication: use query params with cursor object (#65404)
* postgresql_publication: use query params with cursor object

* add changelog
2019-12-05 10:44:45 +00:00
Andrey Klychkov
0c71249b03 mysql_db: add force parameter (#65547)
* mysql_db: add force parameter

* mysql_db: add force parameter

* add changelog

* add the param to state dump
2019-12-05 10:44:22 +00:00
Andrey Klychkov
c266fc3b74 postgresql_db: add executed_commands returned value (#65542)
* postgresql_db: add executed_commands returned value

* add changelog

* fix tests
2019-12-05 10:53:08 +01:00
Jordan Borean
4d3ebd65db
win_auto_logon - check, diff and store pass in LSA (#65528)
* win_auto_logon - check, diff and store pass in LSA

* Ensure baseline keys are set for test

* Skip remove item prop on check mode due to win bug

* Start at a cleared baseline to ensure old LSA secrets are cleared
2019-12-05 11:24:30 +10:00
haiyuan_zhang
cff80f1319 azure_rm_galleryimageversion: support data disk snapshot as source input (#65405)
* azure_rm_galleryimageversion: support data disk snapshot as source

* fixing typo
2019-12-05 08:31:47 +08:00
PRASOON KARUNAN V
2dcaa108d8 Adding new module win_auto_logon (#63414)
* add new modul

* correct password var

* fix for linting issues

* add return values documentation

* linting fixes

* Get tests working and simplify a bit
2019-12-05 09:27:08 +10:00
Matt Clay
567c860027
Split up docker-registry test target. (#65211)
* Copy relevant docker-registry files:

docker-registry/files/nginx.conf -> setup_docker_registry/files/nginx.conf
docker-registry/files/nginx.htpasswd -> setup_docker_registry/files/nginx.htpasswd
docker-registry/meta/main.yml -> setup_docker_registry/meta/main.yml
docker-registry/tasks/main.yml -> setup_docker_registry/tasks/main.yml
docker-registry/tasks/main.yml -> setup_docker_registry/handlers/cleanup.yml

* Remove non-cleanup code from handlers/cleanup.yml.

* Remove tests and cleanup from tasks/main.yml.

* Register cleanup handler.

* Use setup_docker_registry in docker-registry test.

* Fix handler execution order.

* Split out docker_login integration test.

* Move remaining tests into docker_image test.

* Cleanup before running docker_image options test.

* Improve reliability of test cleanup.

* Move files for conditional inclusion.

* Set proper conditions on tests.

* Rename tasks file for conditional inclusion.

* Conditionally include tasks.
2019-12-04 14:14:43 -08:00
Gonéri Le Bouder
a8efe7442c
vmware/test: set vmware/scenario/vcenter_only alias (#65515)
Add the `vmware/scenario/vcenter_only` alias to be able to identify the
vmware test roles that can be tested with just on vcenter instance.

Also, add a check to be sure we don't try to attach ESXi hosts if none
has been defined.
2019-12-04 17:12:29 -05:00
Andrey Klychkov
651dff6a2e mysql_db: add the executed_commands returned value (#65498)
* mysql_db: add the executed_commands returned value

* add changelog
2019-12-04 18:31:33 +05:30
Sylvain Monné
03c16096d7 Fix extract filter when key does not exist in container (#64959)
Fixes #64957
2019-12-04 13:24:52 +01:00
Daniel Mellado
9404384985
Add junos_static_routes module (#65239)
This commit adds a new network resource module for static routes on
junos devices.

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
2019-12-04 12:59:56 +01:00
RusoSova
2d074f2a31 win_description Module (#61629)
* win_description Module

Module to change Windows description and Windows license owner information.

* LiteralPath updated

changed -path to -LiteralPath in the script

* Version and metadata_version

version_added updated to 2.10
Metadata_version set to 1.1

* version updated

version_added changed to '2.10'

* Changes based on feedback

* removed some redundant checks

* Rename win_description.ps1 to win_computer_description.ps1

* Rename win_description.py to win_computer_description.py

* Module name change

* Integration tests added

* added aliases file

* Change compatibility from 2008 to 2008R2

* Update aliases
2019-12-04 14:25:16 +10:00
rnsc
cfb6cb4cef Win data deduplication module (#59723)
* win_data_deduplication initial commit

* Ansible version added bump

* integration tests

* missing aliases

* Fixing documentation

* license and metadata

* documentation formating

* removing win_format ref

* documentation fixes

* trailing whitespace

* Fixing more documentation :(

* missing return

* documentation cleanup

* align copyright with doc

* indentation fixes...

* updated examples

* ignore meta and future for python doc

* removing when

* use Get-PSVolume

* Get-Volume not PSVolume

* missing updated var

* updated old drive refs

* make sure that the T drive is formated as NTFS

* path and drive_letter are exclusive

* idempotence test fix

* changing task order + reboot timeout

* implementing the requested changes to the code

* updating documentation to reflect code changes

* simplifying tests

* missing feature install before running the tasks

* pslint trailing whitespace

* putting old tests back

* missing win_format

* skip windows 2012

* Fixing message for OS check

* pass settings and dedup_job variables

* Removing unnecessary module

* logic issue

* replacing tabs with double space

* documentation fix + removing tabs

* Update documentation with recent changes

* Apply changes requested

* switch feature install with partition format

* replace tabs with spaces

* trailing whitespace

* we don't need those ignores anymore

* minor fixes

* updated test to match latest code changes

* removing dedup job task

* adding check mode yes test

* fixes for check_mode support

* updating examples in documentation

* wrong indentation for check_mode in tests

* convert indentation to spaces

* -not $check_mode

* removing unneeded spec in documentation

* Switch to Ansible.Basic

* 2.9 is already gone, so let's add this module to 2.10...

* removing useless else condition

* updated documentation

* fixing specs and removing useless try/catch + fix exit/fail

* spaces indentation

* $null check is actually needed if volume never had dedup

* Missing check_mode update

* removing required for default state in documentation

* converted tabs to spaces
2019-12-04 14:21:21 +10:00
Shachaf92
584824f560 win_share - Implement append paramtere for access rules (#59469)
* win_share - Implement append paramtere for access rules

* changed fragment

* add test

* missing bracket

* removed whitespace

* Wrong number of lines

* Forgot the actual new parameter in the test

* community review

* Change option names

* version update

* Update tests.yml

* Add idempotence to rule_action: add
2019-12-04 14:16:10 +10:00
Brant Evans
ed54b9b441 add win_initialize_disk module (#58617)
* add win_initialize_disk module

* Add ability to specify disk by path or uniqueid

* Fix documentation

* fix shippable failures

* Update anisble version

* Slight tweaks to the documentation

* Small documentation fixes
2019-12-04 12:37:15 +10:00
Matt Clay
85722c360f Disable failing hcloud tests. 2019-12-03 17:52:08 -08:00
Samir Jha
db709488bd Update foreman inventory to use foreman's inventory report (#62438) 2019-12-03 15:11:40 -07:00
Gonéri Le Bouder
974e8cec3d
prepare_vmware_tests: run test w/ just 1 vcsa (#65433)
Add the ability to run test with just a VCSA instance. This allow us to
test a subset of tests that don't need any ESXi nodes.
2019-12-03 11:17:06 -05:00
Kiyo Nagamine
daecbb9bf0 Ensure allow_duplicates: true enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment
2019-12-03 10:21:54 -05:00
Yanis Guenane
c19949706f vyos: Make vyos related yaml file passing yamllint (#65449) 2019-12-03 09:34:35 -05:00
Prasad Katti
37ce55fd79 lightsail - Use AnsibleAWSModule (#65275)
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes #63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
2019-12-02 13:12:44 -07:00
Mario Lenz
02e7c5a19f vmware_datastore_cluster: Added SDRS configuration (#65193) 2019-12-02 15:02:50 -05:00
Jiri Tyr
a8ef5d5034 VMware: Autoselect datastore only from the given cluster/ESXi (#43435)
* Autoselect DS only from the given cluster/esxi
* Run tests only on real vCenter
2019-12-02 21:53:08 +05:30
Andrey Klychkov
0cadb952f9 postgresql_ext: use query_params (#64994)
* postgresql_ext: use query_params

* added changelog
2019-12-02 13:32:25 +00:00
Maxim Babushkin
da73bbd73c openssh_keypair - Add logic to handle password protected or broken key (#64436)
* The ssh key may be created manually prior the task execution with a
  passphrase. And the task will be executed on the same key.
* The ssh key may be broken and not usable.

The module will check the private key and if the key is password
protected or broken, it will be overridden.
The check of the ssh key performed by retrieve the public key from the
private key.

Set the "self.force" check before the "isPrivateKeyValid" check.
In case of any issue with the "isPrivateKeyValid" function, the user
will be able to force the regeneration of the key with the "force: yes"
argument.
2019-12-02 08:12:38 +01:00
Hans Jerry Illikainen
a0b8b85fa5 ufw: add support for interface_in and interface_out (#65382)
* ufw: escalate privileges in integration tests

A few of the integration tests for the UFW module forgot to `become`.
This is problematic if the test suite is executed as a non-privileged
user.  This commit amends that by adding `become` when appropriate.

* ufw: add unit tests for direction and interface

Extend the unit tests for the UFW module to test the `direction` and
`interface` parameters.  This will help in the implementation of a fix
for issue #63903.

* ufw: add support for interface_in and interface_out

The UFW module has support for specifying `direction` and `interface`
for UFW rules.  Rules with these parameters are built such that
per-interface filtering only apply to a single direction based on the
value of `direction`.

Not being able to specify multiple interfaces complicates things for
`routed` rules where one might want to apply filtering only for a
specific combination of `in` and `out` interfaces.

This commit introduces two new parameters to the UFW module:
`interface_in` and `interface_out`.  These rules are mutually exclusive
with the old `direction` and `interface` parameter because of the
ambiguity of having e.g.:

    direction: XXX
    interface: foo
    interface_XXX: bar

Fixes #63903
2019-12-02 08:01:44 +01:00
Hans Jerry Illikainen
2acfa0e08c Add passphrase support for luks_device (#65050)
* Elevate privileges for luks_device integration tests

Several tests in `key-management.yml` don't `become` before executing,
despite needing elevated privileges.  This commit fixes that.

* Add passphrase support for luks_device

Previously, the luks_device module only worked with keyfiles.  The
implication was that the key had to be written to disk before the module
could be used.

This commit implements support for opening, adding and removing
passphrases supplied as strings to the module.

Closes #52408
2019-11-30 20:50:30 +01:00
Gonéri Le Bouder
0407af936a
vmware/test: switch the ro of the two datastore (#65356)
The `ro_datastore` was actually using the value of `rw_datastore`.
2019-11-29 10:23:57 -05:00
Andrey Klychkov
6ae01d4fbd postgresql_owner: use query_params with cursor (#65310)
* postgresql_owner: use query_params with cursor

* add changelog fragment
2019-11-27 10:42:26 +00:00
Netmonk
8d6192d61e adding encoding dump/import support for the mysql_db module, with upd… (#65228)
* adding encoding dump/import support for the mysql_db module, with updated documentation, and full test suite

* fixing lint issue test #3

* fixing lint issue test #1

* fixing lint issue test #1 second time

* Improving Test to be re-entrant

* improving test to not fail on centos/6

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Comminting suggestion

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

comminting suggestion

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* adding comment

Adding comment to explain test strategy

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

accepted

Co-Authored-By: Andrey Klychkov <aaklychkov@mail.ru>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Andrey Klychkov <aaklychkov@mail.ru>

* Update encoding_dump_import.yml

* Fixing typoo
2019-11-27 10:41:55 +00:00
Abhijeet Kasurde
8d0c2cd4d5 include_vars: Check NoneType for raw_params (#64979)
Lookup 'first_found' returns empty list which results in
raw_params checking. Check NoneType for 'raw_params' before
proceeding.

Fixes: #64939

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-26 13:11:02 -05:00
Jill R
ee413fe414 Allow updating of ec2_group rules with EC2 classic ELB targets (#62374)
* Allow updating of ec2_group rules with EC2 classic ELB targets

Fix regression introduced in #45296 with EC2 Classic SGs

Fixes: #57247

Also add (unsupported) ec2 classic test suite with test case for this scenario

* move ec2 classic tests to conditional within ec2_group target

* clean up ec2_classic tests

* ec2_classic account can't run most ec2_group tests
2019-11-26 11:29:03 -05:00
Xu Yuandong
7f97f86303 add a new module to configure multicast igmp and enable it. (#63746)
* add a new.

* import-error

* update docs.

* add unittest.

* Update test_ce_multicast_igmp_enable.py

* add a ihtegration test.

* update for review.

* update for review.

* add notes.
2019-11-26 11:38:30 +00:00
Xu Yuandong
76e904e44f add a new module to create isis instance. (#63716)
* add a new

* update to add futuer.

* update

* update shippable

* update docs.

* update

* add unittest.

* add integration test.

* update for shippable.

* syntax error

* syntax error

* syntax error

* update for review.

* update for review.

* add notes.
2019-11-26 11:23:05 +00:00
Xu Yuandong
8c88ee3b9f add a new module to configure multicast global. (#63745)
* add a new module.

* add future

* update docs.

* update

* update

* update

* update

* add test.

* Update test_ce_multicast_global.py

* update for review.

* update for review.

* add notes.
2019-11-26 11:22:39 +00:00
Xu Yuandong
9f58e915d9 add a new module to configure mdn on interface. (#63755)
* add a new module to confiure mdn on interface.

* doc-default-does-not-match-spec.

* add unittest

* Update test_ce_mdn_interface.py

* add integration.

* update for review.

* add notes.
2019-11-26 11:21:40 +00:00
sky-joker
2242c385b2 Zabbix: zabbix_template: fix #63907 and add test case (#65236)
* Zabbix: zabbix_template: fix https://github.com/ansible/ansible/issues/63907 and add test case

* update test case
2019-11-26 11:18:55 +00:00
Xu Yuandong
eb423ecec0 add a new module to configure isis on interface. (#63717)
* add a new.

* update doc

* update docs.

* update

* delete provider.

* add future.

* add unittest

* add integration test.

* KeyError

* update for review.

* add notes.

* unused codes removed.
2019-11-26 11:12:31 +00:00
Ganesh Nalawade
ee3f8d28a4
Fix cli context check for network_cli connection (#64697)
* Fix cli context check for network_cli connection

Fixes #64575

*  Check cli context for network_cli connection
   at the start of new task run only.

* Pass task_uuid around to identify start of new task run

* Handle for local connection
2019-11-26 08:40:49 +05:30
The Magician
cd8b42c376 Bug fixes for GCP modules (#64823) 2019-11-25 19:20:07 -05:00
Micah Hunsberger
19063166dd New Windows Module: win_file_compression (#56475)
* add win_compact module

* fixed line endings

* fix documentation

* Use cim method instead of wmi method

* renamed to win_file_compression
added single file support
added force option to avoid traversing large directory structures

* fixed end of file

* fixed renaming.
bench test still had win_compact as a module

* Removed more NTFS references and slight test tweaks
2019-11-26 09:26:13 +10:00
Sloane Hertel
c1f280ba6e
Inventory CLI - Ignore settings for when vars plugins should run (#65073)
* Inventory CLI - Ignore settings for when vars plugins should run and just always run them

* Add note to porting guide

* Fix loading vars plugins

* changelog

* Remove a staging test for ansible-inventory since it ignores that setting
2019-11-25 13:16:03 -05:00
Gonéri Le Bouder
8f1af61851
vmware_guest: relax the requirements of the tests (#65192)
- 128MB or RAM is enough for most of the cases
- 1VCPU is also enough
2019-11-25 12:58:22 -05:00
Nabil BENDAFI
277dd54d45 Fix/archive empty file (#64895)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file
2019-11-25 11:23:14 -05:00
Mike Wiebe
89954e6ef5 Test fix (#65132) 2019-11-25 12:16:19 +05:30
Trevor Pounds
8daa42bb3d Support non-KV and KV v1/v2 secret engines (#64288)
* Support generic and KV v1/v2 secret engines.

Fixes #41132
Fixes #50598
Fixes #54462
Fixes #64150

* Update KV v2 compatibility notes/usage docs.

* Add tests for KV v1/v2 and generic secrets engines.

* Add changelog fragment.

* Add KV v2 behavior changes to porting guide.

* Fix pylint blacklisted name warnings.
2019-11-25 06:18:49 +01:00
Rostyslav
a8fa432096 Add --override-arguments option to win_chocolatey module (#65101)
* Add --override-arguments option to win_chocolatey module

* Fix version and argument type

* Added changelog fragment and tests
2019-11-25 09:51:13 +10:00
Felix Fontein
0b8b5baecd
docker_container: add support for --cpus (#64683)
* Add support for --cpus.

* Adjust PR #.

* Add version_added.
2019-11-24 05:04:42 +01:00
Michael Cassaniti
a096cd08c5 docker_swarm_service: Sort lists when checking for changes (#63887)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are 
reported changed when the order of the items is different. This PR 
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

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

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-11-23 20:31:35 +01:00
Gonéri Le Bouder
239213baee
vmware_guest: do not use autoselect_datastore in test (#65191)
Disable the use of `autoselect_datastore` until https://github.com/ansible/ansible/issues/58541
is fixed.
2019-11-22 21:17:05 -05:00
John Chen
c73288ad53 user - compare macOS user properties using same type (#62973)
self._get_user_property returns a string, so when doing a comparison
using this value, cast the second variable to a string so that the
comparison behaves correctly
* Add changelog
* Add to_text import
* Add integration test
2019-11-22 17:05:17 -05:00
Pavan Bidkar
d4c4c92c97 Fix issue 64503. Added pool to relocate spec (#64544)
VM relocate to destination host works without pool param when hosts are part of same cluster. but spec.pool is required when hosts are part different clusters.

Closes: #64503
2019-11-22 16:42:41 -05:00
Sam Doran
d3f6943446
Remove postgresql_shared integration test (#65133)
Move test tasks into appropriate integration test
2019-11-22 09:30:10 -05:00
Jan Meerkamp
315cc2f3ea VMware: vcenter_folder checks nested parent folder path (#62741)
added possibility to create Subfolder by defining full path below datacenter

Closes: #64442
2019-11-22 09:25:42 -05:00
Diane Wang
d05d5cfc39 VMware: add new module vmware_guest_controller (#59615)
Add the `vmware_guest_controller` module.
2019-11-22 09:05:10 -05:00
Prasad Katti
95bd92da04 Add integration tests for aws lightsail (#63770)
* Add integration tests for aws lightsail

* lightsail - use module_defaults instead of aws_connection_info

* lightsail tests - assert instance state on create

* Fix yaml syntax error

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* [lightsail] create keypair as part of the testsuite

* Fix lightsail actions in compute-policy

* Add ability to delete keypair in lightsail_keypair
2019-11-21 16:53:36 -07:00
Michael Mayer
d52af75c68 Add aws elb multiple host header support (#65021)
* Add support for aws elbv2 multiple host header actions

* Add example of multiple host header

* Add test for multiple host headers

* Add missing quote

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Remove debug statements
2019-11-21 09:42:37 -07:00
Mark Chappell
f1311d3e98 Rewrite iam_policy using boto3 (#63924)
* reworked iam_policy

* Deprecate policy_document option

* deprecate defaulting skip_duplicates to true

* No longer explicitly catch ParamValidationError.

ParamValidationErrror is already caught by ClientError

* Work with complex policy objects rather than json documents

comparisons can better cope with the special cases (eg True vs "True" )

* Enable check_mode tests and fix related 'changed' bug

* changelog

* doc cleanup based on review
2019-11-20 16:59:02 -07:00
Felix Fontein
b36f572256 openssh_keypair: fix idempotence issue (#65017)
* Fix idempotence issue.

* Add changelog.
2019-11-20 20:02:26 +00:00
Andrey Klychkov
509b989a9a postgresql_lang: use query parameters with cursor.execute() (#65093)
* postgresql_lang: use query parameters with cursor.execute()

* add changelog fragment
2019-11-20 20:00:07 +00:00
Xu Yuandong
cc5132a8ba add a new module to configure isis on isis-view. (#63720)
* add a new module.

* update docs.

* update docs.

* update again.

* add __future__

* update docs, some args type

* update docs, some args type

* add integration test.

* add unittest.

* update for shippabel.

* update for syntax error.

* Update setup.yaml

* Update setup.yaml

* Update cleanup.yaml

* update for review.

* add notes.
2019-11-20 14:37:13 +00:00
Kevin Breit
2cf079bc8f Meraki - Remove integration tests which work with HTTP respons… (#64975)
- These are modular level and I'm not catching these anyways
- More appropriate for unit tests, at least for HTTPS
2019-11-20 09:24:12 -05:00
Abhijeet Kasurde
35cc26f8c0
VMware: Find unique tag using category id (#61082)
If two tags with same name and different category exists, vmware_tag_manager
used to take first found tag.

This commit use combination of tag and category to identify the category.

Fixes: #59379

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-20 14:43:04 +05:30
Jordan Borean
f5133bec22
Fix up broken Windows test when run with coverage (#65085) 2019-11-20 08:53:38 +10:00
Chris Van Heuveln
3252665a94 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace
2019-11-19 14:24:52 +05:30
Mark Chappell
7d4800deb1 Feature: iam_role tags (#63944)
* iam_role tags support

* Make sure we don't Camel -> Snake tags in our return values

* Minor documentation tweaks

* Add tagging tests

* Make sure we return the state of tags once we updated them

* Update lib/ansible/modules/cloud/amazon/iam_role.py

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

* Move boto3/botocore before we start making changes
2019-11-18 13:41:52 -07:00
Sam Doran
6b2b876d43
Make Docker and Podman play nice (#65009)
podman 1.4 now installs docker man pages. Add handler to remove docker packages to avoid test failure due to this conflict.

Adjust inventory_docker_swarm integration test
Add conditional to cleanup handlers to allow use of the setup_docker role without removing packages at the end of the play. The inventory_docker_swarm integration tests does its own cleanup.
2019-11-18 15:08:58 -05:00
Sam Doran
163904fe37
Fix timezone integration test for Fedora 31 (#65013) 2019-11-18 15:06:38 -05:00
Sam Doran
fcd29406a2
Fix postgresql_lang integration test for CentOS 8 (#64872)
* Only search inside the role for files to include
When a role is called as a dependency, both roles are searched. This can cause the incorrect file to be included if it is picked up from the parent role.
2019-11-18 10:45:22 -05:00
Mark Chappell
a815fdf8bb Update Route53 IAM policy so the Route53 tests run (#64886) 2019-11-18 08:48:58 -05:00
Jordan Borean
096c3ffa80
Correct win_dns_client test option name (#64967) 2019-11-18 07:39:25 +10:00
Klaus Frank
0efe5a666d Add full IPv6 support to win_dns_client - Fixes #55962 (#57577)
* Add full IPv6 support to win_dns_client - Fixes #55962

* Fix missing cast

* Add type to win_dns_client.py

* Remove version_added again, to hopefully make ansibot happy. Even though it was added as a response to the bot...

* Fix $params undefined error, that was introduced by fixing the "global variable" linting issue

* Fix casting error

* Fix inverted logic

* Fix rebase error

* Fix assignment to readonly variable

* Fix "reset IPv4 DNS back to DHCP adapter_name"

* Fix legacy windows server support (2008/2008R2)

* Fix 2k8

* Remove unecessary pslint ignore

* Added IPv6 tests, changelog fragment and further docs
2019-11-18 07:30:06 +10:00
Jordan Borean
480b106d65
become - stop using play context in more places (#62373)
* become - stop using play context in more places - ci_complete

* Fix up review points
2019-11-18 05:32:56 +10:00
Sam Doran
a385ad321b
Use newer version of podman on RHEL (#64934)
- Use same podman version for RHEL 7 and 8
- Pin to version 1.4
2019-11-17 12:45:10 -05:00
Mario Lenz
034df49c56 VMware: New module vmware_host_dns (#64458)
* Restore module vmware_dns_config
* Remove domainname and change_hostname_to
* Changed version_added from 2.10 to '2.10'
* Add setup_attach_host: true to test case
* Add 'vcsim is not defined' block to integration tests
* Change 'result' to 'dns_config_result'
* Bugfix: Changing some static configurations while keeping others can crash the module
* Implement changing DNS config from DHCP to static on a cluster
* Update documentation for vmware_host_dns
* vmware_host_dns integration tests: Always revert to original DNS configuration, even if a test fails
* Deprecate vmware_dns_config
2019-11-16 11:25:06 +05:30
sky-joker
8301ad47c3 VMware: new module vmware_host_auto_start (#64605)
Fixes: #63905

* Add return parameters to return after module execution https://github.com/ansible/ansible/pull/64605#discussion_r344430717
* Add moid and use_instance_uuid parameters https://github.com/ansible/ansible/pull/64605#discussion_r344431003
* Add reset playbook for test case
* Delete HAS_PYVMOMI variable https://github.com/ansible/ansible/pull/64605#discussion_r344430877
* Fix because the default value of stop_action was wrong
* Fix multiple sanity test error for document related
* Fix remove unnecessary line break
2019-11-16 08:46:38 +05:30
Sam Doran
4291f09a68
Fix lookup_passwordstore integration test for CentOS 8 (#64869)
pass is no longer packaged in EPEL
https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
2019-11-15 17:37:43 -05:00
Sam Doran
f2e605c856
Fix iso_extract tests for CentOS 8 (#64861)
- use setup_epel role rather than task which contains correct URL now since it has changed for EL8
- add conditional to setup_epel to prevent attempted installation on non-RHEL distros
2019-11-15 17:37:13 -05:00
Sam Doran
dd8a3ebb72
Fix paramiko_ssh test (#64857) 2019-11-15 17:08:26 -05:00
Sam Doran
5d2a3ecbc4
Fix setup_rpm integration tests for CentOS 8 (#64862) 2019-11-15 17:07:48 -05:00
Sam Doran
5e3b6c84c7
Fix group integration test for CentOS 8 (#64858) 2019-11-15 17:07:02 -05:00
Sam Doran
3902c6dd9d
Fix MariaDB integration tests for CentOS 8 (#64859)
* Fix setup_mariadb for CentOS 8
Switch to using systemd for multiple instances on CentOS 7 and 8
2019-11-15 17:06:27 -05:00
Sam Doran
05a7ce798d
Fix yum_repository tests for CentOS 8 (#64863)
Refactor tests to run the same tasks with CentOS and Fedora using different variables.
2019-11-15 17:05:23 -05:00
Sam Doran
477fa63f68
Fix setup_mysql_db for CentOS 8 (#64864) 2019-11-15 17:04:35 -05:00
Sam Doran
16f070f318
Fix mariadb_replication tests for CentOS 8 (#64865) 2019-11-15 17:03:59 -05:00
Sam Doran
082b1b6cca
Fix filesystem integration test for CentOS 8 (#64866) 2019-11-15 17:03:27 -05:00
Sam Doran
41f301fe1b
Fix setup_mysql8 tests for CentOS 8 (#64868)
# Conflicts:
#	test/integration/targets/firewalld/tasks/main.yml
2019-11-15 17:02:20 -05:00
Sam Doran
73a2ee7318
Fix mysql_replication integration test for CentOS 8 (#64870) 2019-11-15 17:01:23 -05:00
Sam Doran
f8c741894a
Fix setup_postgresql integration test for CestOS 8 (#64871) 2019-11-15 17:00:27 -05:00
Sam Doran
79a38c8a3a
Fix firewalld integration tests for CentOS 8 (#64873) 2019-11-15 16:59:39 -05:00
Micah Hunsberger
8ff6e4c68e win_iis_webapplication: add authentication parameters (#56033)
* add connect_as, username, password parameters
add tests

* fixed reference to undefined variable.
added version added to new options.

* add changelog fragment

* fix line endings

* use ansible facts to determine os version
remove unused iis version check
test checksum of iis configuration after backup

* correct assertion

* added more cleanup tasks.

* version added is now 2.10

* skip server 2008 r2 for now

* run tests on server 2012 and higher
2019-11-15 16:04:19 +10:00
Wilmar den Ouden
40071e5db3 win_disk_facts: Adds Win32_DiskDrive object to facts (#51595)
* Adds win32_disk_drive object to win_disk_facts

* Names class parameter for Get-CimInstance as requested in the devdocs

* Maps whole class and adds docs

* Improve matching of disks when UniqueID is different format

* Improve logic for PNPDeviceID mapping

* Adds test for win32_disk_drive
2019-11-15 15:45:18 +10:00
Jordan Borean
762fcf78b9
win_pester - Align dir scanning with Pester's defaults (#64880)
* win_pester - Align dir scanning with Pester's defaults

Co-authored-by: Coby Caldwell <cobycaldwell@gmail.com>

* Fix sanity issues
2019-11-15 13:53:30 +10:00
Gonéri Le Bouder
0aa59ce9ab vmware/test: use better name for datastores
In the VMware tests, we call the datastores `ds1` and `ds2`. The first
one is read-only, the second is read-write and can be used to deploy
VMs. The naming convention was not clear enough and source of a lot
confusion and mistake.

We now have two better names:

- ro_datastore, which is ... read-only
- rw_datastore, the one that we can use to deploy new VM.
2019-11-14 16:55:05 -05:00
Mark Chappell
551b17b8a2 ec2_vpc_net_info: integration tests (#62649)
* ec2_vpc_net: (integration tests) migrate to using module_defaults

* ec2_vpc_net: (integration tests) use a private subnet for the tests

* ec2_vpc_net_info: Add integration tests

* ec2_vpc_net_info: add cidr_block_association_set to documentation

* Update AWS hacking test policy to allow VPC CIDR disassociation

* Update test/integration/targets/ec2_vpc_net/tasks/main.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Store vpc2 ID to make it clearer which VPC we're changing

* Be more consistent with our quoting

* Explicitly test that the VPC IDs haven't changed
2019-11-14 13:36:42 -07:00
johnbui423
db3994cb03 Default to python3 on Debian 10 (#63097) 2019-11-14 13:52:13 -06:00
Anusha Hegde
e9feea2270 VMware: new module vmware_guest_serial_port (#63126)
The ask was to add an option in the vmware_guest itself. Upon inspection, a serial port can
be created in multiple ways and so can be a module in itself. Therefore, created a new module
called vmware_serial_port.

Fixes: #54956
2019-11-14 14:16:30 -05:00
Prasad Katti
9b0cdad4d4 Add a random component to state machine name in aws_step_functions_st… (#64476)
* Add a random component to state machine name in aws_step_functions_state_machine testsuite

* Pick a random number from a bigger set to avoid conflicts between parallel runs

Co-Authored-By: Matt Clay <matt@mystile.com>
2019-11-14 08:37:55 -08:00
Martin Krizek
5c0b2c151c
Fix ansible_failed_{task,result} undefined in rescue (#64831)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789
2019-11-14 15:50:54 +01:00
Daniel-Sanchez-Fabregas
04b8f75ffa win_domain_computer module: Fix idempotence when name != sam_account_name (#56967)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check
2019-11-14 12:59:05 +10:00
Shachaf92
f6ac4361e7 win_firewall_rule - support ICMP types and codes (#60361)
* win_firewall_rule - support ICMP types and codes

* Update main.yml

* Add more examples and change type to list
2019-11-14 11:32:01 +10:00
Anusha Hegde
3a9650df98 Merging conflicts and updating PR
Signed-off-by: Anusha Hegde
2019-11-13 16:12:52 -05:00
Anusha Hegde
4e7c0b3e21 Fixed review comments
Signed-off-by: Anusha Hegde
2019-11-13 16:12:52 -05:00
Anusha Hegde
907c66c082 Resolved merge conflicts 2019-11-13 16:12:52 -05:00
Gonéri Le Bouder
80bf24b17c vmware_guest_disk/test: use less disk space
Reduce the amount of space that is used on the datastore during the
test. This allow use to use lighter storage environment during the test.
2019-11-13 16:00:20 -05:00
Mark Chappell
b5f484dcc3 ec2_eip Don't throw an exception when re-releasing an EIP (idempotency) (#62332)
* ec2_eip: (integration tests) move to using module_defaults

* ec2_eip: (integration tests) expand integration tests

Also clean up a little
- Delete EIPs when we finish testing them (reduce the chance of hitting limits)
- Rejig deletion so that it works when runs fail
- Add tests for ec2_eip_info

* ec2_eip: Minor doc tweaks

* ec2_eip: Don't throw an exception when we try to disassociate an already disassociated EIP

* ec2_eip: Add missing IAM policy (manage IGWs)

* ec2_eip: (integration tests) Use the VPC as a crude lock to avoid running parallel tests

We test that untagged EIPs come and go as we expect, if multiple tests are
running in parallel this confuses things

* Fix ec2_eip association
2019-11-13 13:27:35 -07:00
Gonéri Le Bouder
93d1a57d9a vmware_guest: fix the name of the test VMs
The test VM names must be deterministic, this way, the teardown playbook
can clean up the resources after the test execution.

See: https://docs.ansible.com/ansible/latest/dev_guide/platforms/vmware_guidelines.html#vm-names-should-be-predictable
2019-11-13 11:52:57 -05:00
GomathiselviS
143bafec9a eos_lacp_interfaces : Fix to - lacp port-priority not set when… (#64530)
* Fix bug 64453
2019-11-13 09:31:21 -05:00
Dusan Matejka
fadf7a426f re-enable zabbix_host integration tests and add cleanup handlers 2019-11-12 09:54:51 -08:00
Nathaniel Case
fed0496005
Fix eos_facts over local eapi (#64570)
* Fix eos_facts over local eapi

* Much better feedback when querying resources over local

* No need for that anymore

* Update comment

* Mkae sure facts are tested on local

resource modules might break this otherwise

* This test was not checking anything

* Pass over nxos_facts as well
2019-11-12 09:29:44 -05:00
Abhijeet Kasurde
47f9873eab
VMware: Handle slash in network name in vmware_guest module (#64494)
Encode slash in network name to work with vSphere API.

Fixes: #64399

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-12 17:13:57 +05:30
PRASOON KARUNAN V
4bf79de8a6 Add output options for win_pester (#63583)
* add output options for win_pester

* fix typo

* correct variable name
2019-11-12 16:13:52 +10:00
Hidetoshi Hirokawa
c0331053db Add encoding and codepage params to win_command/win_shell (#54896) (#54966)
* Add output_encoding_override params to win_command/win_shell (#54896)

This enhancement enables Ansible to parse the output of
localized commands that ignore the prompt code page.

* Added changelog and minor nits
2019-11-12 15:58:57 +10:00
haiyuan_zhang
c11d73575b Fixes azure_rm_snapshot (#64542) (#64547)
* feature enhancement: make a snapshot from an existing managed disk.

* remove default creation option in argu_spec of azure_rm_snapshot

* fix pep8 related issue

* fixing broken integration test
2019-11-12 13:05:15 +08:00
Matt Martz
b93d92ef9a
Set alter_sys=True instead of False to address backwards incompat (#64670)
* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match
2019-11-11 16:47:35 -06:00
The Magician
b1849d1a3e New Module: gcp_serviceusage_service (#64588) 2019-11-11 14:08:09 -05:00
Diane Wang
0d851dda59 VMware: add new module vmware_guest_tools_info (#62860) 2019-11-11 12:39:25 +05:30
nkshrishail
00193f27eb nxos_lacp: updated tests to handle platforms not supporting lacp system mac command (#64074)
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command

* nxos_lacp: addressing comments

* nxos_lacp: Updating image tag search to include more tags
2019-11-10 10:32:07 +05:30
nkshrishail
964da2f442 nxos_lacp_interfaces: Updating the tests to handle platforms that don't support - lacp mode delay (#64123)
* nxos_lacp_interfaces: Updating the tests to handle platforms that dont support - lacp mode delay

* nxos_lacp_interfaces: Updating search string to include all 9500 series switches

* nxos_lacp_interfaces: Adding a comment about chassis_type
2019-11-10 10:00:13 +05:30
Chris Van Heuveln
d5e30be686 nxos_igmp_interface: fix regression test failure (#64286) 2019-11-10 09:56:10 +05:30
nkshrishail
2be04e2bd6 nxos_overlay_global: Removing provider and correcting relative references (#64454) 2019-11-10 09:47:34 +05:30
Felix Fontein
574bd32db2
docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.
2019-11-09 21:01:56 +01:00
Felix Fontein
dd5415017e
docker_login: allow to function with credential helpers (#63158)
* Allow docker_login to function with credential helpers.

* Improve various details and update docs.
2019-11-09 11:25:53 +01:00
Mario Lenz
5d30180f6b VMware: Implement updates for dvPG in vmware_dvs_portgroup (#62537)
* VMware: Implement updates / changes for dvPG in vmware_dvs_portgroup
* Remove unnecessary else
* Add more integration tests
* Improve create_vlan_list() helper function
2019-11-09 09:35:01 +05:30
Jill R
4e7779030d
route53_info max_items and next_marker should be a str (#64617)
* route53_info  max_items and next_marker should be a str

Type was changed in #64358, however boto3 takes a str for this option
Add some basic tests for route53_info.
Fixes: #64534
2019-11-08 13:06:30 -07:00
Matt Clay
bbf376682f Disable failing aws_acm integration test. 2019-11-07 14:34:14 -08:00
Diane Wang
023a9b3166 VMware: vmware_export_ovf module fix Python3 compatibility issue (#60265) 2019-11-07 13:20:14 +05:30
Pavan Bidkar
9a54070fa2 VMware: Added check for temp_version type in vmware_guest(#64376)
Fixes: #64374

* Adding tests for create VM with interger version and latest version
2019-11-07 12:43:30 +05:30
Gonéri Le Bouder
35a8922988 prepare_vmware_tests: datastore host is datastore.test
Use an alias to access the datastore host. This way, it's easier
to use an existing NFS server.
We can also disable the `write` access on the iso datastore.
2019-11-06 17:08:07 -05:00
Jill R
1f5d2f9159 Enable aws_acm tests, AWS reports our account quota should be fixed (#64470) 2019-11-06 11:35:26 -05:00
Matt Martz
254788bc22
unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-06 10:31:55 -06:00
Martin Krizek
cd8ce16d48
template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940
2019-11-06 15:25:43 +01:00
Andrey Klychkov
22fe622589 postgresql_subscription: new module (#63661)
* postgresql_subscription: setup master-standby cluster into one container

* postgresql_subscription: setup master-standby cluster into one container, fix

* postgresql_subscription: setup master-standby cluster into one container, set up publication

* postgresql_subscription: setup master-standby cluster into one container, add module template

* postgresql_subscription: setup master-standby cluster into one container, fix tests

* postgresql_subscription: setup master-standby cluster into one container, create subscr via shell

* postgresql_subscription: setup replication, state stat

* postgresql_subscription: add basic present mode

* postgresql_subscription: add assertions

* postgresql_subscription: add samples

* postgresql_subscription: state absent, cascade

* postgresql_subscription: add owner param

* postgresql_subscription: update

* postgresql_subscription: refresh

* postgresql_subscription: doc, warns

* postgresql_subscription: relinfo

* postgresql_subscription: fixes

* postgresql_subscription: fix CI tests
2019-11-06 14:19:30 +00:00
Chris Van Heuveln
008a95073d nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:

- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
  - fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces

- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
  - fixed by removing `port-channel` interfaces with the same ID; e.g.

```
  interface port-channel98
    switchport
    switchport mode trunk

  nx-1(config-if)# interface Ethernet1/19
  nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```

Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
2019-11-06 15:45:19 +05:30
Chris Van Heuveln
2f34318ceb Remove timeout parameter from prepare_nxos_tests (#63963)
The error below occurs when attempting to run `ansible-playbook` with nxos regression tests.

```
fatal: [dt-n9k5-1.cisco.com]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "commands": [
                "show interface brief | json"
            ],
            "timeout": 60
        }
    },
    "msg": "Unsupported parameters for (nxos_command) module: timeout Supported parameters include: commands, interval, match, provider, retries, wait_for"
}
```

This error appears to be a result of https://github.com/ansible/ansible/pull/62625, but that has not been verified.
2019-11-06 15:42:12 +05:30
Chris Van Heuveln
3b6681f889 nxos_lldp_global: fix regression tests (#64161) 2019-11-06 15:41:40 +05:30
Chris Van Heuveln
351f60b0e1 nxos_hsrp_interfaces: new module (#61498)
* nxos_hsrp_interfaces: new module

* lint 1

* lint 2

* add normalize_interfaces

* change version /2.9/2.10/

* /2.10/"2.10"/
2019-11-06 15:40:39 +05:30
Andrey Klychkov
9a8d73456c mariadb_replication: fix CI tests (#64481) 2019-11-06 07:48:42 +01:00
Matthew Davis
4ee9f40e62 Add aws_acm module (#60552)
* convert aws_acm_facts to AnsibleAWSModule

* factor aws_acm_facts into module_utils

* add more filtering options for aws_acm_info

* add aws_acm module and tests

* uncomment aws_acm test

* fix linting for aws_acm

* fix __future__ linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix aws_acm_info arg type

* remove test for old module name aws_acm_facts

* simplify AWS ACM client creation

* fix indent typo in aws_acm test

* catch BotoCoreError in aws_acm

* fix indent typo in aws_acm test

* tighten AWS ACM test policy resource

* move aws acm int test to venv

* remove errant file

* fix AWS ACM int test perms

* undo copyright addition to wrong file

* fix invalid log message in aws_acm

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rephrase aws_acm_info doc from facts to information

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rename aws_facts var to aws_info

* remove case insensitivity for aws_acm pem compare

* add no_log for aws_acm credential setting

* add per-test prefix to aws_acm test resource names

* make aws_acm use crypto module_util

* clarify copyright for aws_acm

* make aws_acm int test clearer

* add explicit crypto dependency to aws_acm

* change requests for aws_acm pr

* fix wrong copyright owner aws_acm test

* fix wrong copyright owner aws_acm test

* rewrite aws_acm cert chain compare with regex, no dependency

* fix linting for aws_acm unit test

* fix linting for aws_acm unit test

* fix linting and duplicate ignore

* fix failed cert chain split in aws_acm, add more tests

* remove errant file

* more linting fixes for aws_acm

* fix sanity ignore

* rewrite cert compare in aws_acm to use base64 decode

* improve regex for pem cert chain split in aws_acm

* undo changes to crypto module util for aws_acm

* increment ansible version for new aws_acm module

* convert aws_acm return(x) to return x

* increment version added for aws_acm_info new features

* fix linting

* fix bugs with AWS ACM

* fix bad rebase

* disable AWS ACM integration test, due to AWS account limit issue

* remove aws acm integration test from shippable group
2019-11-05 11:57:08 -07:00
Andrey Klychkov
04c999f0f8 postgresql_idx: add stat mode support (#64138)
* postgresql_idx: add stat mode support

* postgresql_idx: add stat mode support, add changelog

* postgresql_idx: add stat mode support, fix CI
2019-11-05 10:26:51 +00:00
The Magician
1a726d436e New Module: gcp_compute_target_instance (#64135) 2019-11-04 14:52:28 -05:00
The Magician
14cf1c1197 New Module: gcp_logging_metric (#64339) 2019-11-04 14:51:52 -05:00
Sloane Hertel
c1f1b2029c
Support vars plugins in collections (#61078)
* Move var plugins handling to a separate file

* Allow var plugins to require whitelisting

* Add global configuration ('demand', 'start') for users to control when they execute

* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute

* Update ansible-inventory and InventoryManager to the global and stage configuration

* Update host_group_vars to use stage configuration and whitelisting

* Add documentation for using new options and to the developer's guide

* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility

* Changelog

Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-04 11:41:14 -05:00
Andrey Klychkov
73526b9d65 mysql_variables: add mode parameter (#63547)
* mysql_variables: add mode parameter

* mysql_variables: add mode parameter, add changelog fragment

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix sanity

* mysql_variables: add mode parameter, remove warns

* mysql_variables: add mode parameter, refactoring

* mysql_variables: add mode parameter, fix logic
2019-11-02 10:16:28 +01:00
Sloane Hertel
371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
2019-11-01 15:51:34 -04:00
The Magician
5dff5603af New Module: gcp_compute_reservation (#64133) 2019-11-01 13:46:42 -04:00
The Magician
d865b7da71 Bug fixes for GCP modules (#64193) 2019-11-01 13:46:13 -04:00
Sergey
1ad3879430 Add podman_volume_info module (#63380)
Add module podman_volume_info that collects data about podman
volumes on the host. Acts as docker_volume_info module.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2019-10-31 16:17:33 -04:00
Danilo Bargen
35c415de98 get_url integration test: Fix missing conditional (#64100) 2019-10-31 15:17:38 -04:00
Chris Van Heuveln
ec1c5585af nxos_vrf: N6K regression test failures (#63277)
* nxos_vrf: N6K regression test needs 'nv overlay evpn'

* Add delay for vrf creation

* Revert "Add delay for vrf creation"

This reverts commit 8afa5281ff4b3c5a1775fbd40c5acb7ab5ecdf68.

* Add vrf_error_check w/delay to module

* whitespace

* httpapi fixes

* /input/input_data/ - 'input' is a built-in

* shippable retry
2019-10-31 18:17:39 +05:30
Felix Fontein
fed267df03
openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.
2019-10-30 21:36:36 +01:00
Dusan Matejka
1f2d78b356 unify mongodb installation for both xenial and bionic in integration tests 2019-10-30 13:21:37 -07:00
Mark Chappell
e6607d611a Sanity test fixups - AWS related tests (#64093)
* AWS tests Sanity Test fixups (add boilerplate)

* Remove sanity ignore.txt entries
2019-10-30 09:48:59 -07:00
Alexander Korsunsky
b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
2019-10-30 12:17:11 -04:00
Mike Wiebe
e82d407fa8 Add filter option to netconf_config module (#63593)
* Add filter option for netconf_config module

* Address review comments and add tests

* Refactor integration tests

* Address review comments

* Review comments

* Fix nxos_netconf include check
2019-10-30 19:09:13 +05:30
Jill R
003c26de04 iam_user Additional integration tests (#63768)
* Add tests that were originally part of pr59079 before being lost in a rebase

* missed a needed check_mode: yes and a test with a wrong group

* Clarify test name, fix resource, add user delete test

* Use AWSDenyAll for benign policy, chech policy with non-full ARN path works, fix wrong module copy-pasta
2019-10-30 09:37:33 -04:00
Rémi REY
9c17c7ad19 Add integration tests for grafana_datasource module (#63986)
* Add setup_grafana role for integration tests

* grafana_datasource: add integration tests for elastic datasource

* grafana_datasource: add integration tests for influxdb datasource

* grafana_datasource: add integration tests for postgres datasource

* grafana_datasource: add integration tests for cloudwatch datasource
2019-10-29 22:39:38 +01:00
Matt Clay
c782831dd7 Disable failing zabbix_host integration test. 2019-10-29 10:26:53 -07:00
Robert Osowiecki
3c978a3225 lineinfile - don't run os.makedirs on empty dir path (#63921)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path
2019-10-29 13:06:17 -04:00
Felix Fontein
16d4d2dba9
acme_certificate: add select_chain option (#60710)
* Add select_alternate_chain option.

* Fix docs.

* Allow to match via subject key identifier and authority key identifier.

* Simplify test.

* Add comments.

* Add tests.

* Fix bugs.

* Also consider main chain when searching for alternatives.

* Bump version_added.

* Rename select_alternate_chain -> select_chain.
2019-10-29 08:09:15 +01:00
Felix Fontein
35a412fab7
openssl_csr: fix tests (#63994)
* Make sure tests are validated with correct backend in mind.

* Fix tests.
2019-10-29 07:07:17 +01:00
Gonéri Le Bouder
039c770a95 vmware_host_firewall_manager: fix #61332
Since https://github.com/ansible/ansible/pull/56733, we were not able to apply
firewall rules with no `allowed_hosts` key.

closes: #61332

In addition, this patch ensures the `allowed_hosts` key accepts a dict,
instead of a dict in a single entry list.

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        - all_ip: False
          ip_address:
            - "1.2.3.4"
```

Should be written:

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        all_ip: False
        ip_address:
          - "1.2.3.4"
```
2019-10-28 13:01:02 -04:00
Andrey Klychkov
defccd1d44 postgresql_db: allow to pass users names with dots (#64007)
* postgresql_db: allow to pass users names with dots

* postgresql_db: allow to pass users names with dots, add changelog fragment

* postgresql_db: allow to pass users names with dots, fix ci
2019-10-28 13:23:09 +00:00
kalimsshar
01a92f0191 Make banner detection non-greedy in ios_banner (#63092)
* Make banner detection non-greedy in ios_banner

* Added ios_banner unit test to detect bug #63091

* Corrected PEP8 errors

* Added integration test

* Corrected typo in integration test
2019-10-25 14:20:00 -04:00
Andrey Klychkov
88af9f6470 mysql_replication - accept empty string to the module's parameters (#63546) 2019-10-25 11:56:40 -04:00
Andrey Klychkov
3aaebba235 postgresql_privs: allow to pass roles with names containing dots (#63942) 2019-10-25 14:39:49 +01:00
Xu Yuandong
5c5a315a44 a new module to manage static route and bfd. (#58004)
* add a new module

* update for shippable

* update

* update for shippable

* update for shippable

* update for shippable

* update

* add unittest.

* update

* update integration

* update unittest

* update

* update unittest.

* update for syntax error

* update for reviewing.
2019-10-25 06:40:30 -04:00
Dusan Matejka
57c36e0378 Zabbix integration tests (#63744)
* adjusted setup_zabbix integration tests role to work on distributions from Debian family

* bumped zabbix_host integration tests role to be run against bionic
2019-10-25 06:28:20 -04:00
Will Thames
07ed860c2b Add more kubernetes Service tests (#62581)
* Add more kubernetes Service tests

Services can often go wrong, and one of the main motivations for
apply was being able to correctly modify them, so more tests are good

* Remove a port from a service for k8s testing

* Add a Service check mode to k8s tests
2019-10-25 11:21:13 +01:00
Xu Yuandong
68c997e4dd add a new module ce_lldp_interface. (#58252)
* add a new module ce_lldp_interface.

* update for shipabble

* update

* ad unittest

* update

* update

* update

* update

* update

* upate

* update

* update for shipable.

* update & add intergration tests.

* update for shippable.

* update

* import future.

* update.

* update.

* update docs.

* missing whitespace after ','

* update docs.

* update docs.

* update docs.

* Update ce_lldp_interface.py

* Update ce_lldp_interface.py

* update for reviewing
2019-10-25 10:45:53 +01:00
The Magician
9fe524248c New Module: gcp_runtimeconfig_config (#63883) 2019-10-24 17:16:24 -04:00
The Magician
50f85c9bdd New Module: gcp_runtimeconfig_variable (#63885) 2019-10-24 17:15:57 -04:00
Nathaniel Case
7f5d1ab2b7
Removed in 29 (#63680)
* Eh, 2.10 is close enough

* drop top-level authorize

* Remove from documentation

* Remove load_params

* Centralize this junos thing

* Fixup user modules

* I'm 95% sure this did not do what it was supposed to

* nxos_hsrp: I don't think this is an actual module parameter

* Try to fix junos_package tests

* Move local params to provider

* Promote 'timeout' to a real parameter for eos_eapi

* Don't assume provider exists?

* move another timeout

* Provider now always has auth_pass

* Fix junos tests to avoid NameErrors
2019-10-24 15:01:05 -04:00
Andrey Klychkov
40437d434e postgresql_membership: add CI tests for roles with dots (#63896) 2019-10-24 11:09:42 +01:00
Kyle Umstatter
fb38c9cea9 Support PostgreSQL Custom Format (#63806)
* Support PGC Restores

* Fix whitespace

* support pgc both dump and restore
2019-10-24 11:09:11 +01:00
Adam Miller
ed86907587 DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

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

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-24 00:57:31 -04:00
Mark Chappell
bd6d4b5b3a New module: iam_policy_info (#62955)
* iam_policy: (integration tests) migrate to module_defaults

* iam_policy: (integration tests) Rework iam_policy integration tests

* iam_policy_info: Add new module and add iam_policy_info tests to iam_policy integration tests
2019-10-23 13:04:25 -07:00
Martin Krizek
18b9ce8b82
Integration tests: prevent loop squashing (#63847)
1. the feature will be deprecated in 2.11
2. these modules support passing lists
3. loop squashing does not work with collections
2019-10-23 21:02:25 +02:00
Sam Doran
3e4ae42256
Cleanup after MySQL integration tests (#63641)
Add handlers to setup_mysql_db and setup_mysql8 to remove installed packages.
2019-10-23 11:11:02 -04:00
Andrey Klychkov
b1e8a6c1cb mariadb_replication: improve CI tests (#63848) 2019-10-23 15:50:31 +02:00
Mark Chappell
4d72b69035 rds_subnet_group : Sanity Check fixes (docs) and Integration tests (#63214)
* rds_subnet_group: Fixup sanity test issues

* rds_subnet_group: Add integration tests

* rds_subnet_group: Add testing policy
2019-10-23 08:27:07 -04:00
Prasad Katti
56f52a0169 ec2_vpc_route_table_info integration tests (#63413)
* ec2_vpc_route_table_info integration tests

Make sure ec2_vpc_route_table_info return value has the right attributes.

* ec2_vpc_route_table_info integration tests for tags
2019-10-22 14:46:40 -04:00
Stefan Horning
7aac7a56da Added missing param to lambda module to pass it through to boto3 (#58822)
* Added missing param to lambda module to pass it through to boto3

* Allow updating of runtime, because there is no reason why not

* Updated version_added to 2.10 to make tests green again

* Updated RETURN docs of Lambda module

* Added tests to aws_lambda test-suite.
2019-10-22 17:17:01 +02:00
Sam Doran
92cd13a2cf
lineinfile - use correct index value when inserting at the end (#63696) 2019-10-22 10:39:58 -04:00
Sam Doran
29d4d318a5
lineinfile - properly insert line when line exists and backrefs are enabled (#63763)
Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object

Add integration tests to cover this scenario
2019-10-22 10:01:11 -04:00
Jill R
aa68f728fd s3_bucket: Allow empty encryption_key_id with aws:kms (#62031)
* s3_bucket: Allow empty encryption_key_id with aws:kms to use KMS master key

* Add idempotency check and cleanup example, dont require encryption_key_id
2019-10-21 19:45:41 -04:00
Mark Chappell
145b79ef0e ec2_instance test cleanup (#63708)
* ec2_instance/ec2_instance_info : Fixup sanity test errors

* Move ec2_instance integration tests to use aws_defaults

* Search for the AMI instead of hardcoding an AMI

* Make our VPC CIDR variable

* Remove AZ assumptions - no guarantees about specific AZs being available

* Make sure we terminate instances when we're done with them.

* Add a 10 second pause for IAM roles to become available before using them

* Wait on instance changes by default

* Switch out t2 instances for t3 they're cheaper and have more CPU available

* Pull t3.nano instance info a little earlier

* rework vpc_name and vpc_cidr a little

* Mark ec2_instance tests unsupported for now, they take too long
2019-10-21 14:55:44 +02:00
Andrey Klychkov
b6e997aa5f Cleanup after MariaDB integration tests (#63657) 2019-10-19 13:10:35 +02:00
zhongjun2
64989bea6a hwc: Add eip module (#60182) 2019-10-19 12:58:29 +02:00
Lukas Kämmerling
86e4dcbaed hcloud: Add protection support to hcloud_server and hcloud_server_info (#63669) 2019-10-19 12:57:00 +02:00
zhongjun2
c904336db0 hwc: Add security group rule module (#60186) 2019-10-19 12:53:02 +02:00
zhongjun2
420de44a57 hwc: Add port module (#60188) 2019-10-19 11:32:10 +02:00
zhongjun2
652de1a7fd hwc: Add new module to peering (#60190)
* Add peering module

* Update hwc_vpc_peering_connect.py
2019-10-19 11:27:53 +02:00
zhongjun2
e0b4fafb22 hwc: Add disk module (#59919) 2019-10-19 10:09:40 +02:00
zhongjun2
39201d1ba3 hwc: Add instance module (#60180) 2019-10-19 09:50:03 +02:00
zhongjun2
7ed6a0037c hwc: Add security group module (#60187)
* Add security group module

* Update hwc_vpc_security_group.py
2019-10-19 09:43:50 +02:00
Tiziano Müller
034afd40a3 zypper: add additional flag --force-resolution (#61705) 2019-10-19 09:40:47 +02:00
Lukas Kämmerling
8eb46acbb1 hcloud: Add Delete Protection to hcloud_volume and hcloud_volume_info (#63665) 2019-10-18 23:28:12 +02:00
Lukas Kämmerling
e9e4b02b92 hcloud: Add Delete Protection to hcloud_floating_ip and hcloud_floating_ip_info (#63663) 2019-10-18 23:27:23 +02:00
JayalakshmiV
93280bd59c exos_l2_interfaces Resource module (#63113)
* Resource module for exos_l2_interfaces
2019-10-18 13:10:19 -04:00
hexdump0x0200
cb0ee51712 ios_bgp: fixes #57666 (#57667)
* ios_bgp: fixes #57666

* ios_bgp: add integration tests
2019-10-18 21:25:45 +05:30
Nathaniel Case
741d529409
Eos vlan override (#63639)
* Fix overridden & deleted in eos_vlans

* Fix vlan creation in overridden

* Right, Python 2.6
2019-10-18 10:36:30 -04:00
Xu Yuandong
39c92310b4 Add a new module ce_lldp to manage Link Layer Discovery Protocol(LLDP) (#63395)
* new module ce_lldp

* update for shippable

* update for shippable

* update for shipabble

* update

* merge confilcts

* add integration test.

* update for shippable.

* update for bad-whitespace

* update for shippable

* update for shippable

* update for shippable

* update license.

* update for typo.
2019-10-18 13:15:42 +01:00
Erik Zettel
5ea72934bd Fix obvious typos (#62821)
* lib/ansible/modules/cloud/digital_ocean/digital_ocean_snapshot_info.py: fix typos

* lib/ansible/modules/cloud/ovirt/ovirt_host_network.py: fix typos

* test/integration/targets/cnos_backup/README.md: fix typos

* test/integration/targets/cnos_bgp/README.md: fix typos

* test/integration/targets/cnos_command/README.md: fix typos

* test/integration/targets/cnos_conditional_command/README.md: fix typos

* test/integration/targets/cnos_conditional_template/README.md: fix typos

* test/integration/targets/cnos_config/README.md: fix typos

* test/integration/targets/cnos_facts/README.md: fix typos

* test/integration/targets/cnos_image/README.md: fix typos

* test/integration/targets/cnos_rollback/README.md: fix typos

* test/integration/targets/cnos_save/README.md: fix typos

* test/integration/targets/cnos_showrun/README.md: fix typos

* test/integration/targets/cnos_template/README.md: fix typos

* test/integration/targets/cnos_vlag/README.md: fix typos

* test/integration/targets/enos_command/README.md: fix typos

* test/integration/targets/enos_config/README.md: fix typos

* test/integration/targets/enos_facts/README.md: fix typos

* test/legacy/roles/cnos_backup/README.md: fix typos

* test/legacy/roles/cnos_bgp/README.md: fix typos

* test/legacy/roles/cnos_command/README.md: fix typos

* test/legacy/roles/cnos_conditional_command/README.md: fix typos

* test/legacy/roles/cnos_conditional_template/README.md: fix typos

* test/legacy/roles/cnos_ethernet/README.md: fix typos

* test/legacy/roles/cnos_facts/README.md: fix typos

* test/legacy/roles/cnos_image/README.md: fix typos

* test/legacy/roles/cnos_portchannel/README.md: fix typos

* test/legacy/roles/cnos_rollback/README.md: fix typos

* test/legacy/roles/cnos_save/README.md: fix typos

* test/legacy/roles/cnos_showrun/README.md: fix typos

* test/legacy/roles/cnos_template/README.md: fix typos

* test/legacy/roles/cnos_vlag/README.md: fix typos

* test/legacy/roles/cnos_vlan/README.md: fix typos
2019-10-18 12:56:55 +01:00
Felix Fontein
4b1fdee119
docker_container: deprecate trust_image_content (#63420)
* Deprecate trust_image_content.

* Add changelog.

* Mention it has never been used; removed test stub.
2019-10-18 13:03:42 +02:00
zhongjun2
b243494a29 Add subnet module (#60183)
* Add subnet module

* Update hwc_vpc_subnet.py

* Add subnet module
2019-10-18 11:00:32 +01:00
zhongjun2
7d9a0baa7f Add private ip module (#60191)
* Add private ip module

* Update hwc_vpc_private_ip.py

* Add private ip module
2019-10-18 10:15:13 +01:00
Lukas Kämmerling
f1c6a3331f hcloud: Add delete_protection to hcloud_network and hcloud_network_info (#63656) 2019-10-18 10:54:01 +02:00
Sumit Jaiswal
4f2665810f
Fix IOS_VLANS override operation for new VLANs (#63624)
* fix vlans override state

* adding code comment
2019-10-18 13:56:23 +05:30
Andrey Klychkov
684e70c8d7 postgresql_user: allow to pass user name with dots (#63565) 2019-10-18 12:55:41 +05:30
Gonéri Le Bouder
424f9f0dac vmware_guest_network/test: fix name of test VM
The test VM is called `test_vm1` since
https://github.com/ansible/ansible/issues/63302.

Also, avoid the `00:50:56` prefix for the MAC address, since it's known
for being source of problem: https://github.com/ansible/ansible/issues/63302
2019-10-17 17:38:42 -04:00
Mark Chappell
8d0737edf0 Integration tests for s3_logging (#63257)
* s3_logging: (integration tests) updated AWS policy

* s3_logging: fix sanity test issues

* s3_logging: Integration tests

* Add pauses to cope with evenual consistency

* Mark s3_logging tests as 'unsupported' for now due to testing instability
2019-10-17 11:33:55 -07:00
JayalakshmiV
1a384a61fb exos_lldp_interfaces resource module (#62108)
* exos_lldp_interfaces resource module

* Fix exos_lldp_interfaces and add integration tests

* Fix deleted testcase for integration test
2019-10-17 13:40:17 -04:00
Andrea Tartaglia
202ad4f89a Fixes --version in ansible-galaxy cli 2019-10-17 08:12:49 -07:00
Andrey Klychkov
7dd46f7b2d postgresql_privs: add support a type parameter option for types (#63555)
* postgresql_privs: add support a type parameter option for types

* postgresql_privs: add support a type parameter option for types, add changelog fragment

* postgresql_privs: add support a type parameter option for types, add schema handling

* postgresql_privs: add support a type parameter option for types, fix typo

* postgresql_privs: add support a type parameter option for types, add comment
2019-10-17 14:59:06 +01:00
Andrey Klychkov
ae16a840f6 mysql_replication: fix typo in setup role (#63625) 2019-10-17 13:17:15 +01:00
Felix Fontein
d00d0c81b3
openssl_privatekey: add support for format option (#60388)
* Add support for format option.

* Improve private key format detection.

* Fix raw format handling.

* Improve error handling.

* Improve raw key handling.

* Add failed raw test.

* Improve raw key loading.

* Simplify tests.

* Add raw format tests.

* Fail if format != 'auto_ignore' is specified for pyopenssl backend.

* Fix quoting.

* Bump version.

* Allow to convert private keys between different formats.

* Improve description.
2019-10-17 10:40:13 +02:00
Sergey
e3c7e35656 Add extra args and executable name to podman connection plugin (#63166)
* Add extra args and executable name to podman connection plugin

Like there is for docker plugin, add extra arguments for command
line of podman. Also add configurable executable and checking if
this executable exists on host. Fail module if executable is not
in PATH.

* Update changelogs/fragments/63166-add-extra-args-executalbe-podman-connection.yaml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-10-17 13:48:29 +05:30
Pavan Bidkar
b6ea43efc3 VMware: Support instance_uuid to find the vm for vmware_guest_network module (#62818) 2019-10-17 12:23:13 +05:30
Andrey Klychkov
d615d7ea19 mysql_variables tests: change CI host group (#63602) 2019-10-17 08:26:09 +02:00
GomathiselviS
6d7620b646 Added fix for bug 63290 (#63308) 2019-10-16 19:17:46 +05:30
René Moser
332b220854 cloudscale: fix boilerplate (#63533) 2019-10-16 11:02:32 +02:00
Andrey Klychkov
c4ce4a6c03 mysql_variables: update MySQL in CI to 8.0 (#63454) 2019-10-16 08:30:33 +02:00
Matt Clay
20be8693ba Revert "Remove top-level arguments from network modules (#62603)"
This reverts commit d5ac3f7e77.
2019-10-15 12:53:51 -07:00
Nathaniel Case
d5ac3f7e77
Remove top-level arguments from network modules (#62603)
Eh, 2.10 is close enough

* drop top-level authorize

* Remove from documentation

* Remove load_params

* nxos_hsrp: I don't think this is an actual module parameter

* Move local params to provider

* Promote 'timeout' to a real parameter for eos_eapi

* Provider now always has auth_pass
2019-10-15 11:41:35 -04:00
Sam Doran
e9d29b1fe4 Properly mask no_log values is sub parameters during failure (#63405)
* Get no_log parameters from subspec

* Add changelog and unit tests

* Handle list of dicts in suboptions

Add fancy error message (this will probably haunt me)

* Update unit tests to test for list of dicts in suboptions

* Add integration tests

* Validate parameters in dict and list

In case it comes in as a string

* Make changes based on feedback, fix tests

* Simplify validators since we only need to validate dicts

Add test for suboptions passed in as strings to ensure they get validated properly and turned into a dictionary.

ci_complete

* Add a few more integration tests
2019-10-14 09:20:07 -07:00
Xu Yuandong
36457bebc9 add a new module ce lacp to manage Eth-Trunk interfaces mode (#58077)
* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* update for shippable.

* update for shippable

* add units test to module ce_lacp.

* add units test to module ce_lacp.

* add units test to module ce_lacp.

* update

* update

* update

* update

* update

* update

* update for shippable.

* for shippable

* update ignore.txt to reslove conflict

* update for shippable

* update

* update unittest to remove provider.

* update unittest for shipppable.

* use to_native.

* intergration test

* syntax error

* syntax error

* syntax error

* update for `Andersson007` review and thanks.

* update for shippable
2019-10-14 15:14:43 +01:00
Andrey Klychkov
0ca682384d mysql_variables: add seealso, add return value (#63442) 2019-10-14 09:28:00 +01:00
zhongjun2
6170f3a6f6 Add route module (#60189)
* Add route module

* Update hwc_vpc_route.py

* Update hwc_vpc_route.py

* Update hwc_vpc_route.py

* Update main.yml

* Update hwc_vpc_route.py

* Update hwc_vpc_route.py

* Update hwc.py

* Update hwc_vpc_route.py
2019-10-12 18:15:02 +02:00
Roman
504d76e956 acl: fix module failure if there're spaces in a path (#63280)
* Make acl module to work with whitespaces in path

* Added a changelog fragment

* Add quotes to changelog fragment
2019-10-11 10:40:19 -07:00
Benjamin Brabant
29939383e6 Improve ecs_ecr module to handle image_tag_mutability feature (#62871)
Since 2019 jul. 26, AWS Elastic Container Registry can be configured to be immutable that prevent overwritting of an existing tag in the registry.
https://aws.amazon.com/fr/about-aws/whats-new/2019/07/amazon-ecr-now-supports-immutable-image-tags/
https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html

By default, ecr is created MUTABLE, as this was the only option before this feature.
This module leverage new capabilities of boto3 to configure image_tag_mutability option.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecr.html#ECR.Client.put_image_tag_mutability

The image_tag_mutability option definition was inspired by existing terraform module.
https://www.terraform.io/docs/providers/aws/r/ecr_repository.html
2019-10-11 09:13:13 -07:00
Matt Martz
7f4befdea7
Wrap CLI Passwords with AnsibleUnsafeText, ensure unsafe context is not lost during encode/decode (#63351)
* Wrap .encode and .decode on AnsibleUnsafe objects

* runme.sh needs to be executable

* ci_complete

* Update changelog with CVE
2019-10-11 09:17:10 -05:00
Gonéri Le Bouder
73febd4ea6 prepare_vmware_tests: use module_defaults (#63209) 2019-10-11 19:46:54 +05:30
Gonéri Le Bouder
82dedec011 vmware_guest_sendkey/test: ensure the test VM is running (#63359)
The `vmware_guest_sendkey` module fails if the test VM is off. We this
commit, we ensures the VM is running.
2019-10-11 07:52:36 +05:30
Gonéri Le Bouder
286102eb5e vmware_host_kernel_manager: fix the test (#63358)
PR #62161 changed the name of key
returned by the module from `ansible_module_results` to
`host_kernel_status`.
2019-10-11 07:52:05 +05:30
Adam Miller
aaef214a26 adapt to firewalld 0.7.0 for RHEL 8.1 Beta, Fedora 31+ (#63357)
Fixes #63254

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-10 18:33:18 -04:00
James Cassell
bfd32c9b00 clean "changed" only after it has been processed (#59958)
* clean "changed" after it has been processed

without this change, a loop of `debug` tasks with `changed_when`
causes the "changed" status to get lost before output

* runme.sh tests for debug loop status
2019-10-10 18:24:31 -04:00
Matt Davis
6d52bdf4db
fix default collection resolution in adhoc (#63298)
* fix default collection resolution in adhoc

* if an adhoc command is run with a playbook-dir under a configured collection, default collection resolution is used to resolve unqualified module/action names

* Set ANSIBLE_PLAYBOOK_DIR in integration tests.

* Fix config conflict in ansible integration test.

* add adhoc default collection test

* text-ify warning string
2019-10-10 12:42:03 -07:00
Gonéri Le Bouder
add74fd24b vmware_guest_network: avoid functional test failure
- Avoid the 00:50:56 MAC prefix, See: https://github.com/ansible/ansible/issues/63302
- Create an Ad-Hoc VM for the test and wait until the VMware tools are
  ready
2019-10-10 13:26:47 -04:00
Gonéri Le Bouder
7de70bde52
prepare_vmware_test: avoid the dependency on jmespath (#63344)
We don't really need to depend on jmespath for this.
2019-10-10 13:25:07 -04:00
Pavan Bidkar
904e8434db VMware: Add support to delete vm from inventory (#62903)
Fixes: #55572
2019-10-10 17:07:23 +05:30
Andrey Klychkov
3e87429365 mysql_replication: add support of resetmaster choice to mode parameter (#63321) 2019-10-10 13:02:57 +02:00
JayalakshmiV
45acdb41d2 Added Exos vlan resource module (#61865)
* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* Fix exos_vlans resource module and integration test

* Move exos_vlan folder to exos_vlans folder

* Fix exos->config->vlans and exos->utils

* Fix version_added

* Improve exos_vlans module and integration tests

* Fix exos_vlans.py

* exos_vlan resource module
2019-10-10 06:50:04 -04:00
Yap Sok Ann
eca33b80f0 mysql_info: add support for global status (#63189)
Signed-off-by: Yap Sok Ann <sokann@gmail.com>
2019-10-10 12:14:49 +02:00
Sam Doran
9d014778ad
cronvar - use correct binary name (#63279)
Fixes regression introduced by #62554
Add integration tests for cronvar
2019-10-09 18:33:25 -04:00
Jill R
ce402f003f
Fix STS assume role error message when role does not exist (#63249)
AWS appears to have changed this error message again.
Fixes https://app.shippable.com/github/ansible/ansible/runs/145643/115/tests
2019-10-09 14:08:29 -07:00
Andrey Klychkov
71bcce5db5 mysql_replication: add channel parameter (#63271)
* mysql_replication: add channel parameter

* mysql_replication: add channel parameter, add changelog
2019-10-09 14:27:01 +01:00
Andrey Klychkov
9f9afcb203 mysql_replication: add connection_name param for MariaDB multi source replication support (#63229)
* mysql_replication: add connection_name param for MariaDB multi source support

* mysql_replication: add connection_name param for MariaDB multi source support, add changelog
2019-10-09 10:05:55 +02:00
Matt Davis
fd229dcbb5
add ANSIBLE_PLAYBOOK_DIR envvar support (#63220)
* add ANSIBLE_PLAYBOOK_DIR envvar support

* allows `ANSIBLE_PLAYBOOK_DIR` envvar as a fallback on CLI types that support `--playbook-dir`. This should have been implemented with #59464, but was missed due to an oversight.
* added basic integration test

* make first-class PLAYBOOK_DIR config entry

* update changelog
2019-10-08 17:34:15 -07:00
Mark Chappell
dbc9444572 ec2_vpc_nacl and ec2_vpc_nacl_info migrate to AnsibleAWSModule and add tests (#63163)
* Move EC2 networking objects into network-policy.json

* ec2_vpc_nacl: Add integration tests

* ec2_vpc_nacl: Migrate tests to use module_defaults

* ec2_vpc_nacl: (integration tests) Add missing AWS permissions

* ec2_vpc_nacl: (integration tests) Update tests for ipv6 support

* ec2_vpc_nacl: Migrate to AnsibleAWSModule

* Fix sanity tests for ec2_vpc_nacl and ec2_vpc_nacl_info

* ec2_vpc_nacl_info: Migrate to AnsibleAWSModule

* ec2_vpc_nacl_info: (integration tests) Rename from ec2_vpc_nacl_facts to ec2_vpc_nacl_info and add a test using a filter (by tag)

* Pick availability zones dynamically

Rather than assuming that AZa and AZb always exist (they don't), query to find out which AZs we have available first

* Test that the NACLs we get back are actually the *saml* NACL rather than duplicates/delete remove

* Cleanup IPv6 tests a little.

Note: IPv6 support for ec2_vpc_nacl not complete yet.

This provides the initial framework, and should ensure things don't start exploding when support is added.

* Removing subnets by name from a NACL *is* now supported

* Fix ec2_vpc_nacl return documentation
2019-10-08 13:27:24 -07:00
Matt Clay
811127d64d Add RHEL 8.1b to the Shippable test matrix. 2019-10-08 13:06:28 -07:00
Andrey Klychkov
3b18337cac lineinfile - fix bug with insertbefore/insertafter and firstmatch (#63194) 2019-10-08 10:01:36 -04:00
Pavan Bidkar
314f9fbd5c Support latest version while upgrading VM hardware. (#62188)
Support for the `latest` version during an VM hardware upgrade.
2019-10-07 16:41:57 -04:00
Matt Clay
86ae3cfa12 Install zip for unarchive test when using dnf. 2019-10-07 10:41:46 -07:00
The Magician
1522603078 New Module: gcp_compute_region_backend_service (#63154) 2019-10-07 13:22:26 -04:00
Andrey Klychkov
e48202838c mysql_replication: add master_delay parameter (#63130) 2019-10-07 15:23:56 +02:00
sky-joker
7b7d266a39 VMware: add properties option to vmware_host_facts module (#62916)
* add properties option to vmware_host_facts
2019-10-07 10:27:57 +05:30
Felix Fontein
a99af710fb
mariadb_replication / mysql_replication integration tests: conflicts on centos7 (#63171)
* Change group of mariadb_replication to avoid mysql_replication conflicts.

* Add remarks.
2019-10-06 10:21:15 +02:00
Felix Fontein
24b80848dc
openssl_dhparam: add cryptography backend (#62991)
* Separate OpenSSL-specific code from generic code.

* Make sure absent works without OpenSSL.

* Add cryptography backend.

* Add tests.

* Add changelog.

* Duplicate disclaimer.

* Add dependency on setup_openssl.

* Forgot to adjust something.

* Fix version tuple.
2019-10-04 21:53:04 +02:00
Felix Fontein
41eafc2051
docker_container: improve image finding / change detection (#62971)
* Improve image finding / change detection.

* Checked wrong object.

* Improve behavior. (Let docker daemon sort this out.)

* Add changelog.

* Add simple test.

* Fix image name.

* Use new docker_image params.

* Rewrite.
2019-10-04 21:50:09 +02:00
The Magician
bb9b2e87bc New Module: gcp_compute_node_group (#63080) 2019-10-04 13:10:53 -04:00
The Magician
d19b1da1e1 New Module: gcp_compute_network_endpoint_group (#63121) 2019-10-04 13:09:34 -04:00
GomathiselviS
7ac4756bf6 ios_bgp : Fix for bug #59083 (#63055)
* Fix for the bug 59083

* Bug fix #59083 - corrected linting errors
2019-10-04 10:56:08 -04:00
Andrey Klychkov
66de3d429f mysql_replication: add basic CI tests with MySQL 5.6 (#63124)
* mysql_replication: add CI tests with MySQL 5.6

* mysql_replication: add CI tests with MySQL 5.6, add auxiliary checks

* mysql_replication: add CI tests with MySQL 5.6, fix comments

* mysql_replication: add CI tests with MySQL 5.6, add pause
2019-10-04 12:49:19 +02:00
Nilashish Chakraborty
fc5358cea0
Fix traceback for empty config (#62515)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-10-03 19:45:52 +05:30
Andrey Klychkov
ad5200a7c0 postgresql_lang: add owner parameter (#62999)
* postgresql_lang: add owner parameter

* postgresql_lang: add owner parameter, add changelog fragment
2019-10-03 18:03:06 +05:30
Andrey Klychkov
ea86b2c2f7 mysql_replication: add master_use_gtid parameter (#62648)
* mysql_replication: add master_use_gtid parameter

* mysql_replication: add master_use_gtid parameter, improve tests
2019-10-03 18:02:41 +05:30
sky-joker
ff933be7e6 VMware: new module vmware_guest_register_operation (#54647)
Added vmware module vmware_guest_register_operation

This module can do the following.

    Register VM to inventory
    Unregister VM from inventory

This is useful when you want to unregister a VM from inventory and register it again.
2019-10-02 16:57:03 -04:00
The Magician
93f851b698 Bug fixes for GCP modules (#61915) 2019-10-02 14:31:45 -04:00
The Magician
c2b8f64e83 New Module: gcp_compute_node_template (#63064) 2019-10-02 14:30:10 -04:00
Olli Helenius
c724aa22bf hcloud_volume: add linux_device to return values (#62865) 2019-10-02 20:19:10 +02:00
Olli Helenius
84bde7aea6 hcloud_floating_ip_info: create temporary ip in integration tests 2019-10-02 20:17:20 +02:00
Matt Martz
594a0fa9ae Add new truthy and falsy jinja2 tests (#62602) 2019-10-02 13:58:28 -04:00
Mike Wiebe
918f768890 [stable-2.9] Fix nxos_l3_interfaces module and tests (#62545)
* Fix nxos_l3_interfaces module and tests

* Use get_interface_type

* get_interface_type in utils lib
2019-10-02 13:43:17 -04:00
Adam Miller
8bcf11fee9 dnf - properly handle idempotent removal of wildcard globs (#63034)
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-02 11:05:12 -04:00
Andrey Klychkov
0706782e4e mysql_replication: add return value, remove extra argument from function (#63036) 2019-10-02 13:33:53 +02:00
The Magician
d6781a2a5a Bug fixes for GCP modules (#61590) 2019-10-01 18:27:51 -04:00
The Magician
2b535cc59a Bug fixes for GCP modules (#61829) 2019-10-01 18:27:42 -04:00
The Magician
53cd75bee6 Bug fixes for GCP modules (#61916) 2019-10-01 18:27:19 -04:00
The Magician
b4d15b3040 Bug fixes for GCP modules (#61917) 2019-10-01 18:27:03 -04:00
The Magician
ecc47b653b Bug fixes for GCP modules (#61918) 2019-10-01 18:26:56 -04:00
Andrey Klychkov
d8109550ec mysql_replication: setup a later version of MariaDB (#62993) 2019-10-01 08:29:40 +02:00
Nilashish Chakraborty
67213ccb4d
Fix traceback for empty config (#62520)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-09-30 20:37:28 +05:30
Rene Moser
6370c63efc lookup: lmdb_kv: add tests 2019-09-30 11:00:00 +02:00
Felix Fontein
62c0cae29a
docker_container: fix idempotency for network IP addresses (#62928)
* Specifying IP addresses needs API version 1.22 or newer.

* Simplify code.

* Use IPAMConfig.IPv*Address instead of IPAddress and GlobalIPv6Address.

* Add changelog.

* Fix syntax errors.

* Add integration test.

* Don't rely on netaddr.

* Normalize IPv6 addresses before comparison.

* Install netaddr, and use it.
2019-09-30 10:47:02 +02:00
Felix Fontein
a79f7e575a
docker_image and docker_login: move tests needing a registry into own target, add tests for docker_login (#62721)
* Move tests with docker registry into own target.

* Add docker_login tests.

* Add step which makes sure hello-world:latest is around.

* Make work inside docker container.

* Add dependency.

* Use plaintext password.

* Forgot check_mode.

* Add no_log to avoid double log output in verbose mode.
2019-09-30 06:09:00 +02:00
psharkey
ee91714eb2 New module: Add module to collect Amazon AWS IAM user info (cloud/amazon/iam_user_info) (#23382)
* AWS: new module iam_user_info

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

Rename from iam_user_facts to iam_user_info.

Rename and target 2.10.

Fixing docs.

* Adding iam_user_info integration test.

Removing unnecessary tasks.

Fixing yamllint failure test/integration/targets/iam_user_info/defaults/main.yml:5:1: empty-lines: too many blank lines (1 > 0).

* name paramter is optional

* Switch to use AnsibleAWSModule.

* Convert to using fail_json_aws

* Rework asserts to inspect ARN.

* Move integration tests from iam_user_info to iam_user.

* Fix pep8 problems.

* ec2_argument_spec not needed with AnsibleAWSModule.

* Switch to use helper in AnsibleAWSModule.

* Add iam_user_info to the aws group.

* Add support for pagination and backoff.

* Check improper parameter usage first.

* Adding test cases for multiple users.

* Rmoving unneeded line.

* Remove unneeded imports.

* Switch to catch BotoCoreError.

* Adding tests for exception coverage.

* Compare user info directly with values from created user.
2019-09-28 22:00:59 +10:00
Andrey Klychkov
334d2ce764 mysql_replication: add CI tests for MariaDB (#62907) 2019-09-27 09:29:34 -04:00
Pilou
3c8abc0b82 cron: add integration tests (#59830)
* cron: add integration tests

Use faketime in order to reduce waiting time. Using opensuse15
container:

    Tuesday 30 July 2019  23:03:19 +0000 (0:00:05.410)       0:01:28.291 **********
    ===============================================================================
    cron : install cron and faketime packages ------------------------------ 78.65s
    cron : wait 70 seconds max ---------------------------------------------- 5.41s
    Gathering Facts --------------------------------------------------------- 0.97s
    cron : enable cron service ---------------------------------------------- 0.72s
    cron : Use faketime with cron service ----------------------------------- 0.71s
    cron : command ---------------------------------------------------------- 0.41s
    cron : create directory for cron drop-in file --------------------------- 0.41s
    cron : add cron task ---------------------------------------------------- 0.40s
    cron : command ---------------------------------------------------------- 0.25s
    cron : command ---------------------------------------------------------- 0.25s
    cron : include_vars ----------------------------------------------------- 0.06s

* cron test, simplify: use Environment instead ExecStart

Thanks to mscherer for the suggestion.

* clean up comment: remove reference to outdated path

$OUTPUT_DIR is a plain path which doesn't reference any other
environment variables

* cron test: display elapsed time

* cron test: display some logs in case of failure

* cron test: handle FreeBSD

* cron tests: add checks
2019-09-26 21:50:54 +02:00
Andrey Klychkov
5b1c047a56 postgresql: move CI test to separate targets (#62855) 2019-09-26 05:53:13 -04:00
Andrey Klychkov
53ba3c46cc postgresql: move CI test to separate targets (#62823) 2019-09-25 09:03:48 -04:00
Varun Chopra
3b409f2f50 win_format - Add allocation_unit_size (#56966)
* Fix allocation_unit_size

* Some final changes and added tests

* Cleanup...

* Fixes issues on 2012/R2

* Update tests for 2012/R2

* Suggested changes
2019-09-25 08:58:30 -04:00
Jordan Borean
322e225830
Fix issue when setting an empty pass to no_log param (#62804)
* Fix issue when setting an empty pass to no_log param

* Fix typo
2019-09-24 21:45:53 -04:00
Andrey Klychkov
6be46b59fa postgresql: move CI tests to separate targets (#62773) 2019-09-24 10:42:08 +02:00
Pilou
278398555d package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) 2019-09-24 10:03:56 +02:00
Andrey Klychkov
0530a08b67 postgresql: move CI tests to separate targets (#62732) 2019-09-23 04:28:52 -04:00
Mark Chappell
0239f70648 cloudtrail: Initial integration tests (#61919) 2019-09-20 18:46:37 -07:00
Mark Chappell
40660e7f6e iam_role : support managing max session duration and deleting the instance profile it creates (#62014)
* iam_role: Add support for managing MaxSessionDuration

* iam_role: Add support for deleting the IAM Instance Profiles we created

* iam_role: migrate all boto failures to fail_json_aws for consistency

* iam_role: test validity of path so we can throw a more understandable error

* iam_role: (integration tests) Split iam_role integration tests from sts_assume_role tests

- Make the iam_role tests more comprehensive
- Add tests for iam_role_info

* iam_role: (integration tests) Make some of our pauses optional

If the tests appear to be flakey we may need to enable standard_pauses
2019-09-20 13:26:29 -07:00
Sam Doran
987265a6ef
Account for empty strings when splitting the host pattern (#62442)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
2019-09-20 16:03:51 -04:00
Gonéri Le Bouder
5ecbe9cbbb vcenter provider: Only rely on VMWARE_TEST_PLATFORM
Until now, the vcenter provider was switching between `static` and
`govcsim` depending on the presence of the following configuration file:
`test/integration/cloud-config-vcenter.ini`.

This was not consistent with Worldstream, which we enable with the
`VMWARE_TEST_PLATFORM` environment variable.

We now only rely on `VMWARE_TEST_PLATFORM` to know which platform should be
used. `govcsim` is still the default, this to preserve the original
behaviour.

This commit also rename the following variables to be consistent with the rest
of the code base. It also ensures they are alway defined, even with `govcsim`:

- `VCENTER_HOSTNAME`
- `VCENTER_USERNAME`
- `VCENTER_PASSWORD`
2019-09-20 10:33:44 -04:00
Andrey Klychkov
be9bf8cd15 postgresql: move CI test of *_publication, *_ext, *_slot to separate targets (#62646) 2019-09-20 12:47:13 +01:00
Gonéri Le Bouder
cee55ab718 mongodb_replicaset/test: properly kill the nodes
The `pids` module returns the list of the PID in a `pids` key.

This change ensures we correctly wait for the end of the previous mongod
instances before we start the next ones.

In addition, we remove an unnecessary `ignore_errors`.
2019-09-19 17:19:48 -04:00
Andrey Klychkov
7b3d8431dd postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets (#62575)
* postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets

* postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets, change formatting
2019-09-19 14:57:45 +01:00
Sumit Jaiswal
35463d45f4
Fix traceback empty config error to meaningful msg for IOS (#62538)
* fix empty config msg

* fix space

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-19 10:13:36 +05:30
Zim Kalinowski
054519920e
snapshot fix for backporting (#62559) 2019-09-19 11:42:08 +08:00
Will Thames
a684bb9f5b Ensure k8s apply works with check mode (#60572)
* Ensure k8s apply works with check mode

Update the new predicted object with fields from the previous object
before applying in check mode

Don't log output of `file` with `state: absent` on huge virtualenvs!

Fixes #60510

* Use openshift client fix to improve apply for check mode

Use new apply_object method to get a better approximation
of the expected object in check mode.

Requires released upgrade to openshift

* Add changelog fragment for k8s apply check mode fix

* Update changelogs/fragments/60510-k8s-apply-check-mode.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-09-19 05:30:31 +02:00
Rohit
978def38d8
error message updated (#62536)
* error message updated

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

* test cases updated

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

* error message updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-09-19 08:34:31 +05:30
Matt Clay
1c64dba3c9 Fix plugin names for collection plugins. (#60317)
* Fix plugin names for collection plugins.

Add an integration test to verify plugin __name__ is correct for collection plugins.

* Fix collection loader PEP 302 compliance.

The `find_module` function now returns `None` if the module cannot be found. Previously it would return `self` for modules which did not exist.

Returning a loader from `find_module` which cannot find the module will result in import errors on Python 2.x when using implicit relative imports.

* add changelog

* sanity/units/merge fixes
2019-09-18 17:47:56 -07:00
Rohit
b24f7d2800
vyosnoconfig tracebackfix (#62518)
* vyosnoconfig tracebackfix

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

* vyos noconfig tracebackfix test cases added

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

* test/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml
2019-09-18 21:58:39 +05:30
Andrey Klychkov
b87b359df5 postgresql: move CI tests of *_owner, *_info, *_ping, *_query to separate targets (#62500) 2019-09-18 14:22:13 +01:00
Lukas Kämmerling
d5449eed11 tests: hcloud: Enable hcloud_floating_ip_info tests (#62494) 2019-09-18 13:55:05 +02:00
Mike Wiebe
97b15e9f0c [stable-2.9] Stabilize nxos initiated copy for nxos_file_copy plugin (#62355)
* Retry spawn connection on failure

* Add debug logs

* Additional debug logs

* Close session before respawn attempt

* More debug info and increase loops

* Remove debug info and reset error dict on reconnect

* Add epdb debuger

* Add epdb debuger

* Add epdb debuger

* Wait before sending password and close pexpect session

* Fix comment typo

* Scrub error logs

* Scrub error logs

* Add more specific initial connect pattern

* Fix shippable errors

* Dont make remote_scp_server_password a hard requirement

* Add saftey check
2019-09-18 17:07:50 +05:30
Lukas Kämmerling
fd7e156ccd Add hcloud_floating_ip module (#62409) 2019-09-18 11:26:53 +02:00
Matt Clay
3b86dc3e12
WIP - Fix ansible-doc bugs and add integration tests. (#62461)
* Add integration tests for ansible-doc.

* Enable tests that now pass

* Cleanup processing of plugin docs

* Mostly separate the steps of processing plugin docs

  1) Acquire source data
  2) Transform and calculate additonal data
  3) Format data for output
  4) Output data

  format_plugin_doc() is still mixing transformation and formatting but
  that should be fixed in a devel-only change

* Raise exceptions in _get_plugin_doc() on errors.

* Remove check to exclude on blacklisted extensions.  We already request
  only .py files

* If there is no DOCUMENTATION entry in the plugin, raise an exception
  from _get_plugin_doc().  Everywhere we use _get_plugin_doc(), this is
  treated as an error

* If there is no ANSIBLE_METADATA raise an exception as well as
  displaying of docs assumes that this has been set.

* If there is neither DOCUMENTATION nor ANSIBLE_METADATA, warn about the
  lack of METADATA and error on the lack of DOCUMENTATION.  Lack of
  DOCUMENTATION is more important so it is what the user should see.

* Add a few special cases for backwards compat.  These should probably
  be made errors in 2.10:
  * no docs but has metadata shows no documentation rather than an error
  * empty plugin file shows no doumentation rather than an error

* Simplify backwards compatibility logic.
2019-09-17 15:45:30 -07:00
Gonéri Le Bouder
459677877a hcloud_networ_info: be more resilient is network already exists
We may already have an existing network or subnet. This commit ensures
we don't raise an error in this case.
e.g: https://app.shippable.com/github/ansible/ansible/runs/143559/145/tests
2019-09-17 16:20:38 -04:00
Gonéri Le Bouder
edf15b346f test: disable hcloud_floating_ip_info
Temporarily disable `hcloud_floating_ip_info`, this until #62414 is
resolved.
2019-09-17 13:19:40 -04:00
Sumit Jaiswal
9addad0f4a
fix ios_lldp_global (#62420) 2019-09-17 22:11:20 +05:30
Andrey Klychkov
98415dec86 postgresql_copy: move ci tests to a separate target (#62398) 2019-09-17 13:32:45 +01:00
Mike Wiebe
b0668e17ed nxos_telemetry replaced state (#62368) 2019-09-17 16:49:30 +05:30
krisvasudevan
8bc397c229 Bug fixes to the Infoblox NIOS modules (#58521)
* Update nios_ptr_record to fix bug #58378

* Update to api.py to fix bug #58378 and #56856

* Update test_nios_ptr_record.py to fix bug #58378

* Update nios_ptr_record_idempotence.yml to fix bug #58378

*  Update test_nios_ptr_record.py to fix bug ansible#58378
2019-09-17 09:45:50 +05:30
Gonéri Le Bouder
6d8743d5f1 test: temp disable azure_rm_azurefirewall
Disabled `azure_rm_azurefirewall` until #62307 is fixed.
2019-09-16 21:24:30 -04:00
Ganesh Nalawade
a9a5f4e40d
Change enable to enabled for junos_interfaces module (#62321)
Fixes #62319

Change `enable` option to `enabled` in junos_interfaces
and junos_lldp_interfaces
data model to be in sync with other network platform
resource modules added in 2.9 version.
2019-09-16 12:17:27 +05:30
Shachaf92
74a3eec1d9 win_format - Idem not working if file exist but same fs (#59819)
* win_format - Idem not working if file exist but same fs

* Test fix

* Fix test assertion syntax

* Update tests.yml
2019-09-15 22:45:44 -04:00
Chris Trufan
14bccef2c2 Add ecs_domain module (#62007)
* Add ecs_domain module

* Fixes to integration tests and module

* Fixes to tests and module

* Corrections to revalidation behavior, cna only revalidate domains in expiring.

* Remove debugs for final test run, fix sanity check test fails.

* Add checks for domain status

* Add changelog fragment for new module.

* Removed extra space in backtick

* Minor fixes to make behavior more consistent and correct documentation.

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

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

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

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

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

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

* Apply suggestions from code review

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

* Change casing of verification method enum, remove redundant changelog fragment

* Return ov_eligible and ev_eligible fields even if false, as long as they're returned by ECS API
2019-09-14 19:33:48 +02:00
Gonéri Le Bouder
2421ad3e87 azure: re-balance tests to avoid timeout
- azure_rm_azurefirewall currently takes more than 25m to run: #62307
- azure_rm_manageddisk takes around 2 minutes
2019-09-13 18:19:01 -04:00
Matt Martz
7d51cac330 Don't treat no checksum as a checksum match (#62146)
Fixes #61978
* moar tests for get_url fetch behavior with existing file
* add changelog fragment
2019-09-13 13:24:15 -04:00
Felix Fontein
098a13dff4 Re-enable some docker_swarm tests. (#61875) 2019-09-13 12:08:45 -04:00
Nathaniel Case
7917d4def7
Standardize eos resource modules (#61736)
* Fix eos_l3_interfaces case sensitivity

* Unify EOS module notes

* Add normalize_interfaces to eos_l2_interfaces

* Pull normalize_interface into eos_interfaces

* Add normalize_interface to lag_interfaces

* Add normalize_interface to lldp_interfaces

* Add normalize_interface to lacp_interfaces

* more module cleanup

* Add changelog
2019-09-13 09:35:50 -04:00
Ganesh Nalawade
200ed25648
Fix for junos cli_config replace option (#62131)
* Fix for junos cli_config replace option

*  For device that support replace option by loading
   configuration from a file on device `config` option
   is not required and value of `replace` option is the
   path of configuration file on device. This fix allows
   invoking run() function in cli_config if `config` option
   is None and `replace` option is not boolean

*  The command to replace running config on junos device
   is `load override <filename>` and not `load replace <filename>`
   This is fixed in the junos cliconf plugin.

* Add integration test
2019-09-13 18:52:33 +05:30
Sloane Hertel
efdf52a254
remove undefined YAML anchor (#62273) 2019-09-13 08:50:42 -04:00
Jeff Geerling
a6ec6c3175 Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) 2019-09-12 15:29:36 -04:00
Chris Van Heuveln
c0f3777fe2 nxos_l2_interfaces: fix for integration tests failing to setup layer2 (#61887) 2019-09-12 21:46:52 +05:30
Mike Wiebe
c4894b512d [stable-2.9] fix nxos_config tests for httpapi (#62082)
* fix nxos_config tests for httpapi

* Remove become parameter
2019-09-12 21:46:00 +05:30
Mike Wiebe
f582d74f7c Fix bfd cmd order and test issues (#61943) 2019-09-12 21:45:37 +05:30
Chris Van Heuveln
6e72893d78 nxos_lacp_interfaces: fix integration test dependencies (#61947)
* nxos_lacp_interfaces: fix integration test dependencies

* Add conditional mode test to m/d/r tests
2019-09-12 21:45:04 +05:30
Andrey Klychkov
7e91998049 fix typos in cloud modules (#62194)
* fix typos in cloud modules

* fix typos in cloud modules, fix ci tests
2019-09-13 00:01:14 +10:00
Andrey Klychkov
5eb5f74083 fix typos in modules (#62135) 2019-09-11 13:40:22 -05:00
Tony
2064fc3fc5 Added AWS SAML Federation Module (#55821)
* Added AWS SAML Federation Module

* iam_saml_federation: (integration tests) initial integration tests
2019-09-11 10:00:05 -07:00
Mike Wiebe
c5a4086ed7 Add proper hostname cleanup for nxos tests (#61810) 2019-09-11 19:40:14 +05:30
Andrey Klychkov
bcc3620182 Fix typos in database modules and their integration tests (#62125) 2019-09-11 08:19:25 -04:00
Ganesh Nalawade
ff53ca76b8
Return commands key instead of xml in result for junos rm (#62041)
Fixes https://github.com/ansible/ansible/issues/61773

*  Change `xml` key name to `commands` key to be in sync with
   other platform resource modules.
2019-09-11 11:06:08 +05:30
Jill R
414d844ed2 AWS ec2_vpc_net: Enable ipv6 CIDR assignment (#60983)
* AWS ec2_vpc_net: Enable ipv6 CIDR assignment

Enable IPv6 CIDRs in ec2_vpc_net, and fix ec2_vpc_subnet tests that
were depending on the aws cli for CIDR assignment.

Related to: #27800
2019-09-10 19:25:36 -04:00
MyronFanQiu
603c8c171f fix ci (#57216) 2019-09-10 13:23:04 +08:00
Mark Chappell
e0ebc8c9b4 Fixup aws_secret integration tests (#61241)
* aws_secret: (integration tests) Move tests to using module_defaults

* Update hacking aws security policy to enable management of secrets

* aws_secret: (integration tests) Fixup integration tests
- Update tests to use resource_prefix as a prefix rather than a suffix
- Pause after role creation to cope with AWS being slow (and returning before the role it ready)
2019-09-09 15:23:19 -07:00
Mario Lenz
900a51b283 VMware: Fix issue with order of changes in vmware_vcenter_statistics 2019-09-09 16:01:54 -04:00
Jill R
528f9a6672 Fix ec2_vpc_vgw broken tests (#60981)
* Fix ec2_vpc_vgw broken tests

Add waiter function to wait for API to report detached vgw is available.
Also catch extra error code in attach retry as EC2 sometimes reports that
the vgw is available several seconds before permitting the attachment.

Fixes: #53185

* Re-enable ec2_vgc_vgw test target
2019-09-09 15:57:09 -04:00
Tom De Keyser
6f74fca238 New module for AWS Step Functions state machines (#59116)
* add new module: aws_stepfunctions_state_machine

* add integration tests for new module: aws_stepfunctions_state_machine

* fix sanity checks

* use files/ folder instead for integration test

* rename role name in integration test

* attempt further permissions

* iam states prefix

* iam integration test prefix

* add iam policy for running step functions state machine actions

* slightly increase iam permission scope

* rename integration test folder to proper name

* move main() method to end of file

* move contents of integration-policy.json for state machines to compute-policy.json

* make check_mode return proper changed value + add check_mode integration tests

* rename module to aws_step_functions_state_machine

* fix missed rename in integration test variable

* add purge_tags option

* bump to version 2.10
2019-09-09 10:08:21 -07:00
Erwan Quélin
7b28960ebe VMware: Add new module VMware vSAN health infos (#58636) 2019-09-09 14:59:31 +05:30