Commit graph

32928 commits

Author SHA1 Message Date
Christian Pointner
cc995a2477 openssl_csr: consistent param namings (#29604)
* harmonize openssl-csr argument names

* the module has been introduced by 2.4 not only the privatekey_passphrase

(cherry picked from commit 177ce3014c)
2017-09-11 14:11:59 -07:00
Adam Miller
1c7a91a725 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>

(cherry picked from commit 75127092f2)
2017-09-11 14:10:37 -07:00
Brian Coca
34db3cd9be 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

(cherry picked from commit 869a318492)
2017-09-11 14:00:32 -07:00
Toshio Kuratomi
61315cd3c5 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.

(cherry picked from commit ff13d58c14)
2017-09-11 13:34:21 -07:00
Martin Krizek
baec8cf95a dnf: add environment upgrade test
(cherry picked from commit 0daacdccf8)
2017-09-11 11:45:44 -07:00
Toshio Kuratomi
d396351817 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.
(cherry picked from commit cfaea8a053)
2017-09-11 11:27:05 -07:00
Toshio Kuratomi
305d5b4d5f Define byte strings versus text strings in docker connection
Fixes python3 string handling in the docker connection plugin

Fixes #24776

(cherry picked from commit 3277e6328b)
2017-09-11 09:55:31 -07:00
Martin Krizek
5db6b61cf0 dnf: fix TypeError when env/group failed
(cherry picked from commit de299ef77c)
2017-09-11 09:39:23 -07:00
Brian Coca
f64c55e58f fix cs_zone_facts tests, namespace feature removed (#29184)
* fix cszonefacts .. namespace feature removed

* also removed the 2nd instance of ansible_facts

(cherry picked from commit 444a5b5389)
2017-09-11 09:38:44 -07:00
Trishna Guha
557cf0d17a rename nxos test basic-no-exec to basic-no-motd (#29144)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2ff9888923)
2017-09-11 09:13:27 -07:00
Trishna Guha
91ca89063c nxos_banner CI fix (#29134)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 588bddbc35)
2017-09-11 09:13:27 -07:00
Trishna Guha
9f4b8d115a Disable nxapi test for nxos_banner (#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 757983d808)
2017-09-11 09:13:27 -07:00
Matt Martz
c439b9e009 Create a new pipe for sshpass on retries. Fixes #29095
(cherry picked from commit d043ba2673)
2017-09-11 08:49:34 -07:00
John R Barker
c47da38d43 Update docs version string
Hack until https://github.com/ansible/ansible/issues/28553 is fixes
2017-09-11 07:52:35 -07:00
Ricardo Carrillo Cruz
b9a4fdd616 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.
(cherry picked from commit f0aa31b49e)
2017-09-11 07:22:48 -07:00
Jonathan Karras
54cfca0ea3 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

(cherry picked from commit e5d247fdc0)
2017-09-11 07:08:55 -07:00
Matt Clay
18db4089a7 Fix wheel dependency on python 2.6. (#29388)
* Fix wheel dependency on python 2.6.
* Limit wheel version for tox on python 2.6.

(cherry picked from commit 50ae33d3c1)
2017-09-11 07:01:04 -07:00
Ganesh Nalawade
3aa1cedc4a Add check for port and host in ios_interface (#29119)
Fixes #29118
(cherry picked from commit 772dab55c6)
2017-09-11 07:00:29 -07:00
Erwin Oegema
993eedaa94 Fix section in known_hosts documentation
SSHD is part of section 8, SSH is part of section 1.
(cherry picked from commit 61d2620098)
2017-09-10 20:25:37 -07:00
Will Thames
51a9875cfd 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

(cherry picked from commit f9a179f770)
2017-09-10 19:07:16 -07:00
Brian Coca
b62c60ef86 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.

(cherry picked from commit 0c291ece1a)
2017-09-10 14:47:44 -07:00
Andrew Saraceni
db363160a6 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

(cherry picked from commit 8f050d3719)
2017-09-10 14:45:23 -07:00
William Griffiths
b4c7812747 consul + Python 3.5 (#23935)
* Fix #23934 - consul + Python 3.5
* List comprehension instead of filter with lambda

(cherry picked from commit ab7c850360)
2017-09-09 18:41:25 -07:00
Miguel Ángel Ajo
738f08d627 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

(cherry picked from commit 8e4f112b39)
2017-09-09 18:40:30 -07:00
Tomas Tomecek
a0989d125d conn,buildah: don't pass bytes to shlex.split (#27896)
* conn,buildah: don't pass bytes to shlex.split on python3
(cherry picked from commit 0274835add)
2017-09-09 17:41:05 -07:00
Toshio Kuratomi
8eab6a43f7 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

(cherry picked from commit 75249e311e)
2017-09-09 17:40:55 -07:00
Toshio Kuratomi
4e5051fe00 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

(cherry picked from commit 6797221107)
2017-09-09 16:21:20 -07:00
Anton Baklanov
1478d0fcf3 Fixes #26793: convert insert regex to_bytes before searching
(cherry picked from commit fcad4f38b4)
2017-09-09 12:49:24 -07:00
Kevin Hulquest
75309386d7 Update qos parameter for volume manager and update example. (#27594)
(cherry picked from commit 2bab91551d)
2017-09-09 12:29:32 -07:00
Pierre Guinoiseau
0521f9d26f Fix py3 string issue in jail connection plugin (take 2) (#28374)
* Fix py3 string issue in jail connection plugin

(cherry picked from commit 436b173b24)
2017-09-09 11:53:07 -07:00
Abhijeet Kasurde
80b41165cb Misc typo corrections
Fix adds correction for typos

* Anisble to Ansible
* Fasle to False

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8f6626bd8f)
2017-09-09 10:26:30 -07:00
s-hertel
dbcdf97252 ec2_group: unnest variable assignment. Fixes #29113.
(cherry picked from commit 0ac4a82f3b)
2017-09-09 10:20:42 -07:00
s-hertel
972fbbba22 cloudtrail: import botocore.exceptions in a try/except.
(cherry picked from commit 6ae201d3b1)
2017-09-09 10:11:04 -07:00
Brian Coca
63b4e41d0c 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

(cherry picked from commit 075ead8fb0)
2017-09-09 09:50:11 -07:00
Ross Williams
57f2fee4d9 Fixes #19666 Correct AMI information output by ec2_ami module (#27021)
Add AMI name and platform to outputs on AMI creation
2017-09-08 15:08:57 -07:00
Adrian Likins
51949fdeec generate rst doc pages for command line tools (#27530)
* let generate_man also gen rst pages for cli tools
* make template-file, output-dir, output format cli options for generate_man
* update main Makefile to use generate_man.py for docs (man pages and rst)
* update vault docs that use :option:
* Edits based on
6e34ea6242 and
a3afc78535

* add a optparse 'desc' to lib/ansible/cli/config.py

  The man page needs a short desc for the 'NAME' field
  which it gets from the option parse 'desc' value.

  Fixes building ansible-config man page.

* add trim_docstring from pep257 to generate_man

  use pep258 docstring trim function to fix up any indention
  weirdness inherit to doc strings (ie, lines other than
  first line being indented.

* Add refs to cli command actions

To reference ansible-vaults --vault-id option, use:

:option:`The link text here <ansible-vault --vault-id>`

or:

:option:`--vault-id <ansible-vault --vault-id>`

To reference ansible-vault's 'encrypt' action, use:

:ref:`The link text here <ansible_vault_encrypt>`

or most of the time:

:ref:`ansible-vault encrypt <ansible_vault_encrypt>`
(cherry picked from commit 89c973445c)
2017-09-08 12:16:33 -07:00
Adrian Likins
66a244facc change generated playbooks_keywords.rst to use an rst 'glossary' (#28843)
* Use a rst glossary for playbooks_keywords docs
* Add a 'Task' and 'Tasks' to glossary.
* Update keywords desciptions,
* use :term: rst ref, some quoting
* Make it more obvious that 'retries' and 'until' need to be used in combination.

(cherry picked from commit 52f2edf19d)
2017-09-08 12:15:22 -07:00
Rene Moser
84203a45e9 config: use path list for default inventory
This allows to use a pathlist in the ansible.cfg:

  [default]
  inventory = path/inventory:other_path/inventory

Since ansible allows to use --inventory on CLI more then once, we should also support a pathlist in the config.

(cherry picked from commit da488a8db5)
2017-09-08 11:37:48 -07:00
Willem van Ketwich
c072a5406f [cloud] EC2 AutoScaling fix for respecting zero as the desired, min&max size values (#27870) 2017-09-08 10:05:33 -07:00
Matt Clay
69721cade6 Revert "Temporarily disable failing opensuse test jobs."
This reverts commit 31d2eb0828.

(cherry picked from commit 67c7bd8745)
2017-09-08 09:56:10 -07:00
Brian Coca
a9d81ef3db Db cache fix (#29048)
* cleaner get for file based caches
* now db based facts behave like file ones
we now keep local in mem cache to avoid race conditions on expiration during ansible runs
(cherry picked from commit 13d1520f3d)
2017-09-07 09:22:34 -07:00
Jordan Borean
6d5eb06cc5 win_regedit: fixed up diff output to be more representative of type (#28974)
* win_regedit: fixed up diff output to be more representative of type

* added diff fix for creation of key and prop in one go

(cherry picked from commit 91e7c3ec81)
2017-09-07 04:07:40 -07:00
Jordan Borean
37c174b5ec win_user: add return info (#28975)
(cherry picked from commit 4a577bd67f)
2017-09-07 04:06:59 -07:00
Brian Coca
18fdc34ecf clarify import_ docs (#28395)
* clarify import_ docs

* fixed izpellz

* Copy edits.

(cherry picked from commit f4fff54f68)
2017-09-06 21:59:07 -07:00
Brian Coca
647170b040 introducing ALSO YAML inventory (#28596)
* introducing ALSO YAML inventory

* Copy edits

(cherry picked from commit c3550b58ed)
2017-09-06 21:57:24 -07:00
Matt Clay
9ff5ac344f Fix rst syntax issue in docs. 2017-09-06 20:45:56 -07:00
Brian Coca
dbc7444376 fix check mode for solaris enable/disable (#29049)
(cherry picked from commit 7804049592)
2017-09-06 18:11:57 -07:00
Dylan Silva
78cae22938 updated modules support page with new information (#29071)
* updated modules support page with new information

* Minor wording tweaks.
2017-09-06 17:15:12 -07:00
Matt Clay
294560e91e Improve handling of first CI run for new branch. (#29070)
(cherry picked from commit a1453a7917)
2017-09-06 16:40:48 -07:00
Brian Coca
5ce6066e4c less confusing 'args' message (#29053)
* less confusing 'args' message

* fix test

* gone native

(cherry picked from commit fe3b4325c2)
2017-09-06 15:33:09 -07:00