Commit graph

44289 commits

Author SHA1 Message Date
Sam Doran
3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
2019-04-09 13:17:59 -04:00
Ondra Machacek
97f706810c kubevirt: Fix labels assignemt (#54852) 2019-04-09 18:58:44 +02:00
Brian Coca
5f69ab7f46 Better test for cache method availability (#54740)
* Better test for cache method availability

  fixes #54737

* try and ignore missing method

* avoid plugin cross contamination

* ammend clog
2019-04-09 09:32:11 -07:00
Benjamin MALYNOVYTCH
9c5275092f mysql_user: fix compatibility issues with various MySQL/MariaDB versions (#45355)
* mysql_user: fix MySQL/MariaDB version check

To handle properly user management, version check needed refacto, as well as the query used to get existing password hash

* mysql_user: break long query in multiple lines

* mysql_user: fix query fetch existing password hash

* mysql_user: MariaDB version check 100.2 != 10.2

* mysql_user: fix existing password fetch

In some cases, both columns (Password and authentication_string) may exist and be populated.
In other cases one exist, but not the second.
This fix should handle properly all situations

* mysql_user: break long queries

* mysql_user: refactor duplicated code

* mysql_user: handle updates from root with empty passwd to new passwd

* mysql_user: GC debug statement and readd trailing new line

* mysql_user: fix pep8 under indentation

* mysql_user: fix privileges management
https://github.com/ansible/ansible/pull/45355#issuecomment-428200244

* mysql_user: raise exception if exception caught doesn't match the one that is managed

* mysql_user: improve plugins output (add msg field with explicit informations)

* mysql_user: fix old / new password hash comparison

* mysql_user: fix reference to old MySQLdb lib

* mysql_user: fix cursor when root password is left empty (mysql DB invisible)

* mysql_user: add changelog

* ALL privileges comparison

* fixed blank line

* added mysql 8 fixes

* fixed version compatibility

* mysql_user: fix MySQL/MariaDB version check

To handle properly user management, version check needed refacto, as well as the query used to get existing password hash

* mysql_user: break long query in multiple lines

* mysql_user: fix query fetch existing password hash

* mysql_user: MariaDB version check 100.2 != 10.2

* mysql_user: fix existing password fetch

In some cases, both columns (Password and authentication_string) may exist and be populated.
In other cases one exist, but not the second.
This fix should handle properly all situations

* mysql_user: break long queries

* mysql_user: refactor duplicated code

* mysql_user: handle updates from root with empty passwd to new passwd

* mysql_user: GC debug statement and readd trailing new line

* mysql_user: fix pep8 under indentation

* mysql_user: fix privileges management
https://github.com/ansible/ansible/pull/45355#issuecomment-428200244

* mysql_user: raise exception if exception caught doesn't match the one that is managed

* mysql_user: improve plugins output (add msg field with explicit informations)

* mysql_user: fix old / new password hash comparison

* mysql_user: fix reference to old MySQLdb lib

* mysql_user: fix cursor when root password is left empty (mysql DB invisible)

* mysql_user: add contrib

* Rename changelogs/fragments/45355-mysql_user-fix-versions-compatibilities to add YML extension
2019-04-09 16:26:45 +01:00
Matt Martz
fbf2d5d2f4
Don't pollute include_variables (#54687)
* Don't pollute include_variables. Fixes #51667. Fixes #54618.

* Rename include_variables to include_args, so we can make the distinction about what they are

* Track args and vars separately

* oops

* oops again

* linting fix

* Add test
2019-04-09 10:14:42 -05:00
Kevin Subileau
dd20c7c04e win_nssm: fix typo in documentation (#54942)
Fix a typo in the win_nssm documentation after PR #45693
2019-04-09 10:12:37 -05:00
Abhijeet Kasurde
b142b6f0e8 Move changelog entries to fragments directory (#55017)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-09 10:12:46 -04:00
Simon Dodsley
42af1a58e0 Fix bug in purefa_volume that errors on volume create (#55039) 2019-04-09 09:29:18 -04:00
Hideki Saito
377fba3d76 Fix handling of inventory and credential options for tower_job_launch (#54967)
- Fixed issue #25017,#37567
- Add example for prompt on launch
- Add integration test for prompt on launch

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-04-09 14:08:11 +01:00
Andrey Klychkov
5cbac14469 New module postgresql_owner: change ownership and reassign all db objects owned by role to another (#54984) 2019-04-09 13:32:09 +01:00
Nabeel Al-Saber
07b9f52fd5 Initial commit for Oracle Cloud Infrastructure modules (#53156)
* Initial commit for Oracle Cloud Infrastructure modules

* Update oci_utils based on review comments

- remove has_user_provided_value_for_option
- remove required false
2019-04-09 07:59:31 -04:00
Raymond Roelands
8edae1bc61 updated tests and changelog for 54516 (#54670)
* updated tests and changelog for 54516

* Handle errors if PG does not support partitioning.

* Check for PG > 10 in tasks

* Show changes for partitioned tables in ansible

* Added documentation in the tests

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Added check for 0 tables after revoking rights

* Added test and moved tests
Added check mode test and moved test right after the change.

* Rebased postgresql_privs.py
2019-04-09 13:30:06 +02:00
Felix Fontein
bb52390b04 luks_device: add basic check mode (#54477)
* Add basic check mode.

* One more early exit.

* Fix naming.

* Check that device is actually an existing device.
2019-04-09 11:32:22 +02:00
Abhijeet Kasurde
1ed8ed766c hpilo: Handle connection error in hpilo_facts (#53952)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-09 04:36:53 -04:00
Yunge Zhu
cb2972d647
refine role modules (#55021) 2019-04-09 16:05:03 +08:00
Christopher Snyder
09f68fc659 redhat_subscription: Fix usage of ConfigParser (#54815) 2019-04-09 09:36:51 +02:00
Felix Fontein
0a0a2e47e0 Add openssl_csr_info module (#54921)
* Add openssl_csr_info module.

* Make OpenSSL < 1.1 compatible.

* Simply remove signature algorithm.

* Adjust minimal version.

* Fallback code for some pyOpenSSL < 16.0 versions.
2019-04-09 12:48:22 +05:30
Kickimanjaro
4bb5a91acc Docs: Added missing backtick in become (#55012)
Added missing backtick to make eos pretty
2019-04-09 10:46:06 +05:30
Gonéri Le Bouder
bda0687d28 vmware_host: ensure idempotency with state=absent (#54608)
If a host is already missing, `self.host_update` is `None`. With
this change,`state_exit_unchanged()` won't try anymore to access
`self.host_update.runtime`.
2019-04-09 01:04:47 -04:00
Zim Kalinowski
656ca13f65
adding application gateway support to vmss (#54973) 2019-04-09 10:31:34 +08:00
Matt Clay
d5707088b9 Mark ufw integration test unstable.
The test fails when run in the group, but not by itself.
2019-04-08 16:34:55 -07:00
Jason Witkowski
87f8e37c2c Fix for neither LaunchConfigName nor LaunchTemplate existing on object (#54692) 2019-04-09 09:00:51 +10:00
Ondra Machacek
4b22240edd kubevirt: Update kubevirt team (#54776) 2019-04-08 22:54:25 +02:00
Varun Chopra
4651bcf561 Add win_format (#53925)
* Add win_format

* Some doc changes were missed

* Fixes for ansible-test, additional assertion for check mode

* Fix -WhatIf issues

* Support for idempotency and changes to integration tests

* Fix trailing whitespace

* Fixes from review, and added check for non-empty volumes

* Remove an extra line

* Structural changes

* Minor fixes for CI
2019-04-09 06:45:04 +10:00
Sam Doran
6761fc1475
Update distro unit test (#55003)
Remove test comparing output to platform.linux_distribution() since we are relying on distro.id() and are not concerned about matching the output of platform.linux_distribution()
2019-04-08 16:26:31 -04:00
Matt Clay
58f4947ffe Fix apache shutdown in subversion test. 2019-04-08 10:33:35 -07:00
Alan Rominger
d930eaf7d8 Use six.moves to import configparser in cloudforms script (#54465) 2019-04-08 13:15:17 -04:00
Bojan Vitnik
b27c4caa49 XenServer: Minor bug fixes 2 (#54697)
- xenserver module_util: fixed comment in set_vm_power_state().
 - xenserver module_util: renamed cdrom.iso VM fact to cdrom.iso_name
   in gather_vm_facts() to be in line with module parameter of same name.
 - xenserver module_util: sorted IPv6 addresses by their OS index
   in gather_vm_facts().
 - xenserver_guest module: fixed a bug in deploy() where an error message
   would not be shown when VM name is empty and check mode is used.
 - xenserver_guest module: fixed a bug in destroy() where VM would be
   shut down by error when check mode is used.
 - xenserver_guest module: fixed a bug in get_changes() where wrong
   out-of-bound disk position would be shown in error message when
   CD-ROM device occupies last position.
 - xenserver_guest module: assume value "none" for "networks.type" and
   "networks.type6" module parameters in get_changes() when no value is
   found in xenstore_data (custom customization agent).
 - xenserver_guest module: added separate error message in get_changes()
   for a case when maximum number of network interfaces is reached.
 - xenserver_guest module: negative value for disk size in
   get_normalized_disk_size() now properly shows an error.
2019-04-08 12:27:02 -04:00
Andrew Lohr
a0fade797b "with in" changed to "within" (#54990)
The correct way to write "within" is without a space between "with" and "in"
2019-04-08 11:25:03 -05:00
Sumit Jaiswal
0ff689a315
Resolves handling of error and failure scenarios from Checkpoint module end (#54890)
* handle failure case

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

* handle failure case

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

* handle failure case

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-04-08 21:37:52 +05:30
Matt Martz
56ae8ebd60 Don't swallow exceptions when processing included files (#54791)
* Don't swallow exceptions when processing included files. Fixes #54786
2019-04-08 12:03:22 -04:00
Hannes Ljungberg
17776142d1 Extend state option documentation (#54989) 2019-04-08 11:36:56 -04:00
Jim Ladd
17d78553ee Add options for configuring memory / pid polling interval (#54936) 2019-04-08 09:18:37 -05:00
Felix Fontein
7d27348356 ufw: fix default, direction is not necessary for it (#54799)
* Correct behavior so that direction isn't required for default.
* Add more tests.
* 'disabled' values cannot be changed.
* Include 'not specified' in messages.
2019-04-08 08:49:35 -04:00
Chris Archibald
c6f12eea32 push fix (#54916) 2019-04-08 13:11:42 +01:00
Felix Fontein
e079758b31 Move refactoring steps from #54635 to own PR. (#54690) 2019-04-08 12:59:55 +01:00
Ruben Tsirunyan
97ac03f613 zabbix_action: Checking event source for 'pause_suppressed' parameter (#54951) 2019-04-08 04:43:27 -04:00
Ruben Tsirunyan
0fe63ec2d6 zabbix_action: Fixing the default message checking (#54953) 2019-04-08 04:43:15 -04:00
Robert Osowiecki
1532e31ec0 Allow all of yum version compare operators (#54603)
* Allow all of yum version compare operators

* * yum: name="foo >= VERSION" integration test
* changelog fragment
2019-04-08 10:34:21 +02:00
Felix Fontein
221da3e8b1 Implement Ed25519, Ed448, X25519 and X448 support (cryptography backend). (#54947) 2019-04-08 10:30:05 +02:00
Felix Fontein
7a16703dff Add openssl_privatekey_info module (#54845)
* Add openssl_privatekey_info module.

* Addressing review feedback.

* Update docs.

* Update tests.

* Work around too broad sanity checks.

* ...

* Don't die when None is returned.

* Use OpenSSL to extract RSA and DSA key data.

* Extend tests.

* Make OpenSSL code compatible to OpenSSL < 1.1.

* Rewrite tests to use result dicts instead of result lists.

* Skip ECC for too old PyOpenSSL.

* Reformulate.

* Improve return_private_key_data docs.

* Rename path_content -> content.

* Add sample.

* Cleanup.

* Add key consistency check.

* Improve description.

* Adjust minimal version.

* Fallback code for some pyOpenSSL < 16.0 versions.

* Also support Ed25519 and Ed448 keys (or not).

* Add more consistency checks.

* Verify DSA keys manually.

* Improve DSA key validation.

* Forgot one condition.

* Make validation more robust.

* Move generic arithmetic code to module_utils/crypto.py.
2019-04-08 10:07:56 +02:00
Felix Fontein
4503426f32 Fix some formatting. (#54952) 2019-04-08 02:17:36 -04:00
Anil Kumar Muraleedharan
f5d97205a0 The module fails on switchport. Check added to fix. (#54970) 2019-04-08 10:41:36 +05:30
MyronFanQiu
e3c79979c2 support caching options (#51387) (#54710) 2019-04-08 11:41:53 +08:00
Zim Kalinowski
ea609c3492
adding plan and container settings to function app (#54830) 2019-04-08 11:05:21 +08:00
Zim Kalinowski
3be01cce33
fix poller for some resources (#54853) 2019-04-08 09:41:10 +08:00
Tyler Schwend
684b749e47 fix: Don't fail if updating Kinesis stream Shard count; We support this! (#54530)
This added support for increasing shard count:
https://github.com/ansible/ansible/pull/24805

But the conditional to fail if you have specified a shard count other 
than the current shard count was still left in.

This removes that conditional since it's no longer needed and prevents 
you from actually updating things!
2019-04-08 10:59:31 +10:00
Felix Fontein
b92281fe70 Simplify test include. (#54962) 2019-04-07 16:51:14 -04:00
William Leemans
993727ff5e New module: xfs_quota (#51654)
* New module: xfs_quota

* wildcard import resolution

* pep8 fixes

* validate-modules fixes

* pep8 and validate-module fixes

* removal of extra copyright info

* description capitalization and trailing dot

* Some more description

* type specification

* removal of notes

* reorder imports

* sorting

* starting with variable type

* removal of defaults

* results to dict

* results to dict

* complete condition

* removal of spaces for pep8 compliancy, removal of root check, addition of tests for failed xfs_quota commands indicating the need for elevation/capabilities

* lost result

* typo

* historical override removal

* report back values

* unexpected spaces removal

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* typo

* raw data, full data

* removal of several else: statements and indentation

* pep8

* typo

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* typo

* use bytes as base, not kilobytes

* be consistent

* integration tests

* lint

* empty lines

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* updates

* ci group

* XFS not supported on osx

* XFS not supported by freebsd

* long lines and removal of xfs_quota dict in return

* RETURN values

* no more xfs_quota dict
2019-04-07 20:11:32 +01:00
Keith Maxwell
889024e101 Clarify example for fileglob lookup plugin (#54941)
fileglob returns a list of paths it does not return file contents, as explained in latest notes. The file lookup retrieves file contents. This change clarifies the first example to make it clear a paths, not contents, are returned. 

It also adds spaces around the lookup to avoid E206 from ansible-lint: "Variables should have spaces before and after: {{ var_name }}"

+label: docsite_pr
2019-04-07 16:24:48 +01:00