Commit graph

4637 commits

Author SHA1 Message Date
Paul Belanger
7f536630eb
Use wait_for in prepare_junos_tests.yaml (#57073)
This should reduce the amount of time we are waiting for netconf to come
online.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-16 16:03:55 -04:00
Jordan Borean
d0c4914469
win_shell - fix space escaping for custom executable (#57455) 2019-06-17 05:14:58 +10:00
Ganesh Nalawade
0d2ffdd5a6
Fix iosxr netconf integration test (#57882)
* Modify testcase to work with Zuul CI enviornment
2019-06-15 16:58:09 +05:30
Matt Clay
597d943dad Remove needs/ssh alias from callback_default test.
The test does not require ssh.
2019-06-14 14:49:03 -07:00
Sam Doran
84075fe351 Change RHEL8 image name to match changes in ansible-test (#57807)
* Change RHEL8 image name to match changes in ansible-test

Continue to use the beta version of RHEL 8 until we fix tests that are breaking with the GA version.

* Skip ufw integration test on RHEL 8 Beta
2019-06-14 13:47:26 -07:00
Nilashish Chakraborty
af25274d6a
Remove backup from iosxr replace_config test (#57830)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-06-14 14:11:19 +05:30
Gonéri Le Bouder
7d85cbcc6c vmware: test-suite fixes
Minor fixes for the test-suite found during the integration with the CI.
2019-06-13 20:23:33 -04:00
The Magician
ab0a548b0c Bug fixes for GCP modules (#57728) 2019-06-13 18:25:11 -04:00
The Magician
625ef22dd9 New Module: gcp_tpu_node (#57729) 2019-06-13 18:25:00 -04:00
Kevin Breit
a85750dc98 Meraki - Convert response keys to snake_case from camelCase (#53891)
* Initial proposal for new parameter option for response format
- output_version parameter dictates the response key case
- new is snake_case, old is camelCase
- If new, conversion is done at the end of module execution
- This is purely a proposal and not a final draft

* Add support for ANSIBLE_MERAKI_FORMAT env var
- If env var is set to 'camelcase' it will output camelcase
- Otherwise, will default to snakecase
- Added note to documentation fragment
- As of now, all module documentation needs to be updated

* Fix pep8 errors and remove output_version args

* Restructure check in exit_json so it actually works

* Add changelog fragment

* Change output_format to a parameter with env var fallback
- ANSIBLE_MERAKI_FORMAT is the valid env var
- Added documentation

* Convert to camel_dict_to_snake_dict() which is from Ansible
- Fixed integration tests

* Fix yaml lint error

* exit_json camel_case conversion handles no data
- exit_json would fail if data wasn't provided
- Updated 3 integration tests for new naming convention

* convert_camel_to_snake() handles lists and dicts
- The native Ansible method doesn't handle first level lists
- convert_camel_to_snake() acts simply as a wrapper for the method
- There maybe a situation where nested lists are a problem, must test
- Fixed integration tests in some modules

* A few integration test fixes

* Convert response documentation to snake case
2019-06-13 15:07:30 -04:00
Sam Doran
99fd7821b3 Split azure_rm_virtualmachine integration tests to prevent timeouts (#57250) 2019-06-13 08:48:55 -07:00
Abhijeet Kasurde
00604d3f2c
VMware: Fix vmware_guest_move undefined VM name error (#57582)
* Updated testcase
* Added check mode support
* Added check for mutual exclusive for Name and UUID

Fixes: #57580

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-06-13 13:07:26 +05:30
René Moser
5143f52def
vultr: vultr_ssh_key_facts -> info (#57571)
* vultr: deprecate vultr_ssh_key_facts

* vultr: rename tests

* vultr: adjust tests

* vultr: new vultr_ssh_key_info module

* vultr: test: vultr_ssh_key_info: improve tests

* update docs
2019-06-13 07:05:00 +02:00
Kevin Breit
17c475b101 meraki_ssid - Improve change reporting (#56201)
* Improve change reporting for meraki_ssid
- Documentation is more clear about dependencies
- Not all change reports are accurate without new algorithm
- Improved integration tests

* Rename changelog fragment

* Enable all tests in integration tests
- Fix type merging

* Add more integration tests for code coverage

* Update URL creation
2019-06-12 11:06:00 -04:00
Martin Krizek
1fa7bfcd5d Fix --diff to produce output when creating a new file (#57744)
* Fix --diff to produce output when creating a new file

Fixes #57618

* Make the check more defensive
2019-06-12 10:56:14 -04:00
Kevin Breit
a50b3d7695 meraki_syslog - Module properly handles net_id parameter (#57286) 2019-06-12 10:44:05 -04:00
Kevin Breit
87169c4aa4 meraki_vlan - Enable check mode (#54627)
* Add support for check mode

* Add diff support
- diff support is based on "have" and "want" data structures.
- Review needs to be done on the diffs for accuracy and usefulness.
- Changed change mode changed responses to be accurate.

* Remove config template based integration tests
2019-06-12 10:43:02 -04:00
Kevin Breit
b13e5242e0 meraki_mr_l3_firewall - Fix integration test cleanup (#57562) 2019-06-12 10:28:09 -04:00
Stefan Horning
77ec0549b0 New module for AWS CodeBuild (#47187)
* New AWS module for the CodeBuild service, called aws_codebuild

* Integration test for new aws_codebuild module
2019-06-12 10:25:53 -04:00
Stefan Horning
33a26d31fd New module for AWS CodePipeline (#47189)
* New module for AWS CodePipeline

* Added integration test for new aws_codepipeline module
2019-06-12 08:50:09 -04:00
Chris Van Heuveln
205f6b1699 nxos_pim_interface: Add 'bfd' support (#57133)
* nxos_pim_interface: Add 'bfd' support

* PEP fixes

* fix copyright date

* bfd states changed from T/F to enable/disable/default
2019-06-12 09:47:41 +05:30
ShachafGoldstein
d2909d5ef0 win_scheduled_task: Fix start/end boundry triggers to allow for timezone sync (#57282)
* Fix 49327

* Add a test

* Join test

* Test issue

* Fix missed assertion
2019-06-12 05:27:51 +10:00
The Magician
ecbd1173b9 New Module: gcp_cloudscheduler_job (#57262) 2019-06-11 13:52:56 -04:00
Martin Krizek
e8948f7655
Actually run valid_include_keywords test (#57687) 2019-06-11 18:21:28 +02:00
Jill Rouleau
aba06b893b Add proxy vars to vcenter integration test config 2019-06-11 11:26:52 -04:00
Paul Belanger
07e1bd8fe7
Fix ios_smoke failure (#57665)
Set ansible_buffer_read_timeout to be larger then
ansible_command_timeout, as both appliance / controller are on the same
physical network and we are not triggering ansible_command_timeout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-11 10:52:54 -04:00
René Moser
8c3382ec70
vultr: vultr_os_facts -> info (#57565)
* vultr: vultr_os_facts: rename to info

* vultr: vultr_os_facts: rename tests to info

* vultr: adjust tests

* vultr: new vultr_os_info module
2019-06-11 07:51:24 +02:00
René Moser
0ca50c7d6f
vultr: vultr_user_facts -> info (#57564)
* vultr: deprecate vultr_user_facts

* vultr: vultr_user_facts: rename to info

* vultr: adjust tests

* vultr: new vultr_user_info module
2019-06-11 07:49:24 +02:00
Felix Fontein
13f73adef5
AWS: _facts -> _info (part 4) (#57651)
* Rename ec2_vpc_dhcp_option_facts -> ec2_vpc_dhcp_option_info.

* Rename ec2_vpc_endpoint_facts -> ec2_vpc_endpoint_info.

* Rename ec2_vpc_igw_facts -> ec2_vpc_igw_info.

* Rename ec2_vpc_nacl_facts -> ec2_vpc_nacl_info.

* Rename ec2_vpc_nat_gateway_facts -> ec2_vpc_nat_gateway_info.

* Rename ec2_vpc_net_facts -> ec2_vpc_net_info.

* Rename ec2_vpc_peering_facts -> ec2_vpc_peering_info.

* Rename ec2_vpc_route_table_facts -> ec2_vpc_route_table_info.

* Rename ec2_vpc_subnet_facts -> ec2_vpc_subnet_info.

* Rename ec2_vpc_vgw_facts -> ec2_vpc_vgw_info.

* Rename ec2_vpc_vpn_facts -> ec2_vpc_vpn_info.

* Update module defaults, add changelog and porting guide.

* Update BOTMETA.
2019-06-10 21:40:05 +02:00
Felix Fontein
804d5eaf8e
AWS: _facts -> _info (part 3) (#57635)
* Rename ec2_ami_facts -> ec2_ami_info.

* Rename ec2_asg_facts -> ec2_asg_info.

* Rename ec2_customer_gateway_facts -> ec2_customer_gateway_info.

* Rename ec2_eip_facts -> ec2_eip_info.

* Rename ec2_elb_facts -> ec2_elb_info.

* Rename ec2_eni_facts -> ec2_eni_info.

* Rename ec2_group_facts -> ec2_group_info.

* Rename ec2_instance_facts -> ec2_instance_info.

* Rename ec2_lc_facts -> ec2_lc_info.

* Rename ec2_placement_group_facts -> ec2_placement_group_info.

* Rename ec2_snapshot_facts -> ec2_snapshot_info.

* Rename ec2_vol_facts -> ec2_vol_info.

* Update module defaults, add changelog and porting guide.

* Forgot one occurence of ec2_instance_facts.

* Update BOTMETA.

* Break too long line.
2019-06-10 19:33:38 +02:00
Felix Fontein
fc4bbff6e1
AWS: _facts -> _info (part 2) (#57626)
* Rename cloudwatchlogs_log_group_facts -> cloudwatchlogs_log_group_info.

* Rename elasticache_facts -> elasticache_info.

* redshift_facts -> redshift_info.

* Rename route53_facts -> route53_info.

* Rename rds_instance_facts -> rds_instance_info.

* Rename rds_snapshot_facts -> rds_snapshot_info.

* Rename iam_mfa_device_facts -> iam_mfa_device_info.

* Rename iam_role_facts -> iam_role_info.

* Rename iam_server_certificate_facts -> iam_server_certificate_info.

* Rename elb_application_lb_facts -> elb_application_lb_info.

* Renaming elb_classic_lb_facts -> elb_classic_lb_info.

* elb_target_facts -> elb_target_info.

* Rename elb_target_group_facts -> elb_target_group_info.

* Update porting guide.

* Add changelog.

* Fix module defaults (both for this PR and #57613).

* Two fixes.
2019-06-10 17:48:07 +02:00
Abhijeet Kasurde
3bee49a3bb Remove trailing new line while including vars (#57605)
While including var files using _raw_params adds additional new line
character, which makes Ansible to fail to include that file in.
This fix removes extraneous new line character while parsing the var file.

Fixes: #57593

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-06-10 11:23:38 -04:00
Ganesh Nalawade
a867ced4de Fix junos integration zuul CI failures (#57309) 2019-06-10 16:10:57 +02:00
Felix Fontein
51229eb99c
AWS modules: _facts -> _info (#57613)
* Rename aws_acm_facts -> aws_acm_info.

* Rename aws_az_facts -> aws_az_info.

* Rename aws_caller_facts -> aws_caller_info.

* Rename aws_kms_facts -> aws_kms_info.

* Rename aws_region_facts -> aws_region_info.

* Rename aws_sgw_facts -> aws_sgw_info.

* Rename aws_waf_facts -> aws_waf_info.

* Adjust docs.

* Add changelog and update porting guide.
2019-06-10 15:52:49 +02:00
Felix Fontein
039eb892ba
Second batch for _facts -> _info rename (#57020)
* Second batch of _facts -> _info.

* Forgot one reference.
2019-06-10 13:04:07 +02:00
ECRR
5cc6486a2b Merge authentication options back into a single field to prevent losing options beyond the first (#57507)
* Merge authentication options back into a single field to prevent losing options beyond the first

* Add integration test and changelog

* Fix multiple options for local type connections. Also fix sorting errors between local type connections that lack a src

* Build again because of github problems?

* Add spaces before comments
2019-06-10 09:16:01 +02:00
René Moser
c001391555
vultr_server: implement support for IDs to match resources (#55762) 2019-06-09 13:34:25 +02:00
Felix Fontein
c50a75a41e
acme_*: new test container, tests for IP certificates (#57530)
* Bump container version.

* Use new URLs.

* Add IP certificate tests.

* Disable IPv6 IP from IP certificate.

Background: in CI, the ACME test container apparently has no IPv6 support.
Without IPv6 support, Pebble can't connect to validate, and thus validation
fails.
2019-06-08 14:02:44 +02:00
Sloane Hertel
cd77ea3c7f
File module - fix unicode paths and add a test (#57558)
* File module - Fix unicode paths

* Add a test for unicode paths for the file module
2019-06-07 21:27:38 -04:00
Zim Kalinowski
93a85b6c86 Additional rename fixes (#57527)
* adding symbolic link

* missing renames

* reverted version_added
2019-06-07 18:22:17 -07:00
Matt Clay
b211b24862 Move azure_rm_autoscale test from group 2 to 5. 2019-06-07 14:35:51 -07:00
Matt Clay
7d9cac8e47 Fix azure_rm_virtualnetwork integration test.
Previously the test would fail when run after another test which also
created a virtual network tagged with the 'testing' tag.
2019-06-07 10:35:19 -07:00
Matt Clay
767e02f9fe Fix yamllint failure. 2019-06-07 09:58:48 -07:00
Sumit Jaiswal
04bfcd08a8 PR to fix the IOS_NTP integration TC failure (#57481)
* ios_ntp tc fail

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

* ios_ntp tc fail

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

* fix for local connection

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-06-07 11:56:30 -04:00
Iain Madder
91d326cb68 Update file.py's initial_diff() to list existing when state: absent (#56353) 2019-06-07 09:55:51 -04:00
tcraxs
07d446825a New module postgresql_sequence (#55027)
* postgresql_sequence: initial commit with new module and tests

* change return variables and adjust tests

* fix sanity checks

* fix linter errors

* change formatting functions and put params alphabetically

* add new examples and remove restrict option
* remove restrict option
* remove `required: false`
* add links to documentation
* change some minor parts in documentation
* add new integration tests for
** drop cascade
** change owner

* change usage of owner and created a test case for set owner during creation

* remove some documents and use docsfragments

* add aliases for minvalue and maxvalue

* change to warn if sequence not exists but should be removed

* use connect_to_db from module_utils/postgres.py

* add checkmode for several tests

* fix psycopg2 import and connect_to_db

* add a test for drop nonexistent sequence

* change get_info funcrtion to use only one SQL statement

* rewrite the module for cleaner code
* remove psycopg2
* change check_mode behavior
* add docstrings for class and methods
* add test for create sequence with owner in check_mode

* fix typo in set_schema()

* fix docu and cleanup the code
* adjust documentation for state, schema and newschema
* remove mutually_exclusive for 'absent'
* remove unused code comments
* remove warning for drop non-exicsting sequence
* change autocommit condition

* adjust state documentation
2019-06-07 13:34:57 +02:00
Matt Clay
03d64cd9ea Fix azure_rm_resourcegroup integration test. 2019-06-06 22:08:17 -07:00
Chris Van Heuveln
bd844bc11c nxos_interface_ospf: Add bfd support (#56807)
* nxos_interface_ospf: Add bfd support

Add support for `bfd` state in `nxos_interface_ospf`

- Feature Pull Request

`nxos_interface_ospf`

* Fix pep issues

* sanity loop: syntax

* bfd states changed from T/F to enable/disable/default

* doc hdr fixes
2019-06-07 09:58:29 +05:30
Matt Clay
b2791718e5 Use bintray to install erlang for rabbitmq tests. 2019-06-06 17:05:13 -07:00
Matt Clay
047fd3cfbc Revert "Disable the rabbitmq tests for now"
This reverts commit 5f47ab958f.
2019-06-06 17:05:13 -07:00
Toshio Kuratomi
5f47ab958f Disable the rabbitmq tests for now
The erlang-solutions repository is broken for Ubuntu18 (They did not
sign their repository metadata).  For now, disable the rabbitmq tests
which depend upon that.  I'll open a PR with a revert of this commit.
We can watch it to see when it passes in Ci to know that the
erlang-soutions repository has been fixed
2019-06-06 15:11:48 -07:00
Brian Coca
b9b0b23015
safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests
2019-06-06 15:36:22 -04:00
mjmayer
0dfc21c826 [elb_application_lb tests] narrow ami filter #43375 (#57432) 2019-06-06 13:58:18 -04:00
Junyi Yi
bd48a7fb73 Implement a new module to support Batch Account (#55074)
* Implement a new module to support Batch Account.

* Fix the schema definition.

* Fix some lint errors.

* Normalize line endings.

* Remove not-recommended idempotency check.

* adding stubs for discussion

* Add one more output attribute.

* Leverage `idempotency_check` and `normalize_resource_id`.

* Fix line is too long error.

* normalize resource id implementation

* normalizing resource id fix indentation

* Fix linting issues.

* Fix runtime errors of Azure Python SDK.

* Add info module to Batch Account.

* Remove info module per suggestion.

* adding initial comparison function

* fix in idempotency check

* batch account update to support idempotence

* don't modify azure_rm_common for timebeing to avoid excessive ci

* adding first ci

* added more description on comparison function

* fixed storage account name

* fix

* fixed indent in common function + batch account name unpacking

* fix bug

* fixing sanity

* updated class relations

* fix in common

* updated disposition

* Add two more updatable/disposition in module_arg_spec

* updated common file

* Fix documentation for auto_storage_account.

* fixed line too long

* fixed keyvault reference

* fixed batch account creation

* fix pep8

* Regenerate code according to the feedbacks.

* test deleting batch account

* Add auto-generate comments to test file.

* renamed delete task, removed unstable

* clean up storage account
2019-06-06 09:10:01 -07:00
Chris Van Heuveln
7aa0d26fda nxos_bfd_global / NxosCmdRef initial commit (#56317)
* nxos_bfd_global: initial commit

This is an initial POC with just a few commands included.  The code has been written somewhat generically so that it can act as a best practices template for re-use in future modules. The implementation follows the yaml cmd_ref style to define each command's getter/setter/type/default. It supports platform-specific defaults.

The basic logic is to collect all relevant data in a `cmd_ref` dict and pass that around to various methods.

In the BFD case the devices don't provide JSON output so we have to screen-scrape with show runs.

BFD does not support present/absent states so there is no state param.

BFD has three different property types to handle. We can add add'l types as needed:

- int
- int_list (list of ints)
- str (needs support for 'no' keyword)

* Use get_capabilities to find platform type

* PR comment fixes, round 1

* Minor cleanups

* nxos_bfd_global: create NxosCmdRef in module_utils

This commit just takes the latest bfd global code and moves the bulk
of the code into new `class NxosCmdRef` in `module_utils/nxos/nxos.py`.

The only remaining code in `nxos_bfd_global.py` are the calls from `main()`.

* Add remaining command properties and documentation

* update argument_spec

* Add check for _exclude; add sanity test

* Add targets files for bfd

* Context and state absent updates

* Add dict support to cmd_ref

* Changed remaining list commands to dict usage

* Add idempotence check for dict

* Fix existing overwrite bug

* Move pattern matching logic into its own method

* add support for 'command: absent'

* Add `get_platform_shortname`; update BFD platform-specific settings

* /absent/deleted/

* /sh/show/ in prepare_nxos_tests

* add dict check to get_platform_shortname

* Add normalize_defaults()

* UTs for bfd_global

* support yaml for both py2/py3

* update cmd_ref doc header

* Fix python2.6 incompatibility with dict comprehensions

* Fix bfd_global doc header (yaml syntax fail)

* more shippable fixes

* yet more shippable fixes

* shippable: remove r' ' wrappers

* docfix - remove ':'

* escape regex ctl chars in yaml table

* remove extra blank lines

* Fix str(None) issue

* Command context updates

* import PY2,PY3 instead of import sys

* fix ordereddict import & parent_context

* try/except for yaml import

* fix import issue for ordereddict

* remove epdb

* nxosCmdRef_import_check() workaround for shippable

* fix PEP ws errors
2019-06-06 15:52:55 +05:30
Will Thames
f65ac2cf23 Add tests for #56147 (#57256)
Tests are separate for easier backporting
2019-06-06 10:59:19 +02:00
Marcus Watkins
6e94b472e8 Fix #56640: Map k8s ansible keys to api keys (#57418)
* Fix #56643: Map ansible keys to api keys

* Remove errant print line

* Fix pep8 issue

* Fix doc line

* Added test for validate_certs -> verify_ssl translation for k8s module
2019-06-06 18:51:23 +10:00
Ian Wienand
6f06fc9945 openssh_keypair: make fingerprint result a string (#57295)
The extant documentation says that the fingerprint return value is a
single string, but it is currently being returned as a split list.
Convert the returned value to a string as documented, and add some
basic test-case coverage for the return values.
2019-06-06 07:58:50 +02:00
Mike Wiebe
870d8bf10b Fix nxos_vtp_version test (#57358) 2019-06-06 09:35:29 +05:30
Mike Wiebe
7c73dd3e78 nxos_install_os: Fix nxapi local failures (#55993)
* Fix nxapi failures

* Remove logit debug calls

* Remove msg_timestamps

* Fix code alignment issue
2019-06-06 09:35:08 +05:30
Andrey Klychkov
ea9a0f36f3 postgresql_table: 57352 bugfix, add schema handling (#57391)
* 57352 bugfix, add schema handling

* 57352 bugfix, added a changelog fragment

* 57352 bugfix, added tests for rename

* 57352 bugfix, fixed tests

* 57352 bugfix, fixed typos, cosmetic changes
2019-06-05 15:06:23 -04:00
Kevin Breit
919f70c357 New module - meraki_malware (#56929)
* Initial commit for meraki_malware module
- Allows for manipulation of malware configuration

* Add full documentation and improve code coverage

* Add diff support

* Type change

* Sanity check fixes

* Convert org_id from str to int for consistency

* Sanity fixes again

* Fix argument type errors

* Remove ignore items for some Meraki modules so shippable is happy
2019-06-05 10:36:39 -04:00
Kevin Breit
8bcf9b5734 meraki_network - Restructure execution logic (#56818)
* Restructure meraki_network to be simpler and work for all int tests

* Enable all integration tests and enhance error reports

* Slight tweaks to integration tests
2019-06-05 10:33:55 -04:00
Daniel Mellado Area
091bebcbf7 Add support for vlan update on ovs bridges (#57168)
This commit adds support for vlan update on openvswitch_bridge module.
2019-06-05 10:32:14 -04:00
Kevin Breit
72f2d05b6f meraki_content_filtering - Enable check mode (#54638)
* Add support for check mode.

* Add diff support
- Need to analyze diff for accuracy
- Updated check mode changed value

* Improve test coverage

* Remove a duplicate integration test
2019-06-05 10:31:50 -04:00
Kevin Breit
6da2d40500 meraki_admin - Enable check mode (#54499)
* Add support for check mode

* Add changelog fragment

* Add diff support
- Fix a few changed status
- Removed auth_key check since that's done in module_utils now
2019-06-05 10:23:54 -04:00
Ed Costello
30aeab4709 Make aws_ses_identity module work when region is provided via environment or config. (#51627)
fixes #51531
2019-06-05 09:51:58 -04:00
Martin Krizek
18f2ed63e0
file: fix setting relative paths for src for hard links (#56055) 2019-06-05 15:26:40 +02:00
Martin Krizek
705d0201cf
file: fix setting attributes for symlinked file (#57217) 2019-06-05 15:25:43 +02:00
Jordan Borean
b5b75daaa5
win_chocolatey - honour version when bootstrapping chocolatey and fix package listing (#57208)
* win_chocolatey - honour version when bootstrapping chocolatey

* skip upgrade all step

* Fix install latest step

* Remove test changes now that Chocolatey is released

* tweak the package version detection
2019-06-05 09:10:10 +10:00
Jill R
47cfbd6605
Add integration test provider for vmware (#55772)
* Add integration test provider for vmware

This change adds a new remote cloud provider option for vmware,
supporting dynamic environments running on worldstream.nl as well as
static environments specific by the user in a cloud-config template.
2019-06-04 13:49:30 -07:00
Chris Van Heuveln
6bb13bbb84 nxos_vlan: fix broken purge behavior (issue #57101) (#57229)
* nxos_vlan: fix broken purge behavior (issue #57101)

Symptoms/Analysis:
- `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1.
- `nxos` devices do not allow removing vlan 1 and raise a cli exception error
- Previous fix #55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g.
 - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true`
 - results in proper purging but vlan 4 is not created

Solutions:
- ignore vlan 1 when purging
- remove the `not purge` check from state present logic

Added additional unit tests and integration tests.
Tested against all regression platforms.

* PEP fixes

* Add agg_show_vlan_brief.txt fixture

* Add warning for removing vlan 1

* change method name check
2019-06-04 09:14:09 +05:30
Matt Clay
858e3a7272 Correct virtualenv usage in integration tests. 2019-06-03 15:23:04 -07:00
Felix Fontein
7b40b569b2
Rename memset_*_facts to memset_*_info (#57030)
* Rename memset_*_facts to memset_*_info

* Add changelog.
2019-06-03 21:19:49 +02:00
Stefan Horning
ddfaa83ccf s3_bucket: add encryption capabilities to the module (#55985)
* s3_bucket: add encryption capabilities to the module
2019-06-03 11:25:09 -07:00
Mike Wiebe
87422ea7e7 nxos_snmp_user, nxos_snmp_host integration test fixes. (#57201)
* Fix nxos_snmp tests

* Add imagetag check for nxos_snmp_user test
2019-06-03 18:33:52 +05:30
Sam Doran
2e0229a4b6 ansible-vault: convert vault_password_files to list to prevent traceback (#57186)
* Convert vault_password_files to a list

* Add changelog and tests
2019-06-03 12:14:06 +02:00
Sloane Hertel
21cd24a0dd improve conditional warnings (#57190)
* Fix order for warning on templated conditionals

Fix bare variable warnings when the variable is a boolean

* changelog

* Add tests for cases that should and should not give warnings

If the behavior may change when the default behavior for CONDITIONAL_BARE_VARS becomes False there should be a warning. Boolean type conditionals will not change in behavior so don't warn.

* oops, forgot to add files

* typo
2019-06-03 12:12:32 +02:00
Andrey Klychkov
96bf243265 New module postgresql_copy: copy data between a file and a table (#56835)
* New module postgresql_copy

* New module postgresql_copy: added tests

* New module postgresql_copy: changed tests

* New module postgresql_copy: doc format fixes

* New module postgresql_copy: fixes

* New module postgresql_copy: added upper, PostgreSQL

* New module postgresql_copy: fixed description

* New module postgresql_copy: added note about superuser

* New module postgresql_copy: remove SQLParseError

* New module postgresql_copy: fixed opt_need_quotes type

* New module postgresql_copy: fixed check_mode

* New module postgresql_copy: small fix
2019-06-03 19:11:50 +10:00
René Moser
0c66a5d3ca
cloudcscale_floating_ip: add types (#56924) 2019-06-03 10:43:32 +02:00
Gonéri Le Bouder
e460a219cd VMware: vmware_evc_mode: fix the functional tests (#56875)
* Updated vmware_evc_mode tests
* Remove extraneous line in main.yml

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-06-02 08:16:05 +05:30
Felix Fontein
c54d79bc13
Extend docker_image tests. (#57090) 2019-06-01 15:29:00 +02:00
Abhijeet Kasurde
c8eda7773e
VMware: Update vmware_guest_powerstate (#57000)
* Updated documentation
* Updated testcases
* Updated example
* Updated logic
* Provided option to specify task name, task description, task enable status etc.

Fixes: #56987

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-06-01 08:10:05 +05:30
Felix Fontein
7cd229aa97
Fix assignments in docker tests. (#57249) 2019-05-31 23:47:53 +02:00
Matt Martz
8bd4e2a144 cert validation fixes - Attempt 2 (#55953)
* Attempt 2 of cert validation fixes

* Remove unused code

* Cleanup the tmp cert using atexit

* Fix linting issues

* Only add SSLValidationHandler when not HAS_SSLCONTEXT

* Catch value errors on non PEM certs

* Only catch NotImplementedError to avoid masking issues

* set self._context even with PyOpenSSLContext for conformity

* Fix error building

* normalize how we interact with the context we create

* Remove unused code

* Address test for py3.7 message difference

* open_url should pass the ca_path through

* Account for new error in url lookup test

* Guard some code behind whether or not we are validating certs

* Make _make_context public

* Move atexit.register up to where the tmp file is created
2019-05-31 16:35:25 -04:00
Rohit
ae033f1ec3
vyos interfacefix and test cases (#57169)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-05-31 16:13:40 +05:30
Sebastiaan Mannem
223f509ea3 Issue 56430 (#57147)
* Adding integration test for 127.0.0.1/32 and ::1/128.

* Making sure file is not corrupted when render fails

* Fixes #56430

* Adding changelog for MR 57147/Issue 56430
2019-05-31 12:32:28 +02:00
Will Thames
ac1895453f Add test case for k8s cascading deletes (#55987)
* Add test case for non-cascading deletes

Deleting a DaemonSet does not delete associated pods,
even though it should

* Add coverage module when using pip

Otherwise tests seemingly fail
2019-05-29 19:26:43 -04:00
Kevin Breit
5008e1d479 meraki_config_template - Enable check mode (#54502)
* Add support for check mode

* Check mode returns proper changed status
- Added is_template_valid()
- Restructured check_mode so it will always return data
- Check mode should show proper changed status
- Code is untested and integration tests need to be expanded

* Fix deleting networks
- Add integration tests for deleting networks
- Refine tests based on changed/unchanged

* Remove one task from integration test
2019-05-29 16:30:26 -04:00
Kevin Breit
4df53f869e meraki_network - Add support for disableRemoteStatusPage (#48971)
* Add support for disableRemoteStatusPage
- New feature in the Meraki API
- Yes, it's a double negative, I may fix at some point

* Remove double negative
- All disables became enable and logic is reversed
- This isn't yet tested

* Switching computers!!!

* Apply changes to make the logic work, even reversed

* Attempt to fix some formatting errors

* Add documentation fragment

* Fix whitespace

* Add disable_my_meraki back, with deprecation notice

* Edit changelog notice

* Update deprecation version

* Update example to be a block and change deprecation message.

* Remove duplicate delegate_to

* Change deprecation notice.
2019-05-29 16:29:40 -04:00
Ian Wienand
39945b8570 Make query with errors='ignore' return a blank list (#57038)
The jinja2 query() function (or lookup with wantslist=True, which is
the same thing) should always return a list.

However, if you combine a query with errors='ignore' and take the
error path, the current code returns a None value.  This is important
in a case such as

 - name: Conditional include file
   import_tasks: '{{ item }}'
   vars:
     params:
       files:
         - path/file1.yaml
         - path/file2.yaml
   loop: "{{ q('first_found', params, errors='ignore') }}"

If neither file1.yaml or file2.yaml exist, this should do nothing by
returning an empty list to the loop.  Currently if you run the above
task you'll get a rather unhelpful:

 Invalid data passed to 'loop', it requires a list, got this instead: .

This change ensures that when a query ignores an error, it returns a
empty list.  The errors='ignore' case is tested in several variants
with first_found.  The extant (but deprecated) "skip: True" for
first_found doesn't seem to be explicitly tested; a test is added here
to avoid regressions before removal in 2.12.

This fixes a regression you'll hit if you follow the suggestion in the
deprecation message included with
e17a2b502d to use errors=ignore over
"skip: True" for first_found.  This change adds an example that points
out the query/lookup difference and also fixes the error message to
not mention the now deprecated "skip: True".

Closes #56775
2019-05-29 13:23:02 -04:00
Kevin Breit
7864df8cb9 meraki - Rewrite update requirement check (#48394)
* Rewrite idempotency check
- Check now operates recursively and works on multiple types
- Order of lists matter

* Remove blank line for lint

* Fixed idempotency checks in meraki_ssid
- New sanitize() method for finding keys unique in compared dicts
- Fixed bug in meraki_ssid where SSID specified by number breaks
  - This will require a backport
- Converted ignored_keys from tuple to list

* Made changes required for idempotency

* Add changelog fragment

* Add unidirectional option for testing

* Disable option 1 check

* General fixes for is_update_required testing
- Added commented out debug statements in method
- Fixed ignored_keys modifications

* Remove old commented algorithm
2019-05-29 10:18:01 -04:00
Daniel Mellado Area
0ada6b8d8d Fix junos_facts test (#57065)
This commit fixes a non-passing junos_facts integration test, as it was
using a non-ordered frozenset to assert its result.
2019-05-28 20:25:45 -04:00
Nathaniel Case
1b66a13186
Fix flow in eos_l2_interface (#57059)
* Also fix test debug labels
2019-05-28 14:06:57 -04:00
The Magician
a837cc5694 Bug fixes for GCP modules (#55976) 2019-05-28 13:43:19 -04:00
The Magician
713ac29054 Bug fixes for GCP modules (#56689) 2019-05-28 13:42:12 -04:00
Paul Belanger
94e007ed77 ansible-test: use become for connection=local on ios_user (#56960)
ios_user requires escalated privledges, rather then doing this in the
inventory, we can just add it into the playbook tasks.

Also add missing provider settings for authorize.

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

* Add changelog.

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

* mysql_info - CI tests

* mysql_info: fixes

* mysql_info: fixes Decimal

* mysql_info: fixes Decimal converters.py

* mysql_info: fixed err conn message and check_mode

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

* mysql_info: convert Decimal to float

* mysql_info: fix

* mysql_info: fix

* mysql_info: returned the args list as it was

* mysql_info: fix typo

* mysql_info: fixes

* mysql_info: removed aliases for login_db

* mysql_info: changed RETURN condition info

* mysql_info: fixed doc

* mysql_info: fixed role's parsing

* mysql_info: fixed role's parsing

* mysql_info: fixes

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

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

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

* ios_ntp: properly register result variable for testing

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

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

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

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

* grep for warning

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

Fixes: #48010

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

* Well this should probably change

* Hopefully this works correctly?

* Fix check_rc handling with httpapi

* Add tests that should hopefully cover the error

* Fix warnings

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

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

* Updated integration testing

* Fix Ansible Sanity Errors

* Changed version added to 2.8 from 2.9

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

Fixes: #54986

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

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

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

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

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

* [docker] group branch conditions per lookup

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

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

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

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

should work as expected

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

* a few updates

* fixed mistake

* updated docs, fixed syntax

* updated priority

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

* fix check mode
2019-05-20 10:38:55 -07:00
Matt Clay
470371d009 Remove unused cloud config files.
These files have no associated cloud config plugin for ansible-test.
2019-05-17 12:21:52 -07:00
Matt Martz
576593e175
Whitelist listen as a valid keyword on TaskInclude (#56586)
* Whitelist listen as a valid keyword on TaskInclude. Fixes #56580

* Move 'listen' to HandlerTaskInclude

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

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

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

* Add changelog fragment

* Add integration tests for returned data for meraki_network

* Add integration tests for returned data

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

* Add integration tests for returned data on meraki_network

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

* Add support for WAF Regional

* Add support for regional waf web acl

* Remove set_trace, pep formatting

* Add paginator for regional_waf

* Change name of param for waf_regional

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

* Change parameter name to waf_regional

* Add support for removal waf regional condition

* Change parameter from cloudfront to waf_regional

* Added state: absent waf rule

* Remove set_trace

* Add integration tests for waf regional

* WIP: adding region parameter to tests

* Add support for waf facts module

* Add region to waf regional integration tests

* Update security policy for waf regional testing

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

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

* Add whitespace for lint

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

* Add integration test

* Add assertion

* Enable VLANs on network

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

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

Fixes: #56413

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

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

Fixes: #39627

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

* Check version

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

* Refactor github_issue

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

* duplicate / and dded changelog fragment

* Revert "duplicate / and dded changelog fragment"

This reverts commit b89d5cbe6d.

* duplicate /
2019-05-14 20:50:56 -04:00
Martin Krizek
826b99d4bd dnf: fix wildcard matching for state: absent (#56013)
* dnf: fix wildcard matching for state: absent

Fixes #55938

* Add changelog...

* Fix sanity check failure...
2019-05-14 17:34:10 -04:00
James E. King III
75788ecff4 azure_rm_virtualmachine (and _facts): add boot_diagnostics control and facts (#49661) 2019-05-14 12:06:06 -07:00
Matt Clay
4a2fa46429 Remove old references to cloud-config-aws.yml.
References to the new `cloud-config-aws.ini` file are provided by `"$@"` in tests.
2019-05-14 10:58:55 -07:00
Abhijeet Kasurde
7a32bd8080
VMware: Improve vmware_portgroup (#56382)
* Rewrite vmware_portgroup module
* support check mode
* VLAN ID isn't required anymore
* VLAN ID 0 (no tagging) is the default
* Options match values in vSphere Client and vmware_vswitch module
* Policy override is configured properly
* VMware: vmware_portgroup updates
2019-05-14 14:34:43 +05:30
Gonéri Le Bouder
cf78759f5b vmware_vm_facts: fix the support with regular ESXi
Ensure the module still work with the ESXi where CustomFieldsManager
does not exist.

From: https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.CustomFieldsManager.html

    The CustomFieldsManager object is used to add and remove custom fields to
    managed entities.
    The custom fields values set on managed entities are available through the
    customValue property and through the summary objects for VirtualMachine
    and HostSystem. They are not available directly through this managed object.
    This functionality is only available through VirtualCenter.

Fixes: #56071
2019-05-13 17:25:16 -04:00
Gonéri Le Bouder
21d4e239b4 vmware_vm_facts: fix the test with vcsim
The VM is call `ha-host_VM0`, not `DC0_H0_VM0`. This commit adjusts
the test to make it more resilient if the VM name is different.
2019-05-13 17:04:17 -04:00
Gonéri Le Bouder
4b99a2ac50 vmware: use hostname in esxi_hostname
The use of the `hostvars[esxi1].ansible_host` was attempt to use
different hostname and IP address. But it's actually the source of
more problems.

VMware expects to be able to resolvable the host name. This means, that
if someone wants to run the test-suite, s/he needs to use a DNS or
update the `/etc/hosts` files on the different hosts.
2019-05-13 17:04:17 -04:00
Chris Van Heuveln
d0f2da4f76 nxos: remove deprecated test target files (#55949)
* nxos_switchport: remove deprecated test target files

* Remove tests for nxos_ip_interface, nxos_portchannel; update nxos_interface

- `nxos_ip_interface` and `nxos_portchannnel` tests have been removed

- `nxos_interface` now uses current module `nxos_l3_interface` instead of `nxos_ip_interface`
2019-05-13 10:43:01 +05:30
Abhijeet Kasurde
9f86257a65
VMware: support folder param in vmware_vm_facts (#56298)
folder can be used as a filter while gathering facts about VMs.

Fixes: #56125

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-11 11:56:57 +05:30
Chris Van Heuveln
1554befd95 nxos_vpc:Fix multiple idempotency issues, add missing commands (#55735)
* nxos_vpc:Fix idempotency issues with multiple attributes

Several attributes were causing idempotency problems on various platforms:

- `auto_recovery`
 - This command can be disabled on certain platforms and will nvgen as `no auto-recovery`
 - When enabled it has an additional optional-keyword for changing the `reload-delay` timer value
  - This was addressed by adding a new attribute `auto_recovery_reload_delay` to handle setting the timer value
  - This new attribute is mutually exclusive with `auto_recovery`

- `/show run vpc/show run vpc all/`
 - Changed the command that gets state to `all` so that it could differentiate between `auto-recovery` and `auto-recovery reload-delay`
 - This change resulted in also changing some attribute handling withing `get_vpc`, since some attributes like `peer_gw` relied on presence of the config to determine state true or false. With `all` the config is always there so these attrs must specifically check for `'no '` in the string.

- `delay_restore`
 - This command has two additional, optional keywords that exist on some platforms and not others.
 - New attrs:
  - `delay_restore_interface_vlan`
  - `delay_restore_orphan_port`

- Modified the `sanity` test to include the new attributes and to fix the platform issues.

- Bugfix Pull Request

`modules/network/nxos/nxos_vpc.py`

- Validated `nxos_vpc` `sanity` test on these platforms, all are now 100% Pass: N35, N3K, N3K-F, N6K, N7K, N9K, N9K-F

- TBD: Future work is needed to add support for `peer_gw_exclude_gw` timers. This could be addressed in the same way as the `auto_recovery_reload_delay` changes included here.

* lint fix

* Add 'version_added' tags for new options
2019-05-10 13:17:02 +05:30
Chris Van Heuveln
8c56c116e5 nxos_snmp_user: platform fixes for get_snmp_user (#55832)
* nxos_snmp_user: platform fixes for get_snmp_user

snmp user output behavior varies quite a bit for the different nxos platforms and required several workarounds:

- N5K/N6k
 - These platforms do not support structured output for `show snmp user`.
 - The current code lands in an `except` clause when the output is not structured; so I added a new `get_non_structured_snmp_user` method to scrape the state from the regular cli output if it's present.

- N9K-F
 - The `group` data in the JSON output is different for this platform; it has a different key (just `group` instead of `TABLE_groups` or `group_names`) and it is not indexed
 - For a single group the value is a string, for multiple groups it's a list

- sanity
 - N5K/N6K/N9K-F platforms will reject `no snmp user <name> <role>` when it's the last role defined for the user.
 - workaround is to use `nxos_user` to remove the user

- Changes validated on:
 - `N3K, N3K-F, N35, N6K, N7K, N9K, N9K-F`
 - `6.0(2)A8`
 - `7.0(3)I2, 7.0(3)I4, 7.0(3)I5, 7.0(3)I6, 7.0(3)I7`
 - `7.3(2)D1`
 - `7.3(3)N1, 7.3(4)N1`
 - `8.3(2)`
 - `9.2(2), 9.2(3)`

* fix lint warning
2019-05-10 13:10:49 +05:30
Mike Wiebe
d55c0cf8dc nxos_vtp_*: Fixes n6k issues (#55737)
* Add n6k support for nxos_vtp_domain

* Add n6k support for nxos_vtp_version

* Add n6k support for nxos_vtp_password

* Fix shippable error
2019-05-10 10:54:51 +05:30
Yunge Zhu
f1ca5552aa fix webapp slot test (#56156) 2019-05-09 15:02:21 -07:00
Abhijeet Kasurde
499355fc13 VMware: Cleanup vCloud references (#56268)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-09 12:55:02 -07:00
Matt Clay
87d42ca11c Disable failing hcloud integration tests. 2019-05-09 09:50:49 -07:00
Pavan Bidkar
34a8594c91 VMware: Modifying Rest Client to use vSphere-Api-Client instead of individual service(#55804)
* Same api client can be used for other service as well 
* Incorporated Review comments. Modified Category and Guest Fact modules which are also dependent on vmware_rest_client module util
* Adding Integration Tests for vmware_rest_client changes
* Changes to incroporate changes in vcsim testware
* Change to get vm name to attach the tag
2019-05-09 18:19:42 +05:30
Nathaniel Case
0bead3672f eos_config: Fix test issues (#56180)
* Alter tests to pass

* Change diff_against to make changed work again

* Add another diff_against

* Expose supports_sessions across all EOS connection types

* Change session warning to failure

* supports_sessions needs to be a method to survive the rpc boundary

* Alter tests to match
2019-05-09 18:02:24 +05:30
Paul Belanger
f9589bd4b1 Don't validate ip address for mgmt interface (#56136)
It is possible the EOS appliance doesn't have an IP address on the
management1 interface, instead just check we have found that interface.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-09 17:32:49 +05:30
Mike Wiebe
bceca72eb7 nxos_interface: Fix admin_state check for n6k (#55673)
* Fix admin_state check for n6k

* Fix rx and tx_rate intent check test
2019-05-08 21:20:22 +05:30
Strahinja Kustudic
a5b6a161b5 sysctl will now return an error if the value is invalid (#55695)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

* Add changelog fragment for sysctl
2019-05-08 11:34:55 -04:00
Chris Van Heuveln
cf585831b4 nxos_banner: test file cleanup (#55992)
- Created `sanity.yaml` to contain all of the tests previously kept in separate files

- Removed `cli` and `nxapi` test directories

- Tested on current supported platforms and versions: `N3K,N6K,N7K,N9K,N3K-F,N9K-F`
2019-05-08 21:01:11 +05:30
Brian Coca
deae5b1bce
remove deprecated get_md5 from stat (#55659)
* remove deprecated get_md5 from stat

  fixes #55309

* removed get_md5 from tests involving stat

* keep get_md5 but hide it

* rst it

* ammended comment

* ws

* added ignore for hidden md5
2019-05-08 10:45:45 -04:00
Will Thames
cd95843ea5 Make ansible adhoc work with include_role (#56163)
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc
2019-05-08 09:53:24 -04:00
Trishna Guha
57e0567310
fix nxos_vlan mode idempotence bug (#55144)
* fix nxos_vlan mode idempotence bug

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

* Fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-05-08 11:19:15 +05:30
Felix Fontein
7a957ba64a openssl_certificate: fix passphrase handling for cryptography backend (#56155)
* Make sure passphrase is bytes string.

* Fix typo.

* Add more passphrase tests.

* Fix test names.

* Add changelog.
2019-05-07 23:58:15 -04:00
Abhijeet Kasurde
2007a79952
VMware: Add managed object id in VM facts (#53523)
Fixes: #53372

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-07 17:05:38 +05:30
Ganesh Nalawade
ae373d5a10
Fix cli_config junos integration test failures (#56159)
*  Priviledge escalation is not required for junos
   cli_config backup opeation.
2019-05-07 06:56:17 -04:00
Andrey Klychkov
f79b6b06f1 postgresql_table: added cascade option (#56068) 2019-05-07 16:08:03 +05:30
Chris Van Heuveln
0e0c2a7db7 nxos_snmp_traps: fix 'group: all' for N35 platforms (#55995)
* nxos_snmp_traps: fix 'group: all' for N35 platforms

- `group: all` attempts to enable traps for all features defined in the module's `feature_list`

- `N35` platforms do not support `snmp-server enable traps bfd`; so removing `bfd` from the `feature_list` for that platform

- Minor cleanup in `sanity.yaml` test file

* whitespace lint fix
2019-05-07 13:57:55 +05:30
Nathaniel Case
d39be3d3e0 eos_bgp needs become: yes (#56131)
We don't specify that in hostvars, so add it to the tests
2019-05-07 12:13:38 +05:30
Yuwei Zhou
a62f0a2fda Fix dtl test typo (#56094) 2019-05-07 09:43:22 +08:00
Ganesh Nalawade
ec56ea4514
Fix junos_config backup testcase (#56148)
* For junos_config taking backup of running configuration
  does not required priviledge escalation.
2019-05-06 18:24:13 -04:00
wjohnston888
647ed207af Fixes Netconf_config single parameter bug (#56138)
* Fixes Netconf_config single parameter bug
Fixes 56022

fixed get_config to not require multiple parameters to just run a backup

* Add Integration test for netconf_config
Associated with #56022

tests backup through netconf only using one parameter.

* Added debug to the begin and end of file

* Fix formatting of save config.  #56022

* removed blank line at end: #56022
2019-05-06 17:30:49 -04:00
René Moser
f42a32ad36
cs_network_acl_rule: implement cidr/cidrs as list (#56083) 2019-05-06 22:36:26 +02:00
Michael Tipton
dc711c3018 VMware: vCenter Cluster EVC Mode : new module (#56089)
* add vmware_evc_mode module

* alter result message for absent/absent

* Apply suggestions from code review

Co-Authored-By: CastawayEGR <36353334+CastawayEGR@users.noreply.github.com>

* add idempotency test

* change result dict to evc_mode_msg

* refactor to use pyvmomi class

* fix update to only process task on update

* minimize update code

* add single quotes around vars to match other code

* pass datacenter to cluster find

* add check_mode to disable test
2019-05-06 13:12:19 -07:00
Nilashish Chakraborty
fef1a10efc
Skip iosxr_bgp tests if device is not running XR 6.1.3 (#56123)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-05-06 23:03:20 +05:30
Paul Belanger
33d6f6f2dd Use stdout_callback yaml for network-integration tests (#56102)
This gives us a little more structure to our console logs, which make it
easier for machines / humans to parse. It will be helpful once the
ansible network team starts importing this data into elastic-recheck.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-06 21:01:40 +05:30
Felix Fontein
f692261ea0 oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.
2019-05-05 06:13:55 -04:00
Paul Belanger
59d20e004e Fix vyos_command integration test (#56091)
This has been broken for some time, but only noticed recently.  Because
vyos_command isn't supported on ansible_connection=local, update our
testing to account for that.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-05 09:04:47 +05:30
Felix Fontein
95d1564f70 docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.
2019-05-03 11:30:39 -04:00
Gonéri Le Bouder
541d73d82a vmware: refactoring of the vcenter_* test roles
Refactoring of `vcenter_folder` and `vcenter_license` to make use of the
new `prepare_vmware_tests` role.

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-03 11:03:19 -04:00
Gonéri Le Bouder
affaedfca8 vmware: refactoring of vmware test roles -- part7 (#55732)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_resource_pool`
- `vmware_resource_pool_facts`
- `vmware_target_canonical_facts`
- `vmware_vcenter_settings`
- `vmware_vcenter_statistics`
- `vmware_vm_facts`
- `vmware_vm_host_drs_rule`
- `vmware_vm_vm_drs_rule`
- `vmware_vmkernel`
- `vmware_vmkernel_facts`
- `vmware_vspan_session`
- `vmware_vswitch`
- `vmware_vswitch_facts`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-02 23:19:01 -04:00
flowerysong
2ef8b297ff Fix loading namespaced doc_fragments from collections (#55249)
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry
2019-05-02 21:15:57 -04:00
Gonéri Le Bouder
2307797a76 vmware: refactoring of vmware test roles -- part3
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_drs_group`
- `vmware_drs_group_facts`
- `vmware_drs_rule_facts`
- `vmware_drs_portgroup`
- `vmware_drs_portgroup_facts`
- `vmware_dvs_portgroup_facts`
- `vmware_dvswitch`
- `vmware_dvswitch_pvlans`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-02 09:31:03 -04:00
Gonéri Le Bouder
636f8cbdab
Merge pull request #55730 from goneri/vmware_refact_part5
vmware: refactoring of vmware test roles -- part5
2019-05-02 09:28:17 -04:00
Gonéri Le Bouder
39d1794ed9 vmware: refactoring of vmware test roles -- part6
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_inventory`
- `vmware_local_role_facts`
- `vmware_local_role_manager`
- `vmware_local_user_facts`
- `vmware_local_user_manager`
- `vmware_maintenancemode`
- `vmware_portgroup_facts`
- `vmware_resource_pool`
- `vmware_resource_pool_facts`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-02 09:28:01 -04:00
Chris Van Heuveln
869fdcd7d4 nxos_acl: some platforms/versions raise when no ACLs are present (#55609)
* `nxos_acl` may fail with `IndexError: list index out of range` while attempting to delete a non-existent ACL.

The failure occurs when the `acl` var is an empty list.

* nxos_acl: catch 501 'Structured output unsupported' when no ACLs present

With some older image versions, `show ip access-list | json` will raise a 501 error indicating `'Structured output unsupported'` when there are no access-lists configured. This change turns off the `check_rc` and then looks for the failure condition.

* Fix kwarg

* Fix lint issues
2019-05-02 18:03:27 +05:30
Hideki Saito
c455635500 Fix firewalld source option handling to be exclusive (#55715)
- Fix issue #55683
- Add integration test for source option of firewalld module

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-05-01 17:47:47 -04:00
Kevin Breit
a89a2cf33f meraki/meraki_network - Enable/disable VLANs on network (#48820)
* Redo branch to fix merge commit

* Add changelog fragment

* Make VLAN settings idempotent

* Fix conflict

* Change `version_added` to 2.9 instead of 2.8.
2019-05-01 12:24:39 -04:00
Gonéri Le Bouder
e4cca4e40a vmware: refactoring of vmware test roles -- part4
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_guest`
- `vmware_guest_boot_facts`
- `vmware_guest_custom_attribute_defs`
- `vmware_guest_customization_facts`
- `vmware_guest_disk_facts`
- `vmware_guest_facts`
- `vmware_guest_find`
- `vmware_guest_move`
- `vmware_guest_powerstate`
- `vmware_guest_snapshot`
- `vmware_guest_snapshot_facts`
- `vmware_guest_tools_wait`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-01 11:22:14 -04:00
Jordan Borean
cc3b8b9f72
win_acl - fix network path qualifier parsing (#55970) 2019-05-01 17:21:26 +10:00
Jordan Borean
5228133d74
Ansible.Basic - fix when deserialising a json string of an array (#55691)
* Ansible.Basic - fix when deserialising a json string of an array

* Added changelog fragment
2019-05-01 11:08:23 +10:00
jhawkesworth
0e8a77520c Refactor of win_xml (2nd attempt) to add support for processing multiple nodes and counting nodes matched by xpath (#53362)
* add multi-node manipulation, delete on xpath match only and count capability to win_xml

* fix pep8 and yamllint errors identified by ci tests

* fixed bugs when handling multiple elements, multiple attribute nodes and handling for attribute nodes when using xpaths that only select attributes like //@lang.  Added more tests and tweaked documentation.

* fixed line-too-long error

* fixed trailing space errors

* trailing whitespace expunged

* bump version_added to 2.9 for new changes

* fix PSAvoidUsingPositionalParameters sanity check failure

* refix sanity check as it broke the msg return value
2019-04-30 13:19:56 -07:00
Matt Clay
f6fbfeace8 Clean up use of connection: local in tests. 2019-04-30 11:35:08 -07:00
Matt Clay
e105f5b436 Install rabbitmq from s3 in tests. 2019-04-30 10:00:04 -07:00
Sloane Hertel
11279a909d fix combine filter using undefined vars (#55840)
* Check variables are defined before using combine filter

* Add tests for the combine filter

* Remove dependencies that should already be installed

* relocate the function to recursively check for undefined vars

add another test

* changelog
2019-04-30 11:10:19 -04:00
Gonéri Le Bouder
0e83384dfd vmware: refactoring of vmware test roles -- part2 (#55724)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_datacenter`
- `vmware_datastore_cluster`
- `vmware_datastore_facts`
- `vmware_datastore_maintenancemode`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-04-30 06:22:49 -04:00
Gonéri Le Bouder
c8c0f8c51a vmware: refactoring of vmware test roles -- part1 (#55723)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_about_facts`
- `vmware_cluster`
- `vmware_cluster_facts`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-04-30 05:38:43 -04:00
Matt Clay
cb0ca89994 Fix integration test role syntax.
This does not fix the tests themselves, only the syntax (converting from playbooks to roles).
The aix_devices test fails due to use of unsupported state values.
2019-04-29 13:51:36 -07:00
The Magician
164ceb599b Bug fixes for GCP modules (#55358) 2019-04-29 15:51:09 -04:00
The Magician
50b72ec2b5 Bug fixes for GCP modules (#55359) 2019-04-29 15:50:53 -04:00
The Magician
6193658608 Bug fixes for GCP modules (#55360) 2019-04-29 15:50:41 -04:00
The Magician
ef3607f1e7 Bug fixes for GCP modules (#55361) 2019-04-29 15:50:29 -04:00
The Magician
4a371ec84e Bug fixes for GCP modules (#55362) 2019-04-29 15:50:15 -04:00
Matt Clay
149336319a
Clean up local_action and delegate_to in tests. (#55835)
* Remove unnecessary delegate_to in tests.

* Remove incorrect delegate_to in tests.

* Remove unnecessary use of local_action in tests.

* Remove incorrect use of local_action in tests.

* Remove unnecessary use of local_action in tests.

* Remove incorrect use of local_action in tests.

* Remove unnecessary use of local_action in tests.

* Use delegate_to instead of local_action in tests.

* Use setup_remote_tmp_dir instead of TMPDIR.
2019-04-26 17:33:59 -07:00
Matt Clay
03b2986227 Fix order integration test.
Previously the test always passed due to invoking cleanup on failure.
2019-04-25 22:35:36 -07:00
Gonéri Le Bouder
6d645c127f vmware: import prepare_vmware_tests
The vmware test roles do a lot of similar operation to prepare
the environment. This role will be used to reduce the amount of
duplicated code.

The role can prepare an environment on a baremetal environment, this
in addition to vcsim.

Original PR: https://github.com/ansible/ansible/pull/54882
2019-04-25 09:58:59 -04:00
Chris Van Heuveln
a568e018be nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images (#55615)
* nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images

This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image rejects 'no default-metric' configs, so we're skipping the idempotence
tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7, 7.0(3)I2

* simplify check for I7
2019-04-24 17:41:48 +05:30
Chris Van Heuveln
4d46f44ff2 nxos_snmp_traps:sanity: skip idempotency tests for I7 image bug (#55618)
This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image fails to enable some snmp trap link configs causing an idempotency failure in the sanity, so we're skipping the idempotence tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7.
2019-04-24 17:41:16 +05:30
Chris Van Heuveln
7ac28b25ff nxos_nxapi:configure:6k: Add platform excludes to test yamls (#55663)
`N6K` should be present wherever `N5K` is included/excluded.
2019-04-24 17:39:54 +05:30
Chris Van Heuveln
4798368b13 nxos_bgp_neighbor_af:sanity:6k: skip soft-reconfig 'always' test (#55661)
N5K / N6K do not support the `always` keyword on the `soft-reconfig in` configuration.
2019-04-24 17:39:35 +05:30
Chris Van Heuveln
91d187f780 nxos_snmp_host:sanity:6k: Add platform excludes for sanity tests (#55664)
N6K should be present wherever N5K is included/excluded.
2019-04-24 15:08:03 +05:30
Yuwei Zhou
0d3d002505 add resource group test (#55688) 2019-04-24 14:15:13 +08:00
Lars Kellogg-Stedman
35fdae7485 spelling: temaplte -> template (#55665)
Correct a common mis-spelling of 'template' including in the return
value of the lib/ansible/modules/cloud/cloudstack/cs_template.py
module.
2019-04-24 07:06:09 +02:00
Yuwei Zhou
e77260a4fb Enable azure manged disk test (#55681) 2019-04-24 12:43:52 +08:00
René Moser
e0ea5bb512
tests: vultr: fix tests due to vultr API changes (#55621) 2019-04-23 21:23:02 +02:00
René Moser
1705ef5f26
vultr_server: fix idempotency for private network and IPv6 options (#55619)
* vultr_server: fix idempotency for private network and IPv6 options

* add changelog
2019-04-23 21:22:17 +02:00
Matt Martz
db6cc60352
Migrate command line parsing to argparse (#50610)
* Start of migration to argparse

* various fixes and improvements

* Linting fixes

* Test fixes

* Fix vault_password_files

* Add PrependAction for argparse

* A bunch of additional tweak/fixes

* Fix ansible-config tests

* Fix man page generation

* linting fix

* More adhoc pattern fixes

* Add changelog fragment

* Add support for argcomplete

* Enable argcomplete global completion

* Rename PrependAction to PrependListAction to better describe what it does

* Add documentation for installing and configuring argcomplete

* Address rebase issues

* Fix display encoding for vault

* Fix line length

* Address rebase issues

* Handle rebase issues

* Use mutually exclusive group instead of handling manually

* Fix rebase issues

* Address rebase issue

* Update version added for argcomplete support

* -e must be given a value

* ci_complete
2019-04-23 13:54:39 -05:00
Xaroth
a9f24e097f Add ansible_parent_role_names magic variable (#46687)
-Add: Test cases for ansible_parent_role_names and ansible_parent_role_paths
-Add: ansible_parent_role_names/paths variables for when a role is being included by another role.
2019-04-23 11:55:05 -04:00
Brian Coca
780ee45819
ensure inventory plugin loading rel to play (#51177)
Ensure inventory plugin loading rel to play

  fixes #51033

*  clarify paths
* now adding dirs funciton in loader
* better warnings
* each cli should handle adding dirs depending on context
2019-04-22 19:32:50 -04:00
Jordan Borean
66493e47cf
ansible-test: Use psrp for 2008 host ci_complete (#55273)
* ansible-test: Use psrp for 2008 host ci_complete

* reset Shippable info back to default
2019-04-23 08:13:03 +10:00
Hannes Ljungberg
14c60e6ec8 docker_swarm_service: Use str type for configs/secrets gid/uid (#55591)
* Change type of secrets gid/uid to str
* Add changelog fragment

Co-Authored-By: hannseman <hannes@5monkeys.se>
2019-04-22 11:29:46 -04:00
Fred-sun
97b336767c update main.yml (#55550) 2019-04-22 09:52:17 +08:00
David Passante
9421a7fddf cs_loadbalancer_rule: add cleanup on unit tests (#55387) 2019-04-18 23:58:41 +02:00
Sloane Hertel
afb5e02c19 preserve same order as inventory manager when using host lookup (#55331)
* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code
2019-04-18 15:54:03 -04:00
Rui Moreira
10b02e17b9 Dms endpoint module (#54660)
* - initial commit for the modules and tests

* initial implementation based on ec2_asg

* docstring implemtation and further methods initial implementation

* refactoring and pylint changes

* further implementation and integration tests

* added examples and parameter documentation

* removed files that were essentially templates

* added waiter for delete and updated the tests

* removed unit test

* fixed pep8 failure

* fixed pep8 failure

* fixed pep8 password field issue

* fixed pep8 password field issue

* fixed syntax issues

* fixed pep8 defaults

* password property documentation was breaking yaml

* fixed pep8 defaults

* fixed lack of defaults for wait parameter

* added default to boolean parameter

* pep8 fix

* fixed author entry

* adding type to wait parameter

* adding type to wait parameter

* fixed linting issues

* updated description and removed default from docs

* added metaclass
changed default for boolean

* changed declared defaults

* - fixe the delete function
- solved the yaml syntax issue

* added missing defaults for timeout, retry and removed the one for endpointtype as it should be None, becasue parameter is Required anyway

* fixed RETURN documentation issue

* trying to fix the import placement error

* trying to fix the doc error for missing params

* pep8 issues

* added endpoint aliases

* - added documentation

* pep8

* changed to unsupported tag

* changed no_log fact to yes in the integration tests

* added suggested changes to the integration tests

* - making severname use resource_prefix as well as a more generic domain
- removing test fact
2019-04-18 20:27:40 +10:00
Jordan Borean
62badd76a5
win_service - simply env test (#55498) 2019-04-18 15:06:45 +10:00
Matt Clay
01a3048b98 Switch gitlab_hook test to non-deprecated name. 2019-04-17 17:56:01 -07:00
Felix Fontein
12d26eceb1 docker modules: make sure everything works with older docker-py versions (#55258)
* General test improvements.

* Adjust tests to older docker-py versions.

* docker_swarm_server_info: work around problems with older docker-py versions

* Bump minimal docker-py version for options network_filters and disk_usage.

* More general test improvements.

* Correct usage of docker_image.

* Put files into output directory.

* Speed up test.

* Remove old check.
2019-04-17 13:50:57 -04:00
Abhijeet Kasurde
dcbfa60413
Change to fix issue found while cloning template with opaque network (#55375)
Fixing Format issues in yml files. Check have failed

Signed-off-by: pgbidkar <pbidkar@vmware.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-17 11:18:17 +05:30
Matt Martz
bd0792397b Fix uri tasks (#55403)
* Fix uri tasks

* Fix apt task to install firewalld

* Fix invalid option in package_facts - ci_complete
2019-04-17 11:28:01 +10:00
Jordan Borean
fdf9df89f5
psrp - Fix raw and script tests for connection plugin (#55357)
* psrp - Fix raw and script tests for connection plugin

* Fix error propagation with raw in psrp

* uncomment test
2019-04-17 09:01:28 +10:00
Jordan Borean
49655a452d
psrp - fix test_command rc for win_reboot (#55354) 2019-04-17 08:38:42 +10:00
Jordan Borean
33c2a9cea7
win_whoami - Fix tests to work over psrp (#55352) 2019-04-17 08:18:20 +10:00
Jordan Borean
15c331cb48
win_feature - get tests working on psrp (#55353) 2019-04-17 08:18:03 +10:00
Sam Doran
b4e83642c8
Properly reset timezone in user test when it was originally n/a (#55389) 2019-04-16 14:12:13 -04:00
Martin Krizek
4ec8599c38 apt: remove deprecated installed/removed aliases (#55338)
* apt: remove deprecated installed/removed aliases

Fixes #55311
2019-04-16 11:42:53 -04:00
Matt Clay
a8955b0c7c Revert "Disable hcloud tests until issues are resolved."
This reverts commit 216cd86cb8.
2019-04-15 11:58:00 -07:00
Andrey Klychkov
f8c47262c4 postgresql SSL related tests (#55288)
* postgresql SSL tests

* postgresql SSL tests, added link to officiall doc
2019-04-15 14:19:22 +01:00
Felix Fontein
cb5c57bcd5 openssl_csr: fix idempotency problems (#55142)
* Add test for generating a CSR with everything, and testing idempotency.

* Proper SAN normalization before comparison.

* Fix check in cryptography backend.

* Convert SANs to text. Update comments.

* Add changelog.
2019-04-15 09:15:08 +02:00
MyronFanQiu
91e808eed2 azure_rm_subnet: fix CI error for deleting the azure_tags (#55276) 2019-04-15 15:14:18 +08:00
Matt Clay
7599229310 Rebalance Azure tests. 2019-04-12 16:03:08 -07:00
Felix Fontein
d64b17731d docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings.

* Add changelog.

* Improve message.

* Improve formatting and formulation of other messages.

* Add test for warning.

* Trying double escaping.
2019-04-12 18:36:11 -04:00