Commit graph

5046 commits

Author SHA1 Message Date
Toshio Kuratomi
f91d961cb4 Add tests for template with non-ascii filenames
This is a test in response to #27262 but I could not provoke the error
so it only shows that the current code is working with non-ascii
filenames in this case.  It doesn't show whether there's some other bug
somewhere.
2018-04-26 13:27:18 -07:00
Martin Krizek
5dd8977cfa Fix nested noop block padding in dynamic includes (#38814)
* Fix nested noop block padding in dynamic includes

* Address issues from the review

* Fix typo
2018-04-26 15:14:31 -05:00
Matt Martz
4b01b92cfe
Update TaskInclude _raw_params with the expanded/templated path to file (#39365)
* Update TaskInclude _raw_params with the expanded/templated path to file

* Add tests to validate host vars include paths
2018-04-26 14:25:02 -05:00
Matt Martz
2f5161628a
Don't skip conditional exception on includes (#39377)
* task_executor.py: Raise 'conditional exception' in case of 'include_*'

Fixes #33632

Signed-off-by: Patrick Ringl <patrick_@freenet.de>

* Re-organize tests, add static include test with undefined var

* Remove unnecessary conditional
2018-04-26 13:39:44 -05:00
saichint
bdb75cd82c Integration Tests only: nxos_snmp_contact (#39318)
* add integration test cases for snmp_contact

* removing unnecessary files
2018-04-26 22:32:14 +05:30
Ryan Petrello
462449cc8c run Tower CI using the latest ansible-tower-cli package 2018-04-26 08:01:03 -07:00
Toshio Kuratomi
83c1cba511
Fixes for mode=preserve (#39343)
* Fixes for mode=preserve

* Document mode=preserve for template and copy
* Make mode=preserve work with remote_src for copy
* Make mode=preserve work for template
* Integration tests for copy & template mode=preserve

Fixes #39279

* Changed mode option in win_copy to hidden option as it doesn't reflect copy mode
2018-04-26 07:14:37 -07:00
saichint
2f99a17856 fix nxos_ntp issues (#39178)
* fix nxos_ntp issues

* review comments

* fix idempotent fail case
2018-04-26 12:09:46 +05:30
Jasper Aorangi
08f071eb7a Fix #26755 by ensuring that the first nic in the nic list is primary (#38994)
* Fix #26755 by ensuring that the first nic in the nic list has primary set to True, and all other nics have primary set to False.

* Fix sanity issues and add test for two nics

* Fix typo in test

* fix nic list

* Ensure the niclist variable is used rather than a niclist string

* Add tests just for dual nic, reverting changes to single nic VM creation tests

* Correct idempotency test
2018-04-25 23:16:25 -07:00
Matt Clay
aac3020770 Add changelogs dir to change classification. 2018-04-25 16:27:29 -07:00
Sam Doran
fda67bae50
Ensure timezone tests reset system timezone to original value (#39326) 2018-04-25 16:30:06 -04:00
Alex Stephen
dd735b2122 Bug fixes for GCP Dns Managed Zones (#38631) 2018-04-25 16:20:55 -04:00
Jordan Borean
f8853d83e3
windows: removed deprecated features in 2.6 (#38930)
* windows: removed deprecated features in 2.6

* Comma surgery.
2018-04-26 06:13:37 +10:00
Alex Stephen
8d77c6cc16 Adding support for GCP Compute Https Health Checks (#37437) 2018-04-25 16:11:32 -04:00
Will Thames
12f2b9506d [aws]Add VPC configuration to ECS modules (#34381)
Enable awsvpc network mode for ECS services and tasks and
their underlying task definitions

Improve test suite to thoroughly test the changes

Use runme.sh technique to run old and new versions of botocore to
ensure that the modules work with older botocore and older network modes
and fail gracefully if awsvpc network mode is used with older botocore
2018-04-25 15:41:04 -04:00
Alex Stephen
58bf4ae611 New module: GCP Storage Buckets (#37288) 2018-04-25 15:26:13 -04:00
Alex Stephen
39bf7d3655 New module: GCP Compute HTTP Health Checks (#36329) 2018-04-25 15:25:23 -04:00
Matt Clay
ee02d0c120 Remove obsolete test containers.
- opensuse42.1 - EOL
- opensuse42.2 - EOL
- ubuntu1204 - EOL
- cloudstack-simulator - Migrated to https://github.com/ansible/cloudstack-test-container
2018-04-25 11:26:42 -07:00
Matt Clay
ac1fbbeabc Update the cloudstack test container reference. 2018-04-25 10:41:24 -07:00
Tim Rupp
fb264281de
Adds various features and fixes (#39271)
* a refactor of pool member and node modules to be inline with current f5 conventions
* Added priority_group_activation to pools
* various other small convention fixes and bug fixes
2018-04-25 07:16:11 -07:00
saichint
1afec5a48e fix nxos_snmp_community issues (#39258) 2018-04-25 13:16:41 +05:30
Trishna Guha
6db3f522c8
sub-interface support for nxos module (#37392)
* nxos sub-interface support

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

* update l3_interface test

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

* Add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-25 12:45:56 +05:30
Tim Rupp
9940b5db9c
Adds DNS profile module for BIGIP (#39270)
This module can be used for managing DNS profiles on a BIGIP
2018-04-24 21:05:30 -07:00
Tim Rupp
20d5b04ac4
Adds udp profile module for bigip (#39269)
This module can be used to manage UDP profiles on a bigip
2018-04-24 20:35:42 -07:00
Tim Rupp
434ad97c39
Adds tcp profile module for BIGIP (#39268)
This patch adds a module to support manipulation of TCP profiles
on a BIGIP
2018-04-24 20:05:31 -07:00
Tim Rupp
256b5535ec
Various fixes to F5 modules (#39255)
* Adds gnat provisioning to bigip_provision
* Adds special handling for AFM in bigip_provision
* Add device rebooting for provisioning as necessary
* Refactored route domain module to be inline with current f5 conventions
* Minor refactors across modules
2018-04-24 19:49:52 -07:00
Yuwei Zhou
39ca41eb1b Fixes some NIC bugs (#39213)
* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix
2018-04-25 09:54:19 +08:00
Tim Rupp
fc753dd261
Adds the bigip_smtp module (#39243)
This module can be used to manage smtp settings on a bigip.
2018-04-24 12:20:49 -07:00
Matt Clay
996f9c2467
Fix mysql-server install/upgrade on Ubuntu 16.04. (#39241)
* Fix mysql-server install/upgrade on Ubuntu 16.04.
* Prevent service restart in docker_secret test.
2018-04-24 12:02:26 -07:00
Tim Rupp
e82a8d177f
Adds module for bigip service policies (#39240)
This patch includes a module for managing bigip service policies.
2018-04-24 11:06:34 -07:00
John R Barker
7c4b91844d
More validate module fixes (#39097)
* Fix type bool DOCUMENTATION issues
2018-04-24 18:05:50 +01:00
Tim Rupp
ed05e46f5c
Adds bigip_snmp_community module (#39212)
This module can be used to manage snmp communities on a bigip
2018-04-23 22:32:17 -07:00
Tim Rupp
3227143dc8
Fixes coding conventions, adds a small feature (#39211)
Fixes some coding conventions and adds allowed_addresses to bigip_snmp_trap.
2018-04-23 22:06:33 -07:00
Tim Rupp
39e4754fc9
Fixes for convention incompatibilities (#39209)
Minor fixes for the f5 modules to use current conventions
2018-04-23 21:42:06 -07:00
Tim Rupp
37e114756d
Adds bigip_trunk (#39208)
This patch adds a new module for managing trunks on a bigip
2018-04-23 20:37:23 -07:00
Tim Rupp
3b11def7d0
Add timer policy module (#39206) 2018-04-23 20:30:28 -07:00
Jordan Borean
629efb6eaa
psexec: new module to run commands on a remote Windows host without WinRM (#36723)
* psexec: new module to run commands on a remote Windows host without WinRM

* fix up sanity issue, create test firewall rule for SMB traffic

* Fixed up yaml linting issues, trying to fix on the fly firewall rule

* Added SMB exception to catch when cleaning up PAExec exe

* Don't load profile for Azure hosts when becoming another user

* Fixed up example to use correct option

* Reworded notes section of module docs

* Simplified module options around process integrity levels and the system account
2018-04-24 12:15:15 +10:00
Tim Rupp
e254121729
Adds minor fixes and features to f5 modules (#39202)
* Add Mac_address parameter to bigip_traffic_group
* Fix docs
* Fix f5 conventions
2018-04-23 18:57:43 -07:00
Pierre-Louis Bonicoli
afef20827b openshift_raw & openshift_scale: fix broken import 2018-04-23 17:57:17 -07:00
Pierre-Louis Bonicoli
5d72f29b1a Remove passing file from import skip list. 2018-04-23 17:55:45 -07:00
Jordan Borean
b6afe6946d
Ansible.ModuleUtils.FileUtil - Add ability to test non file system provider paths (#39200) 2018-04-24 10:06:47 +10:00
Tim Rupp
19d229a8e0
Fixes F5 conventions and adds features (#39189)
This patch fixes a number of convention changes in F5 modules.
Additionally, it adds some features to bigip vlan and other modules
2018-04-23 15:46:09 -07:00
Brian Coca
4aac0f5f18
allow configuring sftp/scp executables (#36648)
* allow configuring sftp/scp executables

fixes #36616


also removed dupe test
2018-04-23 18:36:35 -04:00
Tim Rupp
d38ae9b6c9
Adds the bigip_data_group module (#39180)
This module can be used to manipulate bigip data groups.
2018-04-23 11:52:57 -07:00
Matt Clay
c262dbfd30 Use https for links to ansible.com domains. 2018-04-23 11:33:56 -07:00
Pierre-Louis Bonicoli
2f535a339c azure_rm_storageaccount: fix broken import 2018-04-23 09:04:03 -07:00
saichint
6eecbf10e6 fix nxos_igmp_interface issues (#38752)
* fix nxos_igmp_interface issues

* shippable fix

* fix oif_prefix and oif_source

* shippable fix

* shippable fix

* shippable fix

* add an example for oif_ps

* review comments

* review comments

* more review comments

* fix typo
2018-04-23 20:38:49 +05:30
Will Thames
412373ce8e Improve ec2_ami tests (#38987)
* Improve ec2_ami tests

Ensure that ec2_ami_image_id fact gets set immediately after AMI
creation so that they get torn down even if tests fail

Use YAML anchor to simplify AWS credential passing

Use aws_connection_info to reduce AWS credential boilerplate

Improve exception handling when updating image attributes

Error messages weren't correctly formatted to show image ids.
2018-04-23 07:54:49 -04:00
Alan Rominger
f072e6c15a add newer syntax to detached HEAD check (#38879) 2018-04-23 13:40:54 +02:00
Tim Steinbach
f61172e6c7 vmware: Add portgroup_portkey and portgroup_key (#38958)
* VMware: apply correct value for datacenter in TC

Signed-off-by: Tim Steinbach <tim@nequissimus.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-23 14:04:35 +05:30
David Passante
7437d6fdc4 cs_ip_address: add a "tags" parameter to ensure idempotency (#39016)
* cs_ip_address: add a "tags" parameter to manage idempotency

* cs_ip_address: add integration tests
2018-04-22 20:13:01 +02:00
Matt Clay
9488b0c8b1 Remove unused test files. 2018-04-22 07:11:34 -07:00
Toshio Kuratomi
ce796bc34d Clarify the behaviour of file's src parameter with relative paths
Fixes #21401

Also sdd some more tests to validate file state=link creates a symlink
which points to the file we intended.
2018-04-20 14:12:27 -07:00
Toshio Kuratomi
f332151f59 Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed
2018-04-20 10:04:24 -07:00
Matt Clay
fafceb9895 Mark unstable azure_rm_functionapp test. 2018-04-20 07:06:07 -07:00
Matthew Stone
d030032b47 Extreme Networks SLXOS Config Module (#38607)
* Adding slxos_config module and supporing util functions.

* Adding slxos module_utils load_config test

* Adding slxos_config module tests

* Removing unneeded required false statements from slxos_config module

* Removing version_aded from slxos_config module

* Removing force and save from slxos config module

* Removing save test
2018-04-20 08:52:20 +01:00
Matt Clay
9e8889bb70
Fix more docs errors. (#39051)
* Fix remaining unknown-document docs errors.
* Fix last toc-tree-missing-document docs error.
2018-04-20 00:24:47 -07:00
Matt Clay
7e96421132
Handle warnings in docs-build sanity test. (#39043) 2018-04-19 23:09:48 -07:00
Martin Krizek
62d2df74b0 apt: fix build-dep idempotency (#38999) 2018-04-20 07:57:14 +02:00
Sviatoslav Sydorenko
5ea1ee47dd Refactor Foreman provider to use simplified img 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
1664554b4a Unrandomize docker registry selection
stick with quay for now
2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
d5b340cc43 Improve foreman image src selection 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
87eca24969 Add playbook with foreman tests 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
fb0487945c Add runme script to foreman inventory tests 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
d0018848a5 Enable foreman inventory plugin in tests 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
2608ef535f Add foreman cloud provider 2018-04-20 00:36:23 +02:00
Sviatoslav Sydorenko
e169da0748 Initialize foreman test suite 2018-04-20 00:36:23 +02:00
Abhijeet Kasurde
268c682a05 VMware: new module : vmware_cluster_facts (#37105)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-19 05:41:04 -04:00
Sloane Hertel
e2aa1155ba [ec2_ami] Ensure name or image_id is provided for state=present (#38972)
Add integration tests for backward compatibility and ensuring name or image_id is provided
2018-04-19 09:28:25 +10:00
Matt Martz
cdb79b0e3a
Consider parent also when comparing IncludedFile (#37083)
* Consider parent also when comparing IncludedFile

* Add new tests for IncludedFile and convert to pytest
2018-04-18 17:02:14 -05:00
David Gunter
a833281e22 Add Yarn module (#19026)
* Add yarn module based off of NPM module, adjust syntax for install cmd

* Update author list

* Add Return docbloc

* Remove extra var assignment

* Always return output without emojis, small changes for yarn 0.16.1

* Move import line, add ANSIBLE_METADATA, bump version_added

* Updating module format to meet newest lint requirements. Update options and example docs.

* Bring back RETURN block and main() execution.

* All trailing whitespace removed.

* Remove json try/except.

* Add initial pass at setting up Yarn integration tests.

* Add better handling for latest and removal states. Add tests for upgrading a single package.

* Fix issue where state=latest for installing all packages caused failure.

* Set yarn bin to latest version for tests. Fix sanity tests.

* Switch template task to copy task in yarn integration tests.
2018-04-18 08:19:38 -05:00
Deric Crago
50d151aef2 Updated 'quay.io/ansible/vcenter-test-container' image tag to '1.2.0'
vcsim remains on commit 'dee49fa3694c5aff05e4b340b0686772f65c1fe1'
2018-04-17 17:57:43 -07:00
Matt Clay
e401927d67 Restore seboolean and sefcontext tests on RHEL. 2018-04-17 16:34:47 -07:00
Jordan Borean
77ef4802f0
win_regedit: stabilise tests (#38912) 2018-04-18 08:11:44 +10:00
Matt Clay
26312b6557 Remove migrated httptester files.
The httptester has been migrated to:

https://github.com/ansible/http-test-container
2018-04-17 15:03:51 -07:00
Matt Clay
57f1298074 Restore docker_secret test on RHEL. 2018-04-17 13:56:11 -07:00
Matt Clay
35748e5228 Update httptester container reference. 2018-04-17 12:15:07 -07:00
Ryan Brown
44d06f8858
[cloud] Add support for updating IAM role with ec2_instance module (#38812)
* [cloud] Add support for updating IAM role with ec2_instance module

* Add test for updating IAM role
2018-04-17 15:02:46 -04:00
Thierry BOUVET
4117b2dd29 Fix documentation fragments for docker (#38378) 2018-04-17 08:51:56 -07:00
Nathaniel Case
3b3c72f3e5
Fix use of bytes in cliconf plugins for Python 3 (#37715)
* Remove raw byte-strings from cliconf plugins of supported platforms + edgeos

Remove uses of to_bytes, too

* Update CliConfBase docstring to reflect current position on byte strings
2018-04-17 10:15:21 -04:00
Will Thames
0b4f92d852 Lambda policy arn (#38863)
* Fix the function_name handling logic for lambda_policy

Switch the logic handling function_names that are ARNs
so that ARNs are correctly handled and detected

* Add tests for lambda_policy function_arn

Ensure that function_arn works.

Needs a reasonable ansible_lambda_role.
2018-04-17 09:53:59 -04:00
saichint
a372142434 fix ntp_auth issues (#38824) 2018-04-17 08:25:05 -04:00
Martin Krizek
3922b6cc93
apt: integration tests for #31577 (#38586) 2018-04-17 10:17:29 +02:00
Jordan Borean
44fc3459cf
win_pester: move away from public repo to source test files (#38862) 2018-04-17 15:24:54 +10:00
Mat Wilson
8eb94ccbd5 Add support for dzdo flags Fixes #38766 2018-04-16 23:28:51 -04:00
Matt Clay
27def6c5dc Remove vcenter-simulator container files.
The simulator has moved to its own repository:

https://github.com/ansible/vcenter-test-container
2018-04-16 16:47:32 -07:00
Matt Martz
354aa8d602
Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827)
* Skip self._parent on dynamic, defer to grandparent for attr lookup

* Revert _inheritable

* Add tests for include inheritance from static blocks

Fixes #38037 #36194
2018-04-16 16:46:47 -05:00
Matt Clay
1d5c933ecf Use new vcenter simulator container location. 2018-04-16 14:25:13 -07:00
Matt Martz
694d6b339c
Set memory-swap to memory (#38836) 2018-04-16 15:49:12 -05:00
Matt Clay
d2ce1d3c26 Revert "Work-around for get-pip.py install failure."
This reverts commit fa466be33d.
2018-04-16 10:08:10 -07:00
Victor Bocharsky
a30befa609 Remove duplicated "instead" word (#38800)
* Remove duplicated "instead" word

* Actually fix the message
2018-04-16 09:23:43 -04:00
Matt Clay
fa466be33d Work-around for get-pip.py install failure. 2018-04-14 19:05:28 -07:00
Matt Clay
5bf5f25115 Temporarily disable sefcontext test on RHEL. 2018-04-14 17:35:17 -07:00
Matt Clay
0f13333615 Temporarily disable seboolean test on RHEL. 2018-04-14 16:24:35 -07:00
Matt Clay
74f7b8e81c Temporarily disable docker_secret test on RHEL.
Test does not pass on RHEL 7.4 with pip 10 installed.
2018-04-14 13:10:15 -07:00
Matt Clay
eb72f2d1f3 Mark rabbitmq_user test unstable. 2018-04-14 13:05:21 -07:00
Matt Clay
cacc3c893b Disable fortios_* integration tests.
These tests require pyfg which depends on pip internals that are
no longer available under pip 10.
2018-04-14 13:02:00 -07:00
Abhijeet Kasurde
9b139baacb
VMware: Set default network type as 'dhcp' (#38518)
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.

Fixes: #38466

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-13 23:21:39 +05:30
saichint
1d975bdc93 fix nxos_ntp_options (#38695) 2018-04-13 06:17:32 -04:00
Matt Clay
ab52d84151 Mark win_pester test as unstable. 2018-04-12 22:23:45 -07:00
Matt Clay
26f2da3874 Mark unstable integration tests. 2018-04-12 21:41:35 -07:00
Matt Clay
8a223009ca
Improve handling of integration test aliases. (#38698)
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
2018-04-12 16:15:28 -07:00
Matt Clay
26fa3adeab Add docs-build sanity test. 2018-04-12 15:56:49 -07:00
Matt Clay
3dee0b67e8 Fix test aliases. 2018-04-12 11:08:15 -07:00
Alex Stephen
9de9633cac [GCP] New module GCP DNS Resource Record Set (#35920) 2018-04-12 07:31:43 -04:00
Matt Clay
c9fb054bc8 Fix get_cloud_platforms config usage. 2018-04-11 17:08:54 -07:00
Sam Doran
e5776a129a Add include_import tests for many top level include_tasks (#36531)
* Add include_import tests for many top level include_tasks

Rename a few test playbooks to make more sense

* Use fewer include_tasks due to memory limits in CI
2018-04-11 17:08:33 -04:00
saichint
ed42331105 fix nxos_igmp_snooping issues (#38566)
* fix nxos_igmp_snooping issue

* shippable error fix
2018-04-11 10:14:27 -04:00
Matthew Stone
5b1a8ee1e8 Adding slx_command module and supporting module_utils. (#38235)
* Adding slx_command module and supporting module_utils.

This commit adds the slx_command module and tests as well as the
required slxos module_utils.

* Update copyright in header

* Adding missing module init

* Cleaning up shebangs/licensing.

* Incorporating feedback

Removing reference to `waitfor` alias in `slxos_command` module.
Adding `Extreme Networks` to `short_description` of `slxos_command` module.

* Adding cliconf tests

* Fixing 3.X tests

* Adding docstrings to test methods for slxos cliconf tests

* Adding slxos terminal tests

* Adding slxos module_utils tests

* Adding Extreme Networks team members to BOTMETA.yml
2018-04-11 12:59:34 +01:00
Brian Coca
886c4edfb9
avoid caching invetnory sources in loader (#38242)
* fix inventory plugin source caching

 - avoid caching invetnory sources in loader in base
 - same fix for yaml plugin
 - idem for 'auto' plugin

fixes #37162

* fix mock dataloader func sig
2018-04-10 22:15:52 -04:00
Andrew Gaffney
95ce00ff00 Allow loading dirs from role defaults/vars (#36357)
This commit moves code to look for vars files/dirs to a common place and
uses it for loading role defaults/vars. This allows things such as
'defaults/main' or 'vars/main' being a directory in a role, allowing
splitting of defaults/vars into multiple files. This commit also fixes
the role loading unit tests for py3 when bytestrings are used for paths
instead of utf8 strings.

This fixes #14248 and #11639.
2018-04-10 17:14:38 -04:00
Matt Clay
62957c9fc0 Support network action plugin classification. 2018-04-10 13:43:41 -07:00
John R Barker
38491fe93d
Explicitly exclude W504 (#38539)
pycodestyle 2.4 has changed the default for W504
2018-04-10 20:07:57 +01:00
Matt Martz
0507c907a9
get_url should accept headers as a dict, instead of only a complicated string (#35470)
* get_url should accept headers as a dict, instead of only a complicated string

* update headers description text

* Add headers string and dict tests for get_url

* Add intg test for string header format parsing error

* Adjust deprecation version ahead 1 release, add the version dict format was added in to description
2018-04-10 11:50:39 -05:00
Matt Martz
450cfa8776
Handle duplicate headers in the uri module (#33792)
* Handle duplicate headers, and make it easier for users to use cookies, by providing a pre-built string

* Ensure proper cookie ordering, make key plural

* Add note about cookie sort order

* Add tests for duplicate headers and cookies_string

* Extend tests, normalize headers between py2 and py3

* Add some notes in test code

* Don't use AttributeError, use six.PY3. Use better names.
2018-04-10 09:26:51 -05:00
Matt Martz
f1082af73f
Error if a module is found to shadow a reserved keyword (#34649)
* Error if a module is found to shadow a reserved keyword

* Add test for shadowed module

* Bring in functools.wraps for the decorator

* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic

* Swap order of functions for bottom to top execution order

* Only error for modules

* Add test for loading a lookup plugin that shadows a keyword
2018-04-10 09:26:27 -05:00
Martin Krizek
d97952dbf4
apt: allow for --allow-unauthenticated in upgrade (#38381)
* apt: allow for --allow-unauthenticated in upgrade

* Style fix

* Another style fix

* Add trailing comma
2018-04-10 15:37:41 +02:00
saichint
361437b042 fix nxos_igmp issues (#38496) 2018-04-10 00:05:58 -04:00
saichint
dabe5e6d07 fix nxos_hsrp issues (#38410)
* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth
2018-04-09 23:54:05 -04:00
Nate
c38617a736 fix for when status codes are provided as a comma separated list (#38080)
* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests
2018-04-10 12:25:08 +10:00
Jordan Borean
0d374f28d2 win_exec_wrapper: fix tests after recent change (#38504) 2018-04-09 17:48:14 -07:00
Matt Martz
6332beef65
Add unit tests for ansible.module_utils.urls (#38059)
* Start of tests for ansible.module_utils.urls

* Start adding file for generic functions throughout urls

* Add tests for maybe_add_ssl_handler

* Remove commented out line

* Improve coverage of maybe_add_ssl_handler, test basic_auth_header

* Start tests for open_url

* pep8 and ignore urlopen in test_url_open.py tests

* Extend auth tests, add test for validate_certs=False

* Finish tests for open_url

* Add tests for fetch_url

* Add fetch_url tests to replace-urlopen ignore

* dummy instead of _

* Add BadStatusLine test

* Reorganize/rename tests

* Add tests for RedirectHandlerFactory

* Add POST test to confirm behavior is to convert to GET

* Update tests to handle recent changes to RedirectHandlerFactory

* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
2018-04-09 10:17:43 -05:00
Rémy Léone
eccccfe77f Initial commit for Scaleway Compute (#38285) 2018-04-09 09:00:48 -05:00
Martin Krizek
bb6f90ff6f
apt: properly set changed for autoremove/autoclean (#38329) 2018-04-09 11:10:42 +02:00
Yanis Guenane
99497ce54c openssl_certificate: Handle dump() in check_mode (#38386)
Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
2018-04-09 09:26:02 +01:00
Julien Vey
bab947d854 Migrate s3_bucket module to boto3 (#37189) 2018-04-06 14:33:58 -04:00
Dag Wieers
9bb1ee30bf Required changes to support redirects on HTTP 307/308 (#36809)
* Required changes to support redirects on HTTP 307/308

This ensures HTTP 307 and 308 will redirect the request to the new
location without modification.

* Fix the unused newheaders reference

* Be more compliant

* Add integration tests for follow_redirects=all

* Improve other tests for new behaviour

* Make follow_redirects values more strict
2018-04-06 13:17:14 -05:00
Brian Coca
3c996d0f74 make aef test more predictable
revert "Disable any_errors_fatal test."
This reverts commit 56189cc312.

fixes #38407
2018-04-06 09:48:30 -07:00
Matt Clay
56189cc312 Disable any_errors_fatal test. 2018-04-06 08:16:15 -07:00
David Newswanger
712d30f46c
Add eos_smoke integration tests (#36957)
* added eos_smoke tests

* removed left over file

* added note to uncomment broken eapi test when #36919 is fixed

* uncommented fixed test, added unbecome test

* skip become tests when connection=local
2018-04-06 08:16:07 -04:00
Erwan Quélin
49aac5f8c7 Added module win_pester and relatives integration tests (#37343)
* Added module win_pester and relatives integration tests

* Corrected issues as stated by ansible-test

* Added defaults variable in integration tests

* Added task to install Pester if needed in the integration test

* Corrected error in win_psmodule task

* Added Pester installation with Chocolatey when Powershell version < 5

* Get facts...

* Disabled invoke-pester output

* Added pester_result type

* Added jhawkesworth changes proposal

* Corrected documentation linting

* Corrected linting

* Added dagwieers recommendations

* Added dagwieers recommendations

* Corrected linting errors and task error in integration test

* Corrected error in integration test

* Added dagwieers recommendations

* Corrected requirements in the DOCUMENTATION block
2018-04-06 11:48:45 +01:00
saichint
1bf29651af fix nxos_acl issues (#38283)
* fix nxos_acl issues

* typo fix

* typo fix in sanity.yaml

* another typo fix in sanity.yaml
2018-04-06 00:57:13 -04:00
Brian Coca
2afb1090b1 allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping

* tests for all behaviours affected

* add tests with injection off/on
2018-04-06 09:57:34 +10:00
AlanCoding
153c9bd539 Reduce recursion within group methods
This offers an optimization that allows loading larger
inventories of various structure by improving the
scaling laws involved for adding hosts and groups.

The primary speed benefit is the elimination of duplicate
recusion from traversing converging paths.
2018-04-05 18:38:44 -04:00
Jordan Borean
71e8527d7c powershell: display non-ascii characters in command outputs (#37229) 2018-04-05 14:59:51 -07:00
Jordan Borean
fd4d264253
win_setup: Added connection name to interfaces (#37327) 2018-04-06 07:36:38 +10:00
jhawkesworth
ad94d03ba1 Tolerate win line endings on windows module_util load (#37291)
* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback
2018-04-06 07:13:31 +10:00
Ed Costello
0d31d1cd24 [cloud]Add aws_ses_identity_policy module for managing SES sending policies (#36623)
* Add aws_ses_identity_policy module for managing SES sending policies

* Add option to AnsibleAWSModule for applying a retry decorator to all calls.

* Add per-callsite opt in to retry behaviours in AnsibleAWSModule

* Update aws_ses_identity_policy module to opt in to retries at all callsites.

* Add test for aws_ses_identity_policy module with inline policy.

* Remove implicit retrys on boto resources since they're not working yet.
2018-04-05 15:11:12 -04:00
Matt Clay
39aa50022a Fix rpm_key test on Fedora 27. 2018-04-05 08:56:21 -07:00
Andrew Gaffney
8673e1e661 Support for module param defaults (#22648) 2018-04-05 11:44:51 -04:00
Matt Clay
534e9e142b Fix openssl_certificate test for newer openssl. 2018-04-04 14:48:18 -07:00
Milan Ilic
5b703a2a53 Add OpenNebula one_image_facts module (#38169)
* Add OpenNebula one_image_facts module

`one_image_facts` - module for gathering facts about OpenNebula images
Add integration tests

* Add an alias for ids
2018-04-04 22:53:31 +02:00
David Newswanger
0bd2cd4394
added junos_smoke tests (#37216)
* added junos_smoke tests

* enable check mode test

* fix check mode test
2018-04-04 10:46:47 -04:00
David Newswanger
38fa1d0b15
added iosxr_smoke (#37828)
* added iosxr_smoke tests

* finalized netconf tests

* cleaning up files
2018-04-04 10:46:30 -04:00
Evgeny Fedoruk
5e990301bb Fixing lack of failure when uploaded source is invalid (#37461)
Checking the response status for 400 and throwing exception.
Unit tests updated.

Fixes #37406
2018-04-04 07:48:22 -06:00
Samer Deeb
72d42bd065 issue:38167 add support for onyx version 3.6.6000 for onyx_linkagg (#38191)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-04-04 07:43:10 -06:00
Matt Clay
980a130f2e
Update aliases on integration tests. (#38258)
* Enable dpkg_selections test.
* Enable vmware_maintenancemode test.
* Enable azure_rm_deployment test.
* Mark aws_waf_web_acl test unsupported.
2018-04-03 23:40:23 -07:00
saichint
b8cb382a40 nxos_acl_interface tests addition (#38230) 2018-04-04 02:07:37 -04:00
Matt Clay
d653d52dd8
Mark unsupported integration tests. (#38251)
* Mark UCS integration tests as unsupported.
* Mark various connection tests as unsupported.
* Mark win_domain_group test as unsupported.
* Mark java_cert test as unsupported.
* Mark synchronize-buildah test as unsupported.
* Mark various AWS tests as unsupported.
* Mark azure_rm_acs test as unsupported.
* Mark GCP tests as unsupported.
2018-04-03 19:04:23 -07:00
Matt Clay
a5cbc0a2c8
Multiple ansible-test fixes. (#38247)
* Add ansible-test integration --allow-root option.
* Fix destructive target override.
* Fix bad type hint SanityResult -> TestResult.
* Fix skip/python3 filtering with --docker option.
2018-04-03 18:53:53 -07:00