Commit graph

20763 commits

Author SHA1 Message Date
Will Thames
3b74dc2f6e Improve aws_ec2 plugin documentation (#37689)
* Better formatting
* More examples
2018-04-11 23:01:18 -04:00
flowerysong
b345b79dcd aws_ec2 inventory: add support for tag values as hostnames (#35880) 2018-04-11 19:34:06 -04:00
Sam Doran
90a7b3bef3
Change version added to 2.5.1 (#38604)
A bugfix backported to 2.5 also contained the new toggle option. The release
manager approved backporting this added feature to the dot release, so updating
devel to accurately reflect when the fetaure was added.
2018-04-11 17:52:27 -04:00
Brian Coca
6ef389617a
check types for template parameters (#37257)
this should give a better error than when failing on random methods when parameters where the wrong type.
2018-04-11 14:00:18 -04:00
Yuwei Zhou
8a0c192c36 Fixes new created lb doesn't return anything (#38560) 2018-04-11 13:22:27 -04:00
Brian Coca
cc1c7c63db
ensure 'home' translations (#36755)
* ensure 'home' translations

* removed slash as it created issues on diff plats
2018-04-11 11:53:05 -04:00
Brian Coca
d9430b79f9
Ensure non ansilbe exceptions keep tracebacks (#37523) 2018-04-11 11:52:12 -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
Samer Deeb
0d79268a6d issue:38321 fix onyx_config module failed while using python = 3.5 (#38343) 2018-04-11 08:01:54 -06:00
Simon Dodsley
d9b3b3f745 Add module to configure Pure Storage FlashArray Directory Services (#37350) 2018-04-11 08:17:25 -05: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
Maish
8f6ee2a5ca Added empty default for name parameter (#38514)
* Added empty default
Fix for issue https://github.com/ansible/ansible/issues/38482
2018-04-11 17:21:06 +10:00
Ganesh Nalawade
16c2d3717e
Add junos connection type check (#38527)
junos_netconf works only with connection=netconf
Add check to report appropriate error if any other
connection type is used.
2018-04-11 12:07:56 +05:30
Ganesh Nalawade
53d3e7e306
Add troubleshooting URL for persistent socket path related issue (#38542)
* Add troubleshooting URL for persistent socket path related issue

socket path timeout related error messages are not displayed on the
console as the ansible-connection process does not have access to it.
Until this is fixed need to point to troubleshooting URL so that
users can take corrective actions.

* Fix CI issue
2018-04-11 11:23:23 +05:30
Brian Coca
72b0ed8cb4 fix handling of some exceptions for mail plugin
redid the flow to simplify and dedupe code, also now we capture extra exceptions previouslly  causing traceback
see https://groups.google.com/forum/?#!msg/ansible-project/qhalnkYZMfI/93n8hlEpBAAJ
2018-04-10 22:17:33 -04: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
Brian Coca
399cba1c84 dict2items filter 2018-04-10 18:46:30 -04:00
Brian Coca
2e852fcd6d return empty host list when pattern is empty
fixes #37894
2018-04-10 18:43:29 -04:00
Brian Coca
fda9312379
actual error reporting on failed galaxy clone (#36788)
actual error reprting on failed galaxy clone

also allow debugging to see stdout/stderr from command
handle output for all commands on error
also use std temp dir instead of random
2018-04-10 17:26:17 -04:00
Brian Coca
32cf79c044 show changed in online 2018-04-10 17:25:24 -04:00
Brian Coca
5a333859fe allow for parameterized string functions
now also allow for ending parens

from following, 1, 2, 4 and 5 match, rest are ignored.

	{doc | to_nice_json}}
	{{(doc | to_nice_json)}}
	{{doc | to_nice_json| from_json}}
	{{doc | to_nice_json()}}
	{{doc | to_nice_json(indent=2)}}
	{{doc | to_nice_json(indent=2) | from_json()}}
	{{doc | to_nice_json(indent=2) | from_json}}

fixes #37579
2018-04-10 17:24:27 -04:00
Brian Coca
0c2e7fd841
made missing cli tools non fatal (#37194)
* made missing cli tools non fatal

* remove bare exceptions

these shoudl not be there as they can prevent 'wanted' exits
2018-04-10 17:23:29 -04:00
Brian Coca
42912e1ac8 minimize loading files/plugins
avoids some repetitive loading
 - read config file only once
 - now cache the ini parser per file
 - optimize shell plugin loading

tried to 'optimize' vars_plugins loading but it creates issues with precedence,
probalby due to iterator not being reset, will look into it in subsequent fix/PR
2018-04-10 17:22:31 -04:00
Brian Coca
34c002c771 give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
Brian Coca
eef70d028f
restrore showing stderr on script success (#38177)
* restrore showing stderr on script success

accidentally removed during transition to plugin, with toggle for those
who prefer the quiet way

fixes #33776

* stderr display if no other errors capture first
* fixed issue with error encoding
2018-04-10 17:16:12 -04:00
Brian Coca
1850bb752f
ignore version when deciding callback loading (#38281)
* ignore version when deciding callback loading

The code already defaulted to load the callback if the properties are not present
there was no need for us to also check the version

fixes #38270

* fix error msg on set optoins to use correct name
2018-04-10 17:15:28 -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
Simon Dodsley
cc250156c4 Update Pure Storage FlashArray hostgroup module (#38503)
Allow for deletion and additon of hosts and volumes to a
volume group.
2018-04-10 16:06:51 -05:00
Ryan S. Brown
d4e5e385ca [docs][cloud] Include volume_size in ec2 module docs 2018-04-10 16:57:04 -04:00
Simon Dodsley
f97f81ec2e Update Pure Storage FA Host module to allow for mixed protocol hosts (#37078) 2018-04-10 15:50:43 -05:00
Brian Coca
c679186f17 better handling of diff key types in compose
also made separator configurable
fixed some exception types
better error msgs
2018-04-10 15:15:52 -04:00
Philippe Makowski
0f9a66a32c urpmi module improvements (#37596)
* fix urpmi.update path #37432

* improve urpmi

* use get_bin_path rather than hard coding the path

* fix pep8 issue

* avoid using global

* - `RPM_PATH`, `URPMIUPDATE_PATH`, `URPME_PATH`) aren't constants, they should be lowercase rather than uppercase
- shorten too long lines
- remove unused import

* revert removed imports

* use lowercase rather than uppercase

* update doc

* update doc

* update doc after sanity check
2018-04-10 13:10:56 -04: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
Daniel Andrei Mincă
89d6c36584 Optimize file handling in the find module (#38192)
* Optimize file handling

Use the best practice of opening and doing operations on an opened file

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>

* Fix docstring to Sphinx type

- update the docstrings to Sphinx type, as suggested by Toshio
- Move the pattern object assignment outside the context manager, as
  suggested by Matt

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-10 09:01:44 -07: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
Ryan Brown
56cd8f2d48 Retry creation of tags when DHCP optionset is not found (#38528) 2018-04-10 09:08:41 -04: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
Will Thames
85d5901b31 Fix broken links in module documentation (#38469)
* Reflect updated names of the aws_batch_job modules
* Remove mention of `lambda_invoke` module which has yet to make it to
  Ansible.
* Update broken rst link in win_dsc module
2018-04-10 11:20:14 +10:00
Jordan Borean
22f2388ef1 winrm: added flag handler for kinit to request forwardable ticket when delegation is set (#37815) 2018-04-09 18:00:19 -07:00
Sloane Hertel
0fe778105b
Fix sporadic errors in ec2_vpc_subnet integration tests (#38473) 2018-04-09 17:03:36 -04:00
Jordan Borean
ccc56e138a
win_updates: handle if module failed to run (#38363) 2018-04-10 05:25:25 +10:00
THIERRY SALLE
6300e71903 Fix authot github account 2018-04-09 14:31:31 -04:00
David Resnick
283ccaa252 lastpass filter: add example 2018-04-09 14:20:21 -04: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
Seuf
72120c3cac Grafana datasource module : tls_ca_cert or tls_skip_verify options (#36945)
* Allow to set tls_ca_cert or skip verify for grafana datasources

* version_added in documentation for new options tls_skip_verify

* Added default value for tls_skip_verify option in doc

* Fixed author git account

* Updated author
2018-04-09 14:41:09 +01:00