Commit graph

499 commits

Author SHA1 Message Date
vpiserchia
774a667591 Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615

* Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
2019-01-07 17:08:01 -05:00
Toshio Kuratomi
27f9c3fba0 Clarify the change made to reverse_inventory 2019-01-07 10:17:06 -08:00
Martin Krizek
6d604f9b01 Allow for vaulted templates in template lookup (#49819)
Fixes #34209
2019-01-07 10:06:01 -05:00
Martin Krizek
82c95e07b5
Fix searchpath in the template lookup (#50488) 2019-01-07 11:33:39 +01:00
Matt Martz
9abeecb6d4
Add new AnsibleTemplateError to more easily catch templating issues (#50563)
* Add new AnsibleTemplateError to more easily catch templating issues. Fixes #50154

* Add changelog fragment
2019-01-04 14:33:05 -06:00
Toshio Kuratomi
40e7c7a210
Add a porting guide entry for ansible_distribution facts (#50251)
* Add a porting guide entry for ansible_distribution facts

Switching away from platform.distro() will cause changes sometimes due
to the new code using new sources of information that may be out of sync
with the old ones.  Just have to make people aware of that and also what
we are doing to mitigate it when appropriate.

* wordsmithed, added links for new distro backend
2019-01-04 10:03:56 -08:00
Jordan Borean
b967f4dcc1 dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option

* skip creating weak dep packages if rpm doesn't support it

* fix rpm check for older hosts
2019-01-04 11:37:59 -05:00
Toshio Kuratomi
afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
2019-01-03 18:12:23 -08:00
Matt Martz
3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
2019-01-03 16:13:02 -05:00
Jordan Borean
63e454a4b2 dnf - fix conf_file loading (#50515) 2019-01-03 15:25:58 -05:00
Abhijeet Kasurde
a45063defe Update changed_when and failed_when examples (#50411)
Added examples in playbooks_error_handling doc for handlining
multiple conditions in changed_when and failed_when

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-01-03 09:50:59 -05:00
Felix Fontein
5c5cd2dc4d openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.
2019-01-03 17:04:46 +05:30
Felix Fontein
a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
2019-01-03 17:04:24 +05:30
Felix Fontein
6b33c588d0 docker_swarm_service: Fix typo for option type (#50483)
* Fix typo for option type in docker_swarm_service.

* Add changelog.
2019-01-03 17:03:59 +05:30
Adam Miller
b81a74f551 add changelog for #50242 (#50480)
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-02 18:16:45 -05:00
Adam Miller
ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-02 17:50:06 -05:00
Felix Fontein
26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
2019-01-01 16:06:45 +00:00
René Moser
e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
2019-01-01 10:11:10 +01:00
Simon Dodsley
507f89e693 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict
2018-12-31 09:22:13 +00:00
Adam Miller
33156712a9 Provide both service state and status when possible in service_facts (#49618)
* Combine systemd units/unit-files output for service_facts

Fixes #47118

Previously we were only taking the output of `systemd units` which
would leave out information about the service units that were
disabled, static, masked, etc. Now we're aggregating the results so
that anything not active/inactive/dead at least is pulled as fact
data with it's state provided.

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

* provide state and status information about services

Fixes #45730

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-12-26 13:24:03 +00:00
Abhijeet Kasurde
fc6c500b5b
postgresql_user: set type of conn_limit (#50178)
conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting.

Fixes: #38118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-22 20:28:56 +05:30
Nathaniel Case
f05979932b
Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc (#48306)
* Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc

* Add changelog
2018-12-21 11:15:18 -05:00
Abhijeet Kasurde
14eba662c8 Correct match test documentation (#50229)
Match test matches zero or more characters at the begining of the string.

Fixes: #32366

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-21 09:38:31 -05:00
Dag Wieers
0fe7d569c9 win_firewall_rule: Remove invalid 'bypass' action (#50207)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
2018-12-21 12:05:28 +10:00
Dag Wieers
50ed152ab9 win_updates: Correctly report changes on success (#50188)
* win_updates: Correctly report changes on success

* Add changelog fragment
2018-12-21 11:44:49 +10:00
Jacob Floyd
069e0b8d57 Make modprobe module check for builtins as well (#37150)
Without this modprobe always reports changed when modprobe-ing a builtin module.

With this, if a kernel module is a builtin, the modprobe module will:
- succeed (without incorrectly reporting changed) if ``state`` is ``present``;
- fail if ``state`` is ``absent``

The failure will have whatever error message modprobe returns when
attempting to remove a builtin module. For example:
``modprobe: ERROR: Module nfs is builtin.``
2018-12-20 15:30:29 -06:00
Gavin Williams
01a1ce16ce Jenkins_plugin: Handle 'latest' version when installing plugin for first time (#49723)
* Handle 'latest' version when installing module for first time

Otherwise, a fresh install of a plugin with 'version: latest' gets installed without its dependencies, rendering the plugin effectively useless.

* Add changelog
2018-12-20 15:51:02 +00:00
Julien Girardin
3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
2018-12-20 15:43:18 +00:00
Abhijeet Kasurde
b132593861 Move doc fragments to changelogs/fragments dir (#50179)
Move changelog fragment to changelogs/fragments dir
2018-12-20 09:21:55 -05:00
Miguel Duarte Barroso
4951e5a5b7 os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and
the state is absent, the module is not properly exited, leading
to a playbook execution failure.

Fixes issue #50057
2018-12-20 11:49:52 +00:00
Michael Rose
bcae7f24cb influxdb_user: Fixed unhandled exception on invalid login credentials (#50134) 2018-12-20 11:47:39 +00:00
Andrea Tartaglia
65c7424a35 Added organization in the scm_credential get (#49884)
* Added organization in the scm_credential get

* Fallback looking for cred in project org

* Tests project with multi org credential

* Fixed CI issue

* Added changelog fragment
2018-12-19 12:01:12 +00:00
Jordan Borean
65ce1b727e
win_copy - fix remote dir copy when it contains an empty dir (#50126) 2018-12-19 14:55:09 +10:00
Martin Krizek
545edc9114 facts: detect FreeBSD KVM guests (#50030)
Fixes: #49158
2018-12-19 06:57:53 +10:00
Martin Krizek
29c3bb48e9 facts: correctly detect multiple ipv6 addresses per device (#50020)
Fixes #49473
2018-12-19 06:49:28 +10:00
Jordan Borean
efda3eaf1c
win_lineinfile - fix malformed returned json (#50066) 2018-12-19 05:39:25 +10:00
Brian Coca
88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
2018-12-18 11:28:24 -05:00
Jérémy Lecour
2fb9b46752 Lineinfile must not insert lines multiples times with insertbefore/insertafter (#49409)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must 
not be added again.
insertafter/insertbefore options are used only when a line is to be 
inserted, to specify where it must be added.

* Implement the change in behaviour mentioned in the previous commit

* Fix comment to reflect what the code does

* Set the correct return message.

In these cases, the lines are added, not replaced.

* Add a changelog
2018-12-17 16:42:24 -05:00
Matt Martz
7eb1ab45a7
Allow tags to be templated from a variable (#49833)
* Allow tags to be templated from a variable. Fixes #49825

* Restore _load_tags to ensure we do csv tag splitting

* Add tests for csv tags and templated tags

* evaluate_tags doesn't need to accept strings, because _load_tags handles this
2018-12-17 15:40:26 -06:00
Matt Martz
a0d71e7735
Fix reverse_inventory order to work on python3 (#49895) 2018-12-17 15:39:29 -06:00
Aleksander Kovtunenko
ba562043e1 changed if logic Type to boolean (#49628)
* changed Type to boolean

* fix after review

* created fragment
2018-12-17 16:21:36 -05:00
Toshio Kuratomi
61b1daa65f Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
2018-12-17 11:01:01 -08:00
Eric Miller
4d0f2e632c Docker inventory service/stack groups for docker swarm (#48021)
* Adding service and stack grouping to docker inventory

* Updating documentation

* Adding changelog fragment for docker.py inventory script
2018-12-17 11:58:26 +00:00
Adam Miller
16f48bb4be
add changelog for pr #49912 (#49962)
Signed-off-by: Adam Miller <admiller@redhat.com>
2018-12-14 14:07:52 -06:00
Dave Bendit
d62d7176b0 [docker_container] Failing on non-string env values (#49843)
* [docker_container] Failing on non-string env values

Fixes #49802

* Clarify failure message

Co-Authored-By: DBendit <David@ibendit.com>

* Fixup from review
2018-12-14 13:21:54 -06:00
Dave Bendit
c67f4290e6 [docker_volume] Checking option minimal versions (#49839)
Fixes #38833
2018-12-14 13:20:48 -06:00
Akshay Gaikwad
1e0363ec7d Support for cache_from parameter in docker_image module (#49787)
* Support for cache_from parameter in docker_image module

Fixes #21704

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Minimum docker version check for cache_from option

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add changelog fragment

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* cache_from fix when docker-py is older

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2018-12-14 13:19:40 -06:00
Jordan Borean
4019d4f6d1
Windows Privileges - moved util code to it's own C# util (#48897)
* Windows Privileges - moved util code to it's own C# util

* Rename Enabler class to PrivilegeEnabler to remove ambiguity

* rename Utils to PrivilegeUtil

* fix missing util name changes
2018-12-14 12:00:46 +10:00
Jordan Borean
190d1ed7f1 win become: refactor and add support for passwordless become (#48082)
* win become: refactor and add support for passwordless become

* make tests more stable

* fix up dep message for Load-CommandUtils

* Add further check for System impersonation token

* re-add support for become with accounts that have no password

* doc fixes and slight code improvements

* fix doc sanity issue
2018-12-12 17:15:25 -08:00
Michael Rose
b422c59ada Amends #47040 - influxdb_user - Prevents potential accidental password changes to blank (#49084)
* Amends #47040 - Prevents potential accidental password changes to blank

* Added changelog fragment
2018-12-12 12:43:37 -05:00