Commit graph

32823 commits

Author SHA1 Message Date
Will Thames
5e978b0f2b Use JSON returns values to create RETURN docs
After running hacking/test-module to generate some output,
the JSON output can be fed into the return skeletion generator
to create an excellent starting point for RETURN docs
2017-09-11 14:33:11 -07:00
Adam Miller
75127092f2 refactor firewalld module with object abstraction (#26487)
* refactor firewalld module with object abstraction

This change creates a FirewallTransaction object that each
individual transaction type is a sub-class of as they all follow the
same pattern to enable or disable something in the firewall.

Also, there's a few bugfixes here:
    - Fix the "source" type to handle permanent operations
    - Remove ambiguity of required parameters for only specific use
      cases that can lead to transactions effectively being a no-op.
      Instead, pick sane defaults and document them.
    - Change how imports are done so globals are no longer needed

This is based on the original feedback by Toshio from the last
refactor attempt:

    https://github.com/ansible/ansible-modules-extras/pull/3383

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* fix line too long for pep8 for shippable tests

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* remove firewalld from pep8/legacy-files

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2017-09-11 14:10:07 -07:00
Brian Coca
869a318492 allow config for callbaks and some fixes
* only complain about ini deprecation if value is set
 * set plugin config for stdout and other types
 * updated plugin docs, moved several plugins to new config
 * finished ssh docs
 * fixed some issues seen in plugins while modifying docs
 * placeholder for 'required'
 * callbacks must use _plugin_options as _options already in use
2017-09-11 14:00:01 -07:00
Sloane Hertel
942b6fb9bc ec2_vol: wait for delete_on_termination to be set to the correct value. Fixes #22534. (#28848)
wait for delete_on_termination to be set to the correct value, it can take some time to correctly reflect the setting sent in the API call.
2017-09-11 16:52:06 -04:00
Toshio Kuratomi
ff13d58c14 Remove use of unicode_literals as it is an anti-pattern
from __future__ unicode_literals leads to developer confusion as
developers no longer can tell whether a bare literal string is a byte
string or a unicode string.  Explicit marking as u"" or b"" is the way
to solve the same problem in the Ansbile codebase.
2017-09-11 13:33:51 -07:00
Lorin Hochstein
362a2e523a Document return values for ec2_vpc_net.py (#21294)
* Document return values for ec2_vpc_net.py

* Prepend "vpc" to return values
2017-09-11 16:10:36 -04:00
Sam Doran
36a732be7a Remove test/: key since it is now empty (#29660)
Still working out what lables to apply. Labels were removed in a previous PR, and now the bot is upset.
2017-09-11 15:21:14 -04:00
Pilou
6339a27042 Use 'test' label only for test related pull request (#28956)
Path components of 'file' parent key which are valid GitHub labels
are automatically added to the label list [1]. 'test' is a valid label,
hence 'test' and 'test_pull_requests' were both added.

Fix 3334407c71
[1] 9dd71e881b/ansibullbot/parsers/botmetadata.py (L54)
2017-09-11 15:09:40 -04:00
Christian Pointner
177ce3014c openssl_csr: consistent param namings (#29604)
* harmonize openssl-csr argument names

* the module has been introduced by 2.4 not only the privatekey_passphrase
2017-09-11 21:05:15 +02:00
Martin Krizek
0daacdccf8 dnf: add environment upgrade test 2017-09-11 11:45:10 -07:00
Toshio Kuratomi
cfaea8a053 Change ansible-doc usage to show -a is for internal use (#29603)
* Change ansible-doc usage to show -a is for internal use

ansible-doc -a is for testing that documentation is sane.  It should not
be used by normal users in production.  The main reason for this is that
it is designed to fail if there are any undocumented modules or plugins.
This is good for testing that all plugins we ship are documented.  It is
not good for end users who may have undocumented third-party plugins.
2017-09-11 11:25:34 -07:00
Toshio Kuratomi
3277e6328b Define byte strings versus text strings in docker connection
Fixes python3 string handling in the docker connection plugin

Fixes #24776
2017-09-11 09:55:09 -07:00
Matt Clay
5953a428a8 Undo accidental addition to skip.txt. 2017-09-11 09:45:44 -07:00
Martin Krizek
de299ef77c dnf: fix TypeError when env/group failed 2017-09-11 09:16:39 -07:00
Matt Clay
cafd064547 Improve import error handling in azure_rm_common. (#29153)
* Improve import error handling in azure_rm_common.

* Update skip.txt
2017-09-11 09:11:28 -07:00
Matt Martz
d043ba2673 Create a new pipe for sshpass on retries. Fixes #29095 2017-09-11 08:49:15 -07:00
Brian Coca
444a5b5389 fix cs_zone_facts tests, namespace feature removed (#29184)
* fix cszonefacts .. namespace feature removed

* also removed the 2nd instance of ansible_facts
2017-09-11 17:30:43 +02:00
Dusan Matejka
0647d09602 adds soft-update logic if force is set to no in zabbix_host module in… (#22614)
* adds soft-update logic if force is set to no in zabbix_host module instead of failing

* makes zabbix_host soft-update compatible with python2.6
2017-09-11 09:14:22 -06:00
Dirk Mueller
81f76475f1 Rename SuSE distribution helper function to SUSE (#29090)
This is a noop change, but the company renamed itself from SuSE to
SUSE round about 15 years ago. See

https://www.suse.com/brandcentral/suse/identity.php
2017-09-11 11:03:27 -04:00
Andrea Tartaglia
b9de989ad4 Fix mail module headers encoding (#29109)
* Fixes encoding issue in Subject line

* Use Header to correctly set header charset
2017-09-11 10:39:23 -04:00
Jonathan Karras
e5d247fdc0 Fixes #20443 - Adjust version checking regex to account fo no comma in IOS-XE (#29157)
* Adjust version checking regex to account fo no comma in IOS-XE
* Adjusted regex to include last character of version number
2017-09-11 07:08:12 -07:00
Ricardo Carrillo Cruz
f0aa31b49e Fix handling of config vars with eval expression (#29536)
The config variables defined with eval, like INVENTORY_IGNORE_EXTS,
are not stored properly once the eval is processed.
This causes references to the constant to still have the eval in the
value.
2017-09-11 16:04:51 +02:00
Trishna Guha
2bef344512 nxos_config CI fix (#29437)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-11 14:17:17 +05:30
Trishna Guha
bbb1ceba75 fix nxos_command nxapi test output (#29436)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-11 14:15:56 +05:30
Matt Clay
50ae33d3c1 Fix wheel dependency on python 2.6. (#29388)
* Fix wheel dependency on python 2.6.
* Limit wheel version for tox on python 2.6.
2017-09-10 23:52:13 -07:00
Erwin Oegema
61d2620098 Fix section in known_hosts documentation
SSHD is part of section 8, SSH is part of section 1.
2017-09-10 20:24:46 -07:00
Andreas Olsson
ff5bc9d9c3 postgresql_db: Document that name and db are aliases (#29180) 2017-09-10 22:29:15 -04:00
Will Thames
f9a179f770 Handle missing docker-py better (#27540)
* Update docker inventory to use APIClient

docker-py has been updated, and the `Client` class no longer
exists. We use the new `APIClient` class.

To provide graceful failure when docker-py is not installed,
we need to create a dummy `Client` class so that the inventory
script will get as far as displaying a useful error message

Before

```
$ contrib/inventory/docker.py --pretty
Traceback (most recent call last):
  File "contrib/inventory/docker.py", line 418, in <module>
    class AnsibleDockerClient(Client):
NameError: name 'Client' is not defined
```

After

```
$ contrib/inventory/docker.py --pretty
Failed to import docker-py. Try `pip install docker-py` - cannot import name Client
```

* docker inventory configuration file location

Allow docker.yml to live next to docker.py, as well as in the
current directory
2017-09-10 19:06:57 -07:00
Brian Coca
0c291ece1a remove fact namespacing
since we want to make namespaced facts drop ansible_ prefix but don't have the
time before release to perfect this feature, we are going to postpone it for now
until we have the resources to fix this issue. That way we won't have people relying
on the 'incorrect' names for a release.
2017-09-10 17:37:52 -04:00
Andrew Saraceni
8f050d3719 Fix SID Lookup Issues on Assorted Windows Modules (#28979)
* fix sid lookup issues and update copyright/license to latest format

* simplify win_owner and win_share by removing unnecessary function
2017-09-11 07:34:51 +10:00
Werner Dijkerman
4af8c6852f Adding tls settings for Zabbix host (#28692)
* Adding tls settings for Zabbix host

* Using the correct Ansible version

* Removing wildcard import

* Added module_utils package

* Set version_added for visible_name back to 2.3

* Added description for >= Zabbix 3.0; Added parameters for function

* Setting version_added --> 2.5; Removed trailing whitespace
2017-09-10 16:53:53 -04:00
William Griffiths
ab7c850360 consul + Python 3.5 (#23935)
* Fix #23934 - consul + Python 3.5
* List comprehension instead of filter with lambda
2017-09-09 18:41:08 -07:00
Miguel Ángel Ajo
8e4f112b39 Fixes #23680 bug with py3.x due to binary string handling (#23688)
* This commit includes a unit test to exercise the _is_role
function and make sure it doesn't break in any Python version.
* Import os.path and other minor fixups
2017-09-09 18:40:07 -07:00
Tomas Tomecek
0274835add conn,buildah: don't pass bytes to shlex.split (#27896)
* conn,buildah: don't pass bytes to shlex.split on python3
2017-09-09 17:40:07 -07:00
Toshio Kuratomi
75249e311e Fix set theory filters for python3
The set theory filters need to use lists rather than generators on python3.

Also add unit tests for most of the mathstuff filters

Fixes #26494
2017-09-09 17:38:39 -07:00
Dag Wieers
6c4966547d Cosmetic changes to documentation and arg_spec
I didn't want to drag this any longer than it already has. Hope I am doing well.
2017-09-10 01:39:56 +02:00
Simon Wydooghe
d13b62907b Change version_added from 2.4 to 2.5 2017-09-10 01:39:56 +02:00
Simon Wydooghe
c308ec6229 Remove unneccesary statements
* Remove 'required: false' statements from the argument docs
* Remove 'required=False' parameters from argument spec
* Remove 'default: null' statements from the argument docs
2017-09-10 01:39:56 +02:00
Simon Wydooghe
57d4a6ca8b Add --syn option to iptables module
This adds the --syn option to filter SYN packets. Can be negated.

I added a generic append_match_flag function which can be used to add
match flags without parameters. It also allows negating the flag
if the added param allows this.

Not sure if I took the best approach here so all feedback welcome :)
2017-09-10 01:39:56 +02:00
Toshio Kuratomi
6797221107 Romain dartigues fixes (#29169)
* cloud: azure: fix typo introduced in commit 16d23e9

The commit "Add reference to VNET resource group (#26052)"
removed an used variable.

* network: aos: error hint never shown
2017-09-09 16:20:53 -07:00
Anton Baklanov
fcad4f38b4 Fixes #26793: convert insert regex to_bytes before searching 2017-09-09 12:49:00 -07:00
Kevin Hulquest
2bab91551d Update qos parameter for volume manager and update example. (#27594) 2017-09-09 12:28:56 -07:00
Pierre Guinoiseau
436b173b24 Fix py3 string issue in jail connection plugin (take 2) (#28374)
* Fix py3 string issue in jail connection plugin
2017-09-09 11:52:42 -07:00
Maor Lipchuk
625a23f155 Fix typo 2017-09-09 20:26:21 +02:00
Joshua C. Randall
6e84baddb6 fix os_image so it works when id is None (#29147)
Fixes #29145
2017-09-09 13:16:48 -05:00
Matt Clay
4de6076d78 Fix pylint issue. 2017-09-09 10:45:39 -07:00
Abhijeet Kasurde
8f6626bd8f Misc typo corrections
Fix adds correction for typos

* Anisble to Ansible
* Fasle to False

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-09 10:25:50 -07:00
s-hertel
0ac4a82f3b ec2_group: unnest variable assignment. Fixes #29113. 2017-09-09 10:20:08 -07:00
s-hertel
6ae201d3b1 cloudtrail: import botocore.exceptions in a try/except. 2017-09-09 10:10:21 -07:00
Brian Coca
075ead8fb0 fixes to config/setting retrieval
- better variable precedence management
- universal plugin option handling
- also updated comments for future directions
- leverage fragments for plugins
- removed fact namespacing
- added 'firendly name' field
- updated missing descriptions
- removed some unused yaml entries, updated others to reflect possible future
- documented more plugins
- allow reading docs using alias
- short licenses
- corrected args for 'all plugins'
- fixed -a option for ansible-doc
- updated vars plugins to allow docs
- fixed 'gathering'
- only set options IF connection
- added path list and renamed pathspec mostly the diff is , vs : as separator
- readded removed config entries that were deprecated but had no message ... and deprecated again
- now deprecated entries give warning when set
2017-09-09 09:48:22 -07:00