Commit graph

17956 commits

Author SHA1 Message Date
Matt Davis
d2f879a266 support missing drive letters in PS path type (#29884)
* fixes #26623
* Test-Path (and thus `-type path` in Get-AnsibleParam) fail on a nonexistent drive letter, since it can't be mapped to a PSProvider.
* added support and basic smoke tests for
(cherry picked from commit 1e2ce4c8ab)
2017-09-12 09:56:16 -07:00
Anil Kumar Muraleedharan
2790df7d1c Bug Fixes for Vlan Name not assigned and Switch Error (#29953)
(cherry picked from commit 32f0c9f809)
2017-09-12 08:27:34 -07:00
Ricardo Carrillo Cruz
2f0144b26a Ignore routes that are not static manually added (#29094)
Fixes #28841
(cherry picked from commit f9f0472ba5)
2017-09-12 08:26:26 -07:00
Lorin Hochstein
36f5471f8c Document return values for ec2_vpc_net.py (#21294)
* Document return values for ec2_vpc_net.py

* Prepend "vpc" to return values
2017-09-12 07:42:16 -07:00
Andrea Tosatto
61acd35da4 make os_security_group_rule idempotent (#23707)
* Fix issue #19610
(cherry picked from commit 6b6e5665aa)
2017-09-12 07:24:29 -07:00
Trishna Guha
9107a9904b nxos_system parse name_servers fix (#29944)
* nxos_system parse name_servers fix

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

* fix nxos_system tests

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

(cherry picked from commit 5b1c91bf19)
2017-09-12 07:23:26 -07:00
Sloane Hertel
73304f50a3 ec2: fixes #19521, fixes #29456 - create instance-store AMI instances with correct shutdown behavior (#28885)
* Create instance-store AMI instances with 'terminate' as the shutdown behavior since it is required.

* Match on the error code instead of searching for a string in the message.

* Narrow conditional to only fix shutdown behavior if fixing it would help

* Fix pep8.
2017-09-11 19:54:35 -07:00
Toshio Kuratomi
0d2154646f Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings
* PYTHON_OPTIMIZE=2 will omit docstrings.  Using docstrings makes future
  changes to the plugin and module code subject to the requirement that we
  ensure it won't be run with optimization.

(cherry picked from commit cc343a4376)
2017-09-11 18:35:29 -07:00
Matt Clay
b4e4a44314 Fix pylint issue.
(cherry picked from commit 4de6076d78)
2017-09-11 18:11:36 -07:00
Brian Coca
525c318678 module and vault fixes (#29663)
* module and vault fixes

- fix module_path cli option and usage, which fixes #29653
- move --output to be in subset of vault cli, no need for all vault enabled cli to use it
- added debug to loader to see directories added

(cherry picked from commit 2165bac212)
2017-09-11 18:07:23 -07:00
Abhijeet Kasurde
46f75e0f3d Refactor easy_install module
* PEP8 fix
* Rectified string check in package install command stdout
* Add abadger's code review changes

Fixes #22245

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit b5eca624d0)
2017-09-11 15:46:12 -07:00
Tim Rupp
670b09224f Adds missing docs and downstream fixes (#29664)
Partition docs are not a documentation fragment, so they need to
be added
(cherry picked from commit a36ebd979d)
2017-09-11 15:36:51 -07:00
Jordan Borean
e842ac4e3f win_unzip: added support for Server core by using .net zip functions (#29272)
* win_unzip: added support for Server core by using .net zip functions

* fixed unzip behaviour with folders

(cherry picked from commit 5623e679b8)
2017-09-11 15:35:11 -07:00
Sloane Hertel
c3bf59eb79 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 14:37:30 -07:00
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
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
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
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
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
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
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
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
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
dbc7444376 fix check mode for solaris enable/disable (#29049)
(cherry picked from commit 7804049592)
2017-09-06 18:11:57 -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