Commit graph

951 commits

Author SHA1 Message Date
Nathaniel Case
409c46b2fa
Properly handle check for session support on eos (#56407)
* Properly handle eos session check.

* Why is eos_use_sessions an int?

* Add changelog
2019-05-16 10:44:22 -04:00
Gonéri Le Bouder
a4f08617d4 VMware: vmware_datastore_maintenancemode: check params (#56515)
Check the `datastore` parameter and raise an error if nothing has been
found.
2019-05-16 19:52:17 +05:30
Gonéri Le Bouder
216260cbb4 VMware: vsphere_copy: ability to target an esxi instance (#55930)
*`vsphere_copy` was only able to interact with a vCenter instance. This
patch change that.
* In addition, it also makes use of the `vmware_argument_spec`.

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-16 10:40:07 +05:30
spidermila
ca7ff2ad05 VMware: return info about SCSI controller in vmware_guest_disk_facts (#56442)
vmware_guest_disk_facts module added bus number of the SCSI controller to the output
2019-05-16 10:27:17 +05:30
Brian Coca
183ba93ba3
removed previouslly deprecated settings (#55662)
* removed previouslly deprecated settings

  fixes #55304

* also removed from play context
2019-05-15 16:36:30 -04:00
Adam Miller
666dfdc551 YUM - handle enable of non-existent repo (#53286) 2019-05-15 08:45:54 +02:00
Jordan Borean
fd65f037f8
winrm - fix failure parsing for send input errors (#56245) 2019-05-14 19:55:41 -04:00
Martin Krizek
826b99d4bd dnf: fix wildcard matching for state: absent (#56013)
* dnf: fix wildcard matching for state: absent

Fixes #55938

* Add changelog...

* Fix sanity check failure...
2019-05-14 17:34:10 -04:00
Brian Coca
674a57c3fa
fix module defaults (#56020)
* fix module defaults

 - corrected precedence (specific module > group)
 - made into reusable function
 - use from gather_facts/service/package to match 'actual module used'
2019-05-14 09:59:18 -04:00
Tzur Eliyahu
ef0851dcd4 IBM_Storage: fixed a bug - Unwanted arguments cause failure (#56357)
* IBM_Storage: fixed a bug which caused several of our modules to pass unwanted arguments and fail

* IBM_Storage: Added a changelog for 56357 bug
2019-05-13 12:41:06 -04:00
Miguel Duarte Barroso
c6a8e99d34 Added the mtu property to the os_network module (#55881) (#54730)
The networking API v2 specification, which is implemented
by openstack neutron, features an optional MTU parameter that
allows operators to specify the value for the maximum
transmission unit value.
2019-05-12 10:26:27 +02:00
Bill Dodd
1a6b95a8f1 redfish: Add If-Match ETag header to PATCH requests (#56150)
* add If-Match ETag header to PATCH requests

* add changelog fragment

* ensure header keys are lowercase

* fix dict comprehension for python 2.6 and earlier
2019-05-12 10:24:07 +02:00
Abhijeet Kasurde
7e6be4e634
VMware: vmware_guest_disk support for use_instance_uuid (#56107)
All vmware_guest_* module support for use_instance_uuid from Ansible 2.8,
somehow vmware_guest_disk missed from this change.
This fix adds support for use_instance_uuid in vmware_guest_disk.

Fixes: #56021

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-11 11:58:13 +05:30
Abhijeet Kasurde
9f86257a65
VMware: support folder param in vmware_vm_facts (#56298)
folder can be used as a filter while gathering facts about VMs.

Fixes: #56125

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-11 11:56:57 +05:30
Lars Kellogg-Stedman
61e476b908 connection/docker: add privilege escalation support (#55816)
As described in #53385 (and #31759), the docker connection driver did
not support privilege escalation. This commit is a shameless
cut-and-paste of the privilege escalation support from the `local`
connection plugin into the `docker` plugin.

Closes: #53385
2019-05-09 15:02:53 -04:00
Sloane Hertel
463a7ff5ca [rds_instance] don't hardcode license_model choices (#53409)
* Don't hardcode license_model choices
2019-05-08 22:01:57 +05:30
Strahinja Kustudic
a5b6a161b5 sysctl will now return an error if the value is invalid (#55695)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

* Add changelog fragment for sysctl
2019-05-08 11:34:55 -04:00
Brian Coca
deae5b1bce
remove deprecated get_md5 from stat (#55659)
* remove deprecated get_md5 from stat

  fixes #55309

* removed get_md5 from tests involving stat

* keep get_md5 but hide it

* rst it

* ammended comment

* ws

* added ignore for hidden md5
2019-05-08 10:45:45 -04:00
Will Thames
cd95843ea5 Make ansible adhoc work with include_role (#56163)
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc
2019-05-08 09:53:24 -04:00
Bojan Vitnik
2a39dc84b7 XenServer: Minor changes and fixes in xenserver_guest (#55678)
* XenServer: Minor changes and fixes in xenserver_guest

 - xenserver_guest module: ignore wait_for_ip_address when
   state=absent (fixes #55348). Module docs are updated to reflect this.
 - xenserver_guest module: show proper error message when maximum number
   of network interfaces is reached and multiple network interfaces are
   added at once (fix for changes introduced in #54697).
 - xenserver_guest module: fixed a bug in reconfigure() where VM would
   be powered off even though check mode is used when reconfiguration
   needs VM to be powered off.

* Added changelog fragment
2019-05-08 09:03:44 -04:00
Andrea Tartaglia
5a6f888036 ec2_instance: Force int when ebs.volume_size or ebs.iops is specified (#55716)
* Force int when volume_size is specified

* changelog

* both volume_size and iops must be int

* updated changelog fragment
2019-05-08 22:10:58 +10:00
James E. King III
1462fd740b ec2_instance fix name idempotency (#55224) 2019-05-08 10:07:18 +01:00
Felix Fontein
7a957ba64a openssl_certificate: fix passphrase handling for cryptography backend (#56155)
* Make sure passphrase is bytes string.

* Fix typo.

* Add more passphrase tests.

* Fix test names.

* Add changelog.
2019-05-07 23:58:15 -04:00
Abhijeet Kasurde
193f69064f
VMware: remove duplicate implementation of memory reservation (#56161)
mem_reservation and memory_reservation has redundant implementation.
Combining them together.

Fixes: #54335

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-08 08:44:30 +05:30
Anatoly Pugachev
6e73150244 refactor iscsi network facts module, remove external grep call, add unit test (#55643)
* remove external grep call and parse with python
* use function for repeated code
* use module.get_bin_path() for iscsiutil on HPUX
* some code opt for HPUX
* clean up non-module code, module being defined is a requirement for this code
* import get_bin_path() directly and use without module prefix
* Add integration tests for AIX and HP-UX
* add changelog fragment
* Apply suggestions from code review
Co-Authored-By: mator <matorola@gmail.com>
* Apply suggestions from code review #2
Co-Authored-By: Sam Doran <sdoran@redhat.com>
* Remove strict requirement on executable to exist for get_bin_path() as
it will allow facts gathering to continue without an error. Almost all
other files under facts do not have "required=True" (except 2 files,
which should be probably fixed). And check return value for
get_bin_path() , before run attempt.

* add check for AIX lsattr run_command return code
2019-05-07 12:26:20 -04:00
Abhijeet Kasurde
2007a79952
VMware: Add managed object id in VM facts (#53523)
Fixes: #53372

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-05-07 17:05:38 +05:30
Benjamin MALYNOVYTCH
f90398a31d mysql_user: fix regression (#55292) 2019-05-06 16:25:43 +02:00
Gonéri Le Bouder
23e63c9237 vmware: check the SSL certification
If `validate_certs` is enable, we now validate the server SSL
certificate.
2019-05-06 09:15:16 -04:00
Felix Fontein
f692261ea0 oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.
2019-05-05 06:13:55 -04:00
Gonéri Le Bouder
223321e7e2 vmware_datastore_facts: empty list if none found
When `vmware_datastore_facts` does not fine any datastore, it raises an error.
This is not consistent with the other _facts modules. It should just return
an empty list instead.
2019-05-03 18:29:00 -04:00
Felix Fontein
95d1564f70 docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.
2019-05-03 11:30:39 -04:00
flowerysong
2ef8b297ff Fix loading namespaced doc_fragments from collections (#55249)
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry
2019-05-02 21:15:57 -04:00
Sloane Hertel
47b2cb748b Allow config boolean options to default to None (#55951)
* Allow plugin boolean options to default to None

* fix mistake

* changelog

* be more specific
2019-05-02 12:09:14 -07:00
Brian Coca
24a46deef5
Package facts apt fix (#55963)
* fixes for apt on package_facts

* reverse order, apt is newer

* moved warnings prop to base
2019-05-01 22:11:12 -04:00
Hideki Saito
c455635500 Fix firewalld source option handling to be exclusive (#55715)
- Fix issue #55683
- Add integration test for source option of firewalld module

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-05-01 17:47:47 -04:00
Brian Coca
5d4c73e197 unite poll defaults (#55470)
* unite poll defaults and update docs
2019-05-01 13:47:50 -05:00
Kevin Breit
a89a2cf33f meraki/meraki_network - Enable/disable VLANs on network (#48820)
* Redo branch to fix merge commit

* Add changelog fragment

* Make VLAN settings idempotent

* Fix conflict

* Change `version_added` to 2.9 instead of 2.8.
2019-05-01 12:24:39 -04:00
Jordan Borean
cc3b8b9f72
win_acl - fix network path qualifier parsing (#55970) 2019-05-01 17:21:26 +10:00
Jordan Borean
5228133d74
Ansible.Basic - fix when deserialising a json string of an array (#55691)
* Ansible.Basic - fix when deserialising a json string of an array

* Added changelog fragment
2019-05-01 11:08:23 +10:00
jhawkesworth
0e8a77520c Refactor of win_xml (2nd attempt) to add support for processing multiple nodes and counting nodes matched by xpath (#53362)
* add multi-node manipulation, delete on xpath match only and count capability to win_xml

* fix pep8 and yamllint errors identified by ci tests

* fixed bugs when handling multiple elements, multiple attribute nodes and handling for attribute nodes when using xpaths that only select attributes like //@lang.  Added more tests and tweaked documentation.

* fixed line-too-long error

* fixed trailing space errors

* trailing whitespace expunged

* bump version_added to 2.9 for new changes

* fix PSAvoidUsingPositionalParameters sanity check failure

* refix sanity check as it broke the msg return value
2019-04-30 13:19:56 -07:00
Martin Krizek
f37476e247 template lookup: restore variables between calls (#55126)
* template lookup: restore variables between calls

Fixes #55113

* Address issues from the review
2019-04-30 15:22:37 -04:00
Matt Clay
9961d02547 Fix changelog sanity test failure. 2019-04-30 09:04:59 -07:00
Brian Coca
45d21b6474 Fix and refix help text for CLI (#55831)
fixes #23395 giving clearer information on installed role path
  re-fixes 'home display issue' for module-path
2019-04-30 11:16:26 -04:00
Sloane Hertel
11279a909d fix combine filter using undefined vars (#55840)
* Check variables are defined before using combine filter

* Add tests for the combine filter

* Remove dependencies that should already be installed

* relocate the function to recursively check for undefined vars

add another test

* changelog
2019-04-30 11:10:19 -04:00
James Cammarata
c4004b5fb1
Adding changelog for fix to issue #55515 (#55928) 2019-04-30 09:09:08 -05:00
Brian Coca
815a375177
allow empty plays again, for now (#55878) 2019-04-29 17:59:10 -04:00
Martin Krizek
8e82baba4a
zfs: deprecate key=value 'option' (#55699)
* zfs: deprecate key=value 'option'

Fixes #55318

* Not needed to ignore these anymore
2019-04-29 08:07:22 +02:00
Brian Coca
05fcb8502f
options not optional for callbacks (#55660)
fixes #55305
2019-04-25 22:22:06 -04:00
Matt Martz
2732cde031
Support using importlib on py>=3 to avoid imp deprecation (#54883)
* Support using importlib on py>=3 to avoid imp deprecation

* Add changelog fragment

* importlib coverage for py3

* Ansiballz execute should use importlib too

* recursive module_utils finder should utilize importlib too

* don't be dumb

* Fix up units

* Clean up tests

* Prefer importlib.util in plugin loader when available

* insert the module into sys.modules

* 3 before 2 for consistency

* ci_complete

* Address importlib.util.find_spec returning None
2019-04-25 10:28:18 -05:00
Martin Krizek
1a6df99aa5 apt: strip whitespaces in package names (#55750)
Fixes #55741
2019-04-25 15:29:26 +02:00