Commit graph

24976 commits

Author SHA1 Message Date
Brian Coca
ad57efff8f
[WIP] force install role and its deps (#49347) 2019-01-23 12:34:26 -05:00
Brian Coca
42c35a2e01
parallelize getting mount info (#49398)
* parallelize getting mount info

* fixed timeout and made 8 max thread count

  - minor cleanup
  - avoid empty mount entries
  - set timeout on get
  - enforce timeout per mount/thread
  - make note on failure per mount
  - make note on timeout per mount
  - ensure proper pool control
  - minor fixes
  - less vars, simpler code
  - move filter 'pre threading'
  - remove timeout for all mounts, now per mount
  -  also use cpu count from multiprocessing lib
  -  moved 'bind' options out of thread as per comments
  - warn on error, more info on failure to get info
2019-01-23 12:33:59 -05:00
Brian Coca
960388143f
faster config loading (#48333)
* faster config loading

  - used already loaded module var instead of doc functions
  - add preload to populate config defs cache
  - avoid debug work when not in debug
  - generators, force consumption
2019-01-23 12:06:54 -05:00
Sam Doran
9d4c0dc111 Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776)
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure

Use comparison rather than range() because it's much more efficient.

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Make paramiko_ssh connection plugin behave the same way

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add changelog

Signed-off-by: Sam Doran <sdoran@redhat.com>
2019-01-23 11:32:25 -05:00
Brian Coca
b6824669df
Handle complex quoting in extra args in pull cli (#50212)
* Handle complex quoting in extra args in pull cli

fixes #40729
2019-01-23 10:58:37 -05:00
Sumit Jaiswal
4049e33817
PR to implement support feature for creating NIOS network container (#51168)
* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-01-23 19:21:00 +05:30
Peter Oliver
9edeb19354 Populate product_name and system_vendor facts on Solaris (#44114)
* Populate product_name and system_vendor facts on Solaris

* Add QEMU as Solaris "hardware" vendor.

* Lint fix.
2019-01-23 13:51:23 +01:00
Felix Fontein
d2c4f57f16 docker_service: rename to docker_compose. (#51035)
* Rename docker_service -> docker_compose.

* Added changelog.

* Update scenario guide.

* Clean up module.
2019-01-23 12:21:57 +00:00
Eike Frost
3c39c5d456 keycloak_client: fix ansible diff/changed (sorting, null-values) (#39515)
* - Fix sorting bug related to diff (attributes is sorted in the API, other lists are not)
- Remove null-valued entries from protocolMappers introduced by Ansible's argument spec checking (also fixes diff output).

* python2.6-ified dict comprehension

* avoid use of map
2019-01-23 03:53:07 -05:00
Olivier BLIN
87a01df6ad Fix 'defaults' option in the nxos_config module (#51076)
* Fix 'defaults' option in the nxos_config module

Nxos get_config is allways called with the 'all' option.
* Fix flag's calculation
* Add tests

* nxos_config: the 'backup' option take into account the value of 'defaults' option

If 'defaults' option is true, the running-config backup is done with the all
keyword.
2019-01-23 11:29:27 +05:30
Dag Wieers
7eab04e975 Required changes for zfs_delegate_admin (#51202)
* Required changes for zfs_delegate_admin

As discussed when merged.

* Sanity fixes
2019-01-22 21:04:23 -08:00
linnil1
dabdf171c5 Feature junos filter (#44703)
* Add filter in l3_interface

* Add filter in vlan

* Add filter in l2_interface

* Update version to 2.8
2019-01-23 09:36:24 +05:30
Smithx10
e7a113a70f New Module for SmartOS: nictagadm (#35919)
* added nictagadm functionality for smartos

* Added mac address assertion and mutex's for etherstub params

* removed old commented code

* Responding to ansibot lint

* Responding to ansibot lint underscore

* doc wording, if rc to return rc

* Version Added bump to 2.6

* Grammer Fix

* match documentation with the arg spec

* removed default from Options since None evidently is 'None'

* Guessing to please the linter, No documentation

* Various changes

* PEP8 fixes
2019-01-23 04:57:46 +01:00
Nate Coraor
64b57908bc A module for managing ZFS admin privileges (#19240)
* Create a module for managing ZFS admin privileges

* Actually support check mode in zfs_permissions

* Fix Python 2.4 invalid syntax

* Update added_version to 2.1

* Remove superflous sys.exit() and add an empty RETURN doc (empty because the module does not return anything other than status-related stuff)

* Update version_added since zfs_permissions was not accepted in 2.1.

* - Rename zfs_permissions to zfs_delegate_admin to more accurately reflect
  its purpose.
- Update with current Ansible module best practices.
- Stop checking whether changes need to be made (this was flawed since
  it was not able to detect whether, for example, changes would be made
  with `local=True` when the permissions already existed for
  `Local+Descendent`. Instead, just make the changes (`zfs allow` is
  idempotent) and compare the state before and after.
- Generally write things in a better way.

* Fix test errors

* Fix more tests.

* Catch exceptions when parsing `zfs allow` output. At least on one
version of ZFS (on a 2016 version of illumos) will have a single space
in the user or group column if the name can't be resolved by the
system's name services).
2019-01-23 03:51:06 +01:00
Dag Wieers
d2c739e9e7 A few small cosmetic changes 2019-01-22 20:03:03 -05:00
Julian Paul Dasmarinas
0622f387c4 Provide a boolean switch to enable/disable publisher refresh 2019-01-22 20:03:03 -05:00
Matt Davis
2cb9ec9f0e fix include_vars non-ASCII error handling (#51198) 2019-01-22 19:35:34 -05:00
Jordan Borean
419727a6da
file - allow touch on files not owned by user (#50964)
* file - allow touch on files not owned by user

* use Sentinal value and preserved existing args

* Do no instantiate the Sentinel object
2019-01-23 10:14:59 +10:00
Brian Coca
8fd0fbe431 remove usless tb initiator
always pass proper tb
2019-01-22 17:33:20 -05:00
AlanCoding
f018b9d07d Fix missing tracebacks in ansible-inventory
(cherry picked from commit b62693299b)
2019-01-22 17:33:20 -05:00
Aaron Smith
214b4407aa Adding digital_ocean_space alias for s3_bucket module (#39774)
* Adding digital_ocean_space alias for s3_bucket module

* skipping alias to see if doc-build test passes

* undoing last change

* removing symlink

* oops -- readding module ref

* removing more of my changes

* removing unneeded doc line

* correcting another mistake
2019-01-22 21:13:03 +00:00
Dag Wieers
6c6b088bde shell: Improve documentation (#51109)
* shell: Improve documentation

This PR includes:
- Adding parameter types
- General improvements

* Update lib/ansible/modules/commands/shell.py
2019-01-22 21:58:12 +01:00
Jonathan
20936bbc3d module mongodb_user fix roles default value (#46443) (#46526)
* module mongodb_user fix roles default value (#46443)

* mongodb_user remove ignoring test E324

* mongodb_user add changelog (#464443)

* mongodb_user change doc to set parameter roles as None (#464443)

* mongodb_user fix lint in changelog fragment (#464443)

* mongodb_user : remove E325 exception in test
2019-01-22 15:57:49 -05:00
MarkusTeufelberger
c1bc556b0a Relative time support for crypto modules (openssl_certificate) (#50570)
* Move relative time handling to module_utils and rewrite it

* Fix cases with no seconds defined

* fix a small typo along the way

* add relative time handling to the ownca provider in openssl_certificate

* add initial integration test for relative time ownca

* quote the documentation to produce valid yaml

* move timespec conversion and validation to the init function

* fix small edge case in conversion function

* add relative timestamp handling to the selfsigned provider

* add get_relative_time_option

* add relative timestamp handling to valid_in

* pep8 fix indentation

* add quotes in error message

* add changelog fragment

* Update changelogs/fragments/50570-relative_time_crypto.yaml

Co-Authored-By: MarkusTeufelberger <mteufelberger@mgit.at>
2019-01-22 20:41:02 +00:00
Abhijeet Kasurde
7561aaf619 Update documentation for ignore_unknown_extensions (#50383)
* Example updated
* Testcase added

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-01-22 12:56:10 -05:00
dan
b005854672 copy module "dest" parameter is not only absolute (#50974)
We should explain the danger of using relative paths, but we should not
say they aren't allowed. Relative paths work and are useful, but the
caveat is that the starting point can't be guaranteed by ansible. This
commit adds that note, and removes the claim that only absolute paths
are accepted.
2019-01-22 17:59:12 +01:00
Andreas Mosti
fdcc2c233e Clarify usage of version-variable in win_chocolatey documentation (#50769)
removed trailing whitespace, corrected text
2019-01-22 17:39:27 +01:00
rajaspachipulusu17
61a342f0bb Pluribus Networks admin syslog modules with unit tests (#50596) 2019-01-22 22:00:12 +05:30
Nathaniel Case
9702893729
Remove deprecated options from modules (#50246)
* Remove deprecated options from modules

* Update tests

* Add porting guide notes
2019-01-22 09:18:26 -05:00
Nathaniel Case
8d4f7f5b56
Fix stray string in network_cli (#51142)
* Replace loose string that should be a byte string

* Replace byte string literals with string literals

* These, on the other hand, need to be byte strings
2019-01-22 09:07:04 -05:00
Isaac Beckman
335ee5908d IBM_Storage: fix host_add_ports (#49420)
iscsi_name and fcaddress fields are not required by default.
This commit make sure that no exception is thrown if only
on field supplied
2019-01-22 11:05:00 +00:00
Jordan Borean
6c26256945
win_user_profile - new module (#50637)
* win_user_profile - new module

* Fix typo

* Fix 2012 CI issues

* changed bool in docs and revert other test changes
2019-01-22 11:04:22 +10:00
John Nelson
5540d66747 win_chocolatey: Fix hang on missing/required base env vars (#51154)
* win_chocolatey: Fix crash on missing/required base env vars

* Add changelog fragment
2019-01-22 10:13:02 +10:00
Martin Krizek
9ec9f18b13 dnf: allow to operate on file paths (#51080)
Fixes #50843
2019-01-21 17:20:27 -05:00
Jan Sušnik
70a39d358b Docker Network module labels support (#50883)
* Added support for labels for Docker Network

* Fixed missing comma in Docker Network module

* Specified minimal versions for dependencies and added changelog

* Fixes based on suggestions after code review

* Added integration tests
2019-01-21 16:19:34 -05:00
Hannes Ljungberg
e3f61f4480 docker_swarm_service: Add command option (#50984)
* Add command option

* Fix test task name

* Changelog fragment

* Fix indendation

* Add version_added

* Better command description

* Test passing command as list

* Handle invalid command types

* Cleaner command type checking

* Check that all items in command list are strings

* Better error about command list items

* Better type checking errors

* Add tests for command type checking

* Update command tests

* Fix messed up rebase
2019-01-21 16:01:22 -05:00
Hannes Ljungberg
9c44dc371b docker_swarm_service: Fix crash when using configs parameter (#50606)
* Fix crash when using configs parameter

* Don’t add difference for configs set to None

* Add changelog fragment

* Revert "Add changelog fragment"

This reverts commit 8df497e3881d976e7417d2662a167694fbc33147.

* Enable config tests

* Pass empty list of configs to docker

* Properly clean up after all tests
2019-01-21 15:29:00 -05:00
Hannes Ljungberg
393bf5e4b1 docker_swarm_service: Add placement_preferences option (#51082)
* Add placement_preferences option

* Add changelog fragment

* Python 2.6 compat

Python 2.6 compat

* Cleaner check

* Better description

* Don’t compare placement_preferences if None

* Add placement_preferences example
2019-01-21 14:55:26 -05:00
Hannes Ljungberg
7ceb2ac95a docker_swarm_service: Fix publish idempotency when mode is None (#50882)
* Fix publish idempotency when mode is None

* Add changelog fragment

* Python 2.6 compat

* Use self.publish

* Check length of publish before comparing content

* Sort publish lists before zipping

* Enable publish tests

* python3 compat

* Don’t sort by mode as it is not safe

* Document publish suboptions and add them to args

* Add type to publish documentation

* Add choices to publish argument_spec suboptions

* Make tcp the default protocol

* Make documentation reflect protocol default

* Simplify setting mode

* Remove redundant string quoting

* Test order of publish

* Add comment about publish change detection
2019-01-21 14:02:08 -05:00
Hannes Ljungberg
420c24ea55 docker_swarm_service: Use option_minimal_versions (#50609)
* Pass client to detect_usage function

* Use new client argument in detect_usage function

* Use option_minimal_versions

* Add min_docker_api_version

* Skip default since publish is always a list

* Add min Docker API version to module requirements

* Remove redundant keys()

* Move detect_ipvX_address_usage out of __init__

* Check for mode presence in publish ports

* Remove unused import

* Use port.get(‘mode’) to check for falsy values

* Update lib/ansible/modules/cloud/docker/docker_swarm_service.py

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Add force_update to option_minimal_versions

* Detect publish mode better

* Add a trailing comma
2019-01-21 18:45:47 +00:00
Marco Bellaccini
787aa522cf Modified description in nmcli module doc (#50661)
* Modified description in nmcli module doc

The instructions for installing module's dependencies were incomplete.
I copied the CentOS/Fedora part from the examples section, while I figured out myself the Debian/Ubuntu package names.

+label: docsite_pr

* Fix modified description in nmcli module doc

* Fix modified description in nmcli module doc again

* Fix modified description in nmcli module doc LB
2019-01-21 17:20:55 +00:00
Felix Fontein
345011e024 openssl_csr cryptography backend, try II (#50894)
* Revert "Revert "openssl_csr: Allow to use cryptography as backend (#50324)""

This reverts commit bbd2e31e9f.

* Remove more complicated selection copy'n'pasted from openssl_privatekey.

* Add tests for backend selection.

* Add openssl_csr test for arbitrary string commonName.

* Allow to disable commonName -> SAN copying (fixes #36690).
2019-01-21 17:19:05 +00:00
QCU87Z
9169b7d2b9 Update nxos_aaa_server_host.py (#49635)
* Update nxos_aaa_server_host.py

* remove host, username, and password
2019-01-21 10:47:51 -05:00
Daniel Jaouen
c9bc47b354 homebrew_cask - add sudo_password parameter(#46471)
* Fixes #29403: homebrew_cask: Add SUDO_ASKPASS to module.run_command

* homebrew_cask: refactor sudo_password code

* homebrew_cask: more refactoring

* homebrew_cask: use %s instead of string addition
2019-01-21 10:15:40 -05:00
Jihad Dwidari
94ee3712ae Update os_quota.py fixed typo (#50981)
fixed typo, note should be not
2019-01-21 16:09:33 +05:30
Thomas Morin
6ad9f87ce7 Update debug.py (#51041)
Changed "though" to "through"
2019-01-21 15:08:26 +05:30
aaronk1
0d97629e4d Update vmware.py minor typo (#51047)
"supported added" changed to "support added"
2019-01-21 13:52:26 +05:30
rajaspachipulusu17
a38039bbbe Pluribus Networks port cos rate setting module with UT (#50856) 2019-01-21 12:49:31 +05:30
rajaspachipulusu17
213b2e633c Pluribus Networks switch setup module with unit test cases (#50797)
* Pluribus Networks switch setup module with unit test cases

* Module error fix and pep8 standards error fix
2019-01-21 12:48:09 +05:30
Ganesh Nalawade
f547c88ade
Fix connect_timeout config varaible in netconf connection (#51055)
*  Fetch connect_timeout value from get_options()
   instead of play_context
2019-01-21 12:21:09 +05:30