Commit graph

15538 commits

Author SHA1 Message Date
Brian Coca
91a385b87d etcd doc tests 2017-03-23 01:27:19 -04:00
Brian Coca
d14634ca21 uncommit the crime of extra spaces in docstring 2017-03-23 01:27:19 -04:00
Brian Coca
7839f70e36 Enable documentation in plugins
Made ansible-doc more plugin agnostic
We can have docs in lookup, callback, connectionm strategy, etc
Use first docstring and make pepizis happy
generalized module_docs to plugin_docs
documented cartesian, ssh, default, jsonfile, etc as examples
changed lack of docs to warning when listing
made smarter about bad docstrings
better blacklisting
added handling of options/config/envs/etc
move blacklist to find_plugins, only need once
2017-03-23 01:27:19 -04:00
Brian Coca
d3115ae8f3 put cache base classes in __init__ (#22809)
* put cache base classes in __init__

* added placeholder
2017-03-23 01:26:10 -04:00
Brian Coca
97cb2016d8 keep ansible_local as top level var, always present 2017-03-23 01:25:39 -04:00
Evgeni Golov
7a00f28804 synchronize: explicitly set the executable for localhost
Otherwise the executable for the destination is also used on the local
machine and this might not exist.

Fixes: #22867
2017-03-22 21:27:47 -07:00
Matt Martz
3164e8b561 E501 fixes (#22879) 2017-03-22 20:50:28 -05:00
Glen Maetzig
ac992eff1c Import camel_dict_to_snake_dict method to fix error when executing get_nat_gateways() method
(cherry picked from commit 223fc34ab9)
2017-03-22 16:30:59 -07:00
Shaun Brady
cd24bbbc9c Missing purge_subnets parameter on function call
purge_subnets|routes were introduced recently.
ensure_subnet_associations now takes purge_subnets as a parameter.  A
call to this function was missed when introducing this feature.  With
out, results in a "got 5 expected 6" error.
2017-03-22 16:22:54 -07:00
mjfroehlich
cc50b803df [cloud][route53_health_check] Consider port in identity test (#22762)
Allows to health-check two services on one host. Before, asking for 2 health checks being present for `http://myhost:8888` and `http://myhost:9999`  resulted in just a single health check, as this module considered the two specs as equal.

Bonus: route53_health_check now passes style guidelines
2017-03-22 12:49:39 -04:00
Brian Coca
052be86605 fix for loosing ungrouped hosts in ini
fixes #22861
2017-03-22 12:48:19 -04:00
Brian Coca
5e98be2e62 better handling of parsed
updated tests to match new result output
2017-03-22 12:03:43 -04:00
Brian Coca
9ad62a48ab prevent failure for meta: reset_connection
now plugins that don't explicitly support it give a warning.
2017-03-22 11:00:32 -04:00
Robin Schneider
bbc6af6749 Fix use of unauthenticated connection examples in git module docs
Ref: https://git-scm.com/book/ch4-1.html#The-Git-Protocol
2017-03-22 10:26:48 -04:00
Ricardo Carrillo Cruz
98c98125f0 Fallback to show-run on ios_banner for devices where show banner does not work (#22793)
On switches 'show banner' command doesn't work, fallback to show run|begin banner
and extract the banner text in case that fails.
2017-03-22 10:01:41 +01:00
Matt Martz
02f66b9369 E1 legacy pep8 fixes (#21933)
* E1 pep8 fixes

* e111 fix for rds.py
2017-03-21 21:19:40 -05:00
Ted Timmons
887456ab8e Fix stderr false return value (#22845)
* ensure exit_json does not fail from stderr=False

- do a little bit of safety-checking in exit_json to not try to .splitlines() on a boolean
- remove the stderr=boolean from uri.py, this is the only spot that uses it (at least so obviously)
- add unit tests that call exit_json. These are useless because the stderr parsing is in _execute_module and is difficult to mock; deleting these tests after the commit.

* remove added unit tests per prev commit

exit_json doesn't do the param parsing, that is buried deep inside _execute_module.
2017-03-21 18:11:11 -04:00
Brian Coca
5beb27ef5e use namespaced facts 2017-03-21 17:10:15 -04:00
yuriy-z
40a1f20bea Add storage device WWN to facts for Linux (#16640)
World Wide Name (WWN) is unique identifier of device.
This patch adds this identifier to facts for Linux.
2017-03-21 16:51:18 -04:00
Johan Guldmyr
897201c4be add infiniband network type (#18833) 2017-03-21 16:31:30 -04:00
Christian Albrecht
66818050b0 Add perm_hwaddr on Linux bonding slave nics (#19071)
This patch will additionally report the `perm_hwaddr`
fact of a Linux bonding slave network interface.

Related to issue #19067
2017-03-21 16:29:38 -04:00
Brian Coca
455aff8436 ported fix from ansible-core #5639
From 3d09c94faeaa52075055f23744d8b52581c59bb2 Mon Sep 17 00:00:00 2001
Evan Kaufman <evan@digitalflophouse.com>
2017-03-21 16:03:00 -04:00
Brian Coca
2022fc162a fixed name to unit 2017-03-21 14:28:23 -04:00
Brian Coca
b82aa41e31 removed deprecated config/env vars 2017-03-21 14:02:39 -04:00
Brian Coca
3f4b87f0c0 allow systemd to 'just' reload 2017-03-21 13:49:44 -04:00
Peter Sprygada
d6787632c9 fixes return data structure (#22830)
The return was being re-written instead of updated so warnings were
lost.  This patch now updates the result instead of replacing it.
2017-03-21 14:41:59 +01:00
Joshua C. Randall
e7fd38af78 Fix get_s3_connection (fixes #22317) (#22318)
* Fix get_s3_connection (fixes #22317)

Override aws_connect_kwargs rather than prepending to them. Should fix an issue in which `calling_format` is set twice in the kwargs passed to `boto.connect_s3` or `S3Connection` if a bucket name contains a `.`

* Revert "Fix get_s3_connection (fixes #22317)"

This reverts commit 7f61b8bebd.

* implements alternative way of fixing issue with aws_connect_kwargs for rgw and fakes3 (fixes 22317)

* add comment to explain why the keys are being removed from aws_connect_kwargs

* remove trailing whitespace on comment line
2017-03-21 08:15:53 -04:00
René Moser
e3525d8df9 cloudstack: fix pep8 for loadbalancer modules (#22822) 2017-03-21 11:00:46 +01:00
Peter Sprygada
e20ed8bc0c replaces logging with display for network connection plugins (#22819)
* updates network_cli and netconf connection plugins
* updates ansible-connection
2017-03-20 20:08:02 -07:00
Peter Sprygada
ed7cace425 implements python logging for network connection plugin (#22817)
* enables logging for network_cli and paramiko
* enables logging for ansible-connection
* enabled logging for netconf connection
2017-03-20 19:26:18 -07:00
Joseph Price
ed15ba1b3c CLI: unfrack --private-key path
Relative paths can break the synchronize plugin when the playbook
is not in the current working directory.

Fixes: ansible/ansible#22695
2017-03-20 11:40:17 -07:00
Brian Coca
07d9366ed8 added 'existing' back
fixes #22785
2017-03-20 12:28:35 -04:00
Tom Melendez
1c38cba7ca [GCE] Invalid zone reported through fail_json
* added new helper function for zones and regions.
* modified GCE module to use it

Fixes: ansible/ansible#20616
2017-03-20 10:15:39 -04:00
Peter Sprygada
cdb4d350b4 removes unneeded exception 2017-03-20 09:56:56 -04:00
Ondra Machacek
a46c55b2dd cloud: ovirt: Add sparsify option to ovirt_disks (#22560)
This patch fixes: https://github.com/ansible/ansible/issues/22348
2017-03-20 09:39:16 -04:00
René Moser
24c617766c cloudstack: fix load balancer idempotency if no zone given (#22768)
get_zone() is special, as it always returns a zone (default zone) even
if no zone param is given. This makes sense for many use cases.
2017-03-19 10:07:46 +01:00
David Baumann
634d6894e3 Add Missing default param for caching_mode (#22753)
Add Missing default param for caching_mode and Usage of new Ansible-Param Commant with default Value
2017-03-17 14:44:42 -07:00
Sloane Hertel
4749b75090 [cloud] ec2_eni: don't modify a network interface without eni_id - fixes #22401 (#22689)
* don't modify an eni without eni_id

fix pep8

remove ec2_eni from pep8 legacy files

remove a couple unused variables in main()

fix the documentation

* fix yaml
2017-03-17 16:26:49 -04:00
Sloane Hertel
8ccde6fbb0 [cloud] make docs for ec2_group rules more clear (#22701)
make ec2_group pep8

removed ec2_group from pep8 legacy files
2017-03-17 16:14:20 -04:00
Sloane Hertel
a4552c11b3 allow groups parameter to be noticed as an empty list (#22707)
make iam.py pep8

remove iam.py from pep8 legacy files
2017-03-17 16:11:48 -04:00
Andrea Scarpino
c80d696cec win_file: fix error when creating an existing dir (#19070)
If something else created the dir New-Item will throw an exception and
the task will fail. Check the existing file and as long as it's a dir,
we don't need to error out.
2017-03-17 09:33:57 -07:00
René Moser
b90517caf9 cloudstack: implement config overloading and ENV vars for API auth (#22724)
* cloudstack: fix connection by ENV vars and configs overloading

* cloudstack: pep8 cloudstack module_utils

* cloudstack: allow api_url to be set in ini config

* docsite: explain ENV vars support as written in python-cs for ansible
2017-03-17 11:01:43 +01:00
Tom Melendez
f5f6cf467e [GCE] Support default credentials (#22723)
Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.
2017-03-16 17:10:07 -07:00
Matt Davis
ffa4f0c427 Suppress Windows Add-Type debug noise (#22722) 2017-03-16 15:44:42 -07:00
Andreas Mosti
1fa7a3db27 Added example of removing the standard website and port 80 binding (#22457) 2017-03-16 14:52:28 -07:00
Brian Coca
c6dedea1a6 corrected docs 2017-03-16 17:36:03 -04:00
Jens Carl
cd39ff9996 Add parameters to limit replace to certain section of the file
Add parameters 'after' and 'before' to limit the replacement/remove of
lines to a certain section of the file.
2017-03-16 17:34:56 -04:00
Brian Coca
4319ddd5de allow users to control group var merge order (#22580)
* allow users to control group var merge order

With ansible_group_priority var at each group will determine merge order with siblings,
falling back to sorted names when priority is equal as it did before.

Parent/children relationships still work as they did and have higher precedence than priority

* move priority setting to groups, sourc indep

* now both inventory and play group follow priority

* removed double exception handling
2017-03-16 14:02:43 -04:00
jralbert
5334814396 Cast syslogport value from getenv as int (#22664)
SysLogHandler requires an int for port, but getenv produces a string.
Cast return from getenv as int to overcome this mismatch.
2017-03-16 10:38:55 -07:00
Ilya Simonenko
dba8edf735 cloud: docker: Fixes #22638 load image to memory when archive_path provided (#22642) 2017-03-16 10:06:19 -07:00