Commit graph

26686 commits

Author SHA1 Message Date
咚咔
72fc11ff13 Fix read vaulted toml inventory (#54226) (#54235) 2019-04-10 09:10:48 -05:00
Andrey Klychkov
d3dae4a444 postgresql_owner: fix doc (#55091)
* postgresql_owner: fix doc

* postgresql_owner: fix doc

* postgresql_owner: fix doc
2019-04-10 14:54:27 +01:00
Lukas Kämmerling
3f579eb68f hcloud: Fix testsuite (#55076) 2019-04-10 15:16:10 +02:00
Andrey Klychkov
a971a0eb80 New module postgresql_slot: Add or remove slots from a PostgreSQL database (#55079)
* New module postgresql_slot

* New module postgresql_slot: fixed sanity

* New module postgresql_slot: fixes

* New module postgresql_slot: fixes

* New module postgresql_slot: fix sanity
2019-04-10 14:12:57 +01:00
Patryk D. Cichy
56c553c55d Proper handling of lower case name for InternalLbVm Service Provider (#55087) 2019-04-10 07:50:08 -04:00
Felix Fontein
c411883618 openssl_* module_utils/crypto.py: add full list of OIDs known to current OpenSSL (#54943)
* Add full list of OIDs known to current OpenSSL.

* Remove hardcoded OIDs.

* UID -> x500UniqueIdentifier

* Reference actual version used.

* Don't normalize to lower-case.

* Change test back.

* Fix typo.

* Apply changes suggested by RedHat legal.
2019-04-10 12:46:10 +01:00
Andrea Tartaglia
0303ea2bfa openssl_pkcs12: Add idempotency checks (#54633)
* Added idempotency logic to openssl_pkcs12

Also decoupled the 'parse' and 'generate' function from the file write
as they are now used in different places that do not need the file to be
written to disk.

* Added idempotency tests for openssl_pkcs12

Also adds a new test for pkcs12 files with multiple certificates

* Regenerate if parsed file is invalid

* pkcs12_other_certificates check was wrong

* Updated ca_certificates to other_certificates

ca_certificates is left as an alias to other_certificates;
friendlyname depends on private key, so it will be ignored while
checking for idempotency if the pkey is not set;
idempotency check only checks for correct certs in the stack

* use different keys for different certs

* Added other_certificates in module docs

* Added changelog and porting guide

* removed unrelated porting guide entry

* renamed ca_cert* occurrence with other_cert
2019-04-10 11:43:08 +01:00
Mikhail Yohman
0b5b353e37 Added update_netbox_object to netbox_ip_address (#55070) 2019-04-10 10:50:24 +01:00
Tobias Rüetschi
ee25c34d00 The Univention modules have a issue with an unassigned variable. (#55083)
The variable diff is only assigned if state is 'present', else the
variable is unused. But the module will return the diff variable as a
return value. If the state isn't 'present' the module will fail with an
python UnboundLocalError exception.
2019-04-10 10:43:56 +01:00
Andreas Calminder
7adfb1f714 os_volume: Modify existing volume (#54905)
* add support for: volume resize, check_mode and diff

* add changelog fragment
2019-04-10 10:41:41 +01:00
Fred-sun
44c2061c70 add the documentation for the ip_tags (#55069) 2019-04-10 16:54:13 +08:00
Dag Wieers
025e9afe58 Windows pslint: Re-enable PSPossibleIncorrectComparisonWithNull (#55065)
* pslint fixes

* Fix up remaining sanity issues

* now fix silly errors I made
2019-04-10 15:30:38 +10:00
Adam Miller
a2eb227970 facts: correctly detect xen paravirt vs hvm cpuinfo (#49320)
* facts: correctly detect xen paravirt vs hvm cpuinfo

Fixes #49039

Signed-off-by: Adam Miller <admiller@redhat.com>

* provide default val if we IndexError

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-04-10 00:17:30 -04:00
Abhijeet Kasurde
98692ab350
VMware: Add check for valid VLAN id range (#55023)
Check allows vmware_dvs_portgroup to fail early if user
specified invalid range in VLAN id(s).

Fixes: #54927

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-04-10 08:09:21 +05:30
Micah Hunsberger
2b049238d6 win_firewall_rule only change arguments passed by user (#54297)
* win_firewall_rule only changes specified arguments
defaults are controlled by com object
integration test for built in rule

* removed ignore psaliases for win_firewall_rule

* direction and action are no longer required
program and service respect default values
documentation updated to reflect that defaults apply to rule creation
added test to disable a rule and verify other values have not changed

* fixed extra whitespace

* Move each description sentance to a new entry
2019-04-10 09:27:31 +10:00
Alex Stephen
5215d00462 return actual error from module logic on gcp_compute (#55055)
* return actual error from module logic on gcp_compute

* changing how the error is presented

* sanity
2019-04-09 18:35:05 -04:00
Dag Wieers
2ae1bdf863 win_region: Fix example (#55058) 2019-04-10 00:06:05 +02:00
Matt Davis
97446f0eca
Revert "Add a force_replace_host flag to win_domain_membership (#53542)" (#55056)
This reverts commit 85d836171b.

As discussed in WWG IRC meeting, we don't want Get-ADObject to be a dependency of win_domain_membership, and we need to be able to authenticate to the DC in some configs. We can revisit this change a different way for 2.9.
2019-04-09 13:52:23 -07:00
Sloane Hertel
ba8b5ec0d3
[ec2] Use user_data if specified (#54494)
* Use user_data if specified

* changelog
2019-04-09 15:52:49 -04:00
Adam Miller
d53c3cd4f2
Force pkg_mgr yum for rhel < 8, dnf for rhel > 8 (#54010)
* Force pkg_mgr yum for rhel < 8, dnf for rhel > 8

This solves the scenario in which someone using RHEL or a clone
decides to install dnf, which can break their system in certain ways
under certain scenarios (a dnf bug that's been resolved upstream but
left user systems broken happened recently). Currently Red Hat
provides dnf to RHEL7 in an optional Tech Preview Channel under the
YUM4 branding, as does the CentOS Content Management SIG. There may
be others in the ecosystem I'm not familiar with.

Signed-off-by: Adam Miller <admiller@redhat.com>

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-04-09 14:32:00 -05:00
The Magician
ccedc85e48 Bug fixes for GCP modules (#55019) 2019-04-09 13:54:08 -04:00
Andrew Gaffney
94154c5f4d Only show a task banner if a diff is found (#55050) 2019-04-09 13:47:12 -04:00
aperrin66
6eedc4d075 Add grants to influxdb_user (#46216)
* add grants management for module influxdb_user

* influxdb_user : add documentation for the "grants" argument
2019-04-09 19:28:32 +02: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
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
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
Jason Witkowski
87f8e37c2c Fix for neither LaunchConfigName nor LaunchTemplate existing on object (#54692) 2019-04-09 09:00:51 +10: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
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
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