1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

1551 commits

Author SHA1 Message Date
patchback[bot]
f2e1abfe5e
ali_instance: fixed markups in doc (#5226) (#5232)
* ali_instance: fixed markups in doc

* Update plugins/modules/cloud/alicloud/ali_instance.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/alicloud/ali_instance.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/alicloud/ali_instance.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/alicloud/ali_instance.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ac8b034061)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-09-04 15:59:47 +02:00
patchback[bot]
fc0d813d5f
ipwcli_dns: fixed markups in doc (#5225) (#5230)
* ipwcli_dns: fixed markups in doc

* added punctuation

(cherry picked from commit a481f8356e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-09-04 15:59:31 +02:00
patchback[bot]
b51e008358
New module: pipx_info (#5196) (#5219)
* pipx_info: new module

* pipx_info: add integration tests

* ensure apps are uninstalled after tests

* Update plugins/modules/packaging/language/pipx_info.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* rework module output, add docs

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ffe6539c0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-09-03 13:35:58 +02:00
patchback[bot]
b32b69742b
WDC Redfish support for setting the power mode. (#5145) (#5223)
* WDC Redfish support for setting the power mode.

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add change fragment.

* Add extension to changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2a449eb163)

Co-authored-by: Mike Moerk <michael.moerk@wdc.com>
2022-09-03 12:51:31 +02:00
patchback[bot]
73ee9702db
consul: add support for session token (#5193) (#5222)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
(cherry picked from commit feabe20c63)

Co-authored-by: wilfriedroset <wilfriedroset@users.noreply.github.com>
2022-09-03 12:23:02 +02:00
patchback[bot]
1cddae2265
nmcli: avoid changed status for most cases with VPN connections (#5126) (#5220)
* nmcli: avoid changed status for most cases with VPN connections

Follow-up https://github.com/ansible-collections/community.general/pull/4746

* `nmcli connection show` includes vpn.service-type but not vpn-type.
  Switching to vpn.service-type removes unneeded diffs while keeping
  the same functionality, as vpn-type is an alias of vpn.service-type
  per nm-settings-nmcli(1).

  NetworkManager also adds `org.freedesktop.NetworkManager.` prefix for
  known VPN types [1]. The logic is non-trivial so I didn't implement it
  in this commit. If a user specifies `service-type: l2tp`, changed will
  be always be True:

    -    "vpn.service-type": "org.freedesktop.NetworkManager.l2tp"
    +    "vpn.service-type": "l2tp"

* The vpn.data field from `nmcli connection show` is sorted by keys and
  there are spaces around equal signs. I added codes for parsing such
  data.

Tests are also updated to match outputs of nmcli commands.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.38.4/src/libnm-core-impl/nm-vpn-plugin-info.c#L619

* Add changelog

* Some suggested changes

* Make space stripping more flexible - works for cases without equal
  signs.
* Keep vpn.data in a test case with no spaces

* nmcli: allow any string for vpn service-type

(cherry picked from commit 6ff594b524)

Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com>
2022-09-03 12:15:38 +02:00
patchback[bot]
ea2df93116
Bugfix - EnvironmentError with wrong indentation (#5202) (#5221)
* The EnvironmentError is now handled in the splid_pid_name function.

The error also had a wrong indentation. See previous setup with correct setup: 6a7811f696/plugins/modules/system/listen_ports_facts.py

* Add changelog fragment

* Sanity Check failed before

* Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 36a7939962)

Co-authored-by: PKehnel <ga65coy@mytum.de>
2022-09-03 12:15:30 +02:00
patchback[bot]
e646d21935
seport: add local argument (#5203) (#5218)
Using `local: true` users can enforce to work only with local policy
modifications. i.e.

    # Without `local`, no new modification is added when port already exists
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C

    # With `local`, a port is always added/changed in local modification list
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C
    SELinux Port Type              Proto    Port Number

    ssh_port_t                     tcp      22

    # With `local`, seport removes the port only from local modifications
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    $ sudo semanage port -l -C

    # Even though the port is still defined in system policy, the module
    # result is success as there's no port local modification
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    # But it fails without `local` as it tries to remove port defined in
    # system policy
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp' localhost

    An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Port tcp/22 is defined in policy, cannot be deleted
    localhost | FAILED! => {
        "changed": false,
        "msg": "ValueError: Port tcp/22 is defined in policy, cannot be deleted\n"
    }

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
(cherry picked from commit 4c52fdb9d9)

Co-authored-by: Petr Lautrbach <plautrba@redhat.com>
2022-09-03 11:58:47 +02:00
patchback[bot]
2f24bcef8f
Fix exception when agent argument is not specified. (#5194) (#5195)
(cherry picked from commit 82d69bb871)

Co-authored-by: Markus Reiter <me@reitermark.us>
2022-08-28 12:16:07 +02:00
patchback[bot]
3e4aae56bd
Update redfish module for compatibility with VirtualMedia resource location (#5124) (#5180)
* Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems

* Add changelogs fragments for PR 5124

* Update some issue according to the suggestions

* update changelogs fragment to list new features in the minor_changes catagory

Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
(cherry picked from commit 766c109d47)

Co-authored-by: jixj5 <66418293+jixj5@users.noreply.github.com>
2022-08-24 21:44:44 +02:00
patchback[bot]
b099a465c5
Adjust booleans in misc plugins. (#5161) (#5175)
(cherry picked from commit 19ce50f6b9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 21:39:13 +02:00
patchback[bot]
d2b0a0d2bf
Fix indent. (#5177) (#5179)
(cherry picked from commit 57e1e2bd8e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:53:26 +02:00
patchback[bot]
fe0a5fd85f
Adjust booleans in notification modules. (#5157) (#5171)
(cherry picked from commit 35a283918a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:48:53 +02:00
patchback[bot]
f3a2750205
Adjust booleans in monitoring modules. (#5156) (#5170)
(cherry picked from commit 1b480e9f37)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:47:17 +02:00
Felix Fontein
5657889b28
Adjust booleans in system modules (#5153) (#5178)
* Adjust booleans in system modules.

* Fix some IP addresses

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit be2de15c66)
2022-08-24 20:46:48 +02:00
patchback[bot]
1b2fbd72de
Adjust booleans in doc fragments. (#5152) (#5168)
(cherry picked from commit bcecf2dcdc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:46:40 +02:00
patchback[bot]
5a2e7f9b1b
Adjust booleans in packaging modules. (#5154) (#5169)
(cherry picked from commit ddc989ec6d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:46:30 +02:00
patchback[bot]
c5ff49db56
Adjust booleans in misc modules. (#5160) (#5174)
(cherry picked from commit 403c4f7477)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:29:08 +02:00
patchback[bot]
43dc6ba533
Adjust booleans in cloud modules. (#5155) (#5176)
(cherry picked from commit 3a08903e1c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:22:10 +02:00
patchback[bot]
eb1f0c28a9
Adjust booleans in net tools, web infrastructure, and clustering modules. (#5159) (#5173)
(cherry picked from commit 7533f9ac26)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:22:02 +02:00
patchback[bot]
41993d44e2
Adjust booleans in source control modules. (#5158) (#5172)
(cherry picked from commit 675bdef190)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-24 20:21:52 +02:00
patchback[bot]
9345db2001
adding nested try block for tss.py to import new Delinea library (#5151) (#5164)
* adding nested try block to import delinea library

* whitespace

* Update plugins/lookup/tss.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* adding changelog fragment

* Update changelogs/fragments/5151-add-delinea-support-tss-lookup.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Tom Reeb <Thomas.Reeb_e@morganlewis.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f39294f50)

Co-authored-by: Tom Reeb <tomreeb@users.noreply.github.com>
2022-08-23 22:03:30 +02:00
patchback[bot]
cf17033278
feat: Add crc32 filter (#5062) (#5140)
* feat: Add crc32 filter

Compute CRC32 checksum of a string and return its hex representation. Can be
use to create short checksums.

Signed-off-by: Julien Riou <julien@riou.xyz>

* Update license lines

* Improve string check of a crc32 value

Signed-off-by: Julien Riou <julien@riou.xyz>

Signed-off-by: Julien Riou <julien@riou.xyz>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8e9ec610c3)

Co-authored-by: Julien Riou <julien@riou.xyz>
2022-08-21 22:08:42 +02:00
patchback[bot]
2e11c2dfa4
dig: Fix evaluation of boolean parameters (#5129) (#5137)
* Add lookup_dig tests

* Fix boolean evaluation

* Add changelog fragment

* Apply review changes

* Add license

(cherry picked from commit 3c2d7eb193)

Co-authored-by: Michal Hybner <76526074+mu1f407@users.noreply.github.com>
2022-08-20 14:49:33 +02:00
patchback[bot]
ef11714708
Fix nsupdate when updating NS record (#5112) (#5132)
* Fix nsupdate when updating NS record

* Changelog fragment

* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Switch to fallback to AUTHORITY instead of using with NS type.

* Update plugins/modules/net_tools/nsupdate.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nsupdate.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ad8965218d)

Co-authored-by: Jonathan Lung <lungj@users.noreply.github.com>
2022-08-20 13:34:36 +02:00
patchback[bot]
6cd2b4f93b
Change Proxmox agent argument to string. (#5107) (#5130)
* Change Proxmox `agent` argument to string.

* Add changelog entry.

* Pass boolean directly to `proxmoxer`.

(cherry picked from commit 0be7b6e7b9)

Co-authored-by: Markus Reiter <me@reitermark.us>
2022-08-20 13:34:05 +02:00
patchback[bot]
a509c08b3a
pipx: add state latest (#5105) (#5125)
* pipx: add state latest

* add changelog fragment

* Update plugins/modules/packaging/language/pipx.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3c960ac620)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-08-18 13:11:39 +02:00
patchback[bot]
bc2403042a
[PR #5098/aab22e7f backport][stable-5] Add remaining copyright statements, add licenses sanity test (#5099)
* Add remaining copyright statements, add licenses sanity test (#5098)

* Add sanity test (currently fails).

* doc_fragments can also be non-GPLv3+.

* Replace 'Author:' by 'Copyright:' in some specific cases.

* Avoid matching string for license checkers.

* Reformulate not to throw license detection off.

* Add PSF copyright notice for plugins/module_utils/_mount.py.

* Add generic copyright notices.

* Update changelog fragment.

(cherry picked from commit aab22e7f32)

* Update copyright statements. (#5106)

(cherry picked from commit c8925058aa)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-14 10:26:44 +02:00
patchback[bot]
2587a2588d
Fix linting errors; fix some real bugs (#5111) (#5114)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.

(cherry picked from commit a54af8909c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-12 12:33:02 +02:00
patchback[bot]
5a93168d88
Fix Proxmox node, name condition. (#5108) (#5110)
* Fix Proxmox `node`, `name` condition.

* Add changelog entry.

(cherry picked from commit 0338eb7a7c)

Co-authored-by: Markus Reiter <me@reitermark.us>
2022-08-12 07:48:33 +02:00
patchback[bot]
e962da8b9d
pipx: add required_if fo upgrade and reinstall (#5100) (#5102)
* pipx: add required_if for upgrade and reinstall

* add changelog fragment

(cherry picked from commit 83317419d7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-08-09 10:29:22 +02:00
patchback[bot]
0d598c3542
Fix more copyright lines, add more default copyright lines (#5095) (#5096)
* Fix copyright lines.

* Add default copyright line.

(cherry picked from commit 424d706f92)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-08 15:19:46 +02:00
patchback[bot]
82cdc354fa
pipx: use CmdRunner (#5085) (#5093)
* pipx: use CmdRunner

* added BOTMETA entry for pipx module_utils

* add changelog fragment

* add missing line

* Update plugins/module_utils/pipx.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/module_utils/pipx.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2ecaa91f68)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-08-08 08:41:08 +02:00
patchback[bot]
a125458748
Add more license statements (#5079) (#5088)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.

(cherry picked from commit 2a9fd7359f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-07 12:03:49 +00:00
patchback[bot]
df59034d75
WDC Redfish support for chassis indicator LED toggling. (#5059) (#5086)
* WDC Redfish support for chassis indicator LED toggling.

* Added changelog fragment.

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6062ae8fae)

Co-authored-by: Mike Moerk <mike@moerk.org>
2022-08-07 10:14:07 +02:00
patchback[bot]
6a029bcba3
Fix copyright lines (make sure 'Copyright' is there). (#5083) (#5084)
(cherry picked from commit 496bf27b5c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-05 22:45:15 +02:00
Felix Fontein
22a400d626
Add default license header to files which have no copyright or license header yet (#5074) (#5075)
* Add default license header to files which have no copyright or license header yet.

* yml extension should have been xml...

(cherry picked from commit 1ab2a5f1bc)
2022-08-05 20:16:36 +02:00
patchback[bot]
203747027e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) (#5068)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
(cherry picked from commit 123c7efe5e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-05 13:17:19 +02:00
patchback[bot]
ffd51d1e22
aix_filesystem: Fix examples (#5067) (#5071)
`community.general.filesystem` is not a valid argument to
aix_filesystem.

(cherry picked from commit 8f37638480)

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>
2022-08-05 12:46:57 +02:00
patchback[bot]
4e13c8b969
Fix docs. (#5063) (#5064)
(cherry picked from commit f67473024d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-04 21:10:48 +02:00
patchback[bot]
a81e94ddc7
WDC Redfish firmware update support for update image creds (#5056) (#5057)
Allows user to specify Basic Auth credentials for firmware update image.

(cherry picked from commit 4eb3540c8e)

Co-authored-by: Mike <michael.moerk@wdc.com>
2022-08-02 10:20:15 +02:00
patchback[bot]
767a296b60
New lookup plug-in: bitwarden (#5012) (#5049)
* Basic support for Bitwarden lookups

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Update plugins/lookup/bitwarden.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/bitwarden.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/bitwarden.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit ab0cd83bb1)

Co-authored-by: Jonathan Lung <lungj@users.noreply.github.com>
2022-08-01 11:52:05 +02:00
patchback[bot]
963bbaccb7
xfconf: add command output to results (#5037) (#5051)
* xfconf: add command output to results

* add changelog fragment

* add docs for return value cmd

* Update plugins/modules/system/xfconf.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5933d28dc4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-08-01 11:27:57 +02:00
patchback[bot]
9358640ed9
Fix: Add user-agent header to allow request through WAF with bot protection (#5024) (#5046)
* Fix: Add user agent header to allow request through CDN/WAF with bot protection

* upate doc-fragment

* move http_agent variable assignment

* set http_agent param for all Keycloak API Requests

* Update plugins/doc_fragments/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/5023-http-agent-param-keycloak.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* fix formatting

* Update plugins/doc_fragments/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 88a3daf2ec)

Co-authored-by: Dishant Pandya <drpdishant@gmail.com>
2022-08-01 09:59:49 +02:00
patchback[bot]
2846242e95
lastpass lookup: use config manager, improve documentation (#5022) (#5047)
* LastPass lookup: use config manager, improve documentation

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/5022-lastpass-lookup-cleanup.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e8e6b9bbd7)

Co-authored-by: Jonathan Lung <lungj@users.noreply.github.com>
2022-08-01 09:59:36 +02:00
patchback[bot]
ce934aa49b
Slack: Add support for (some) groups (#5019) (#5044)
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592cf1)

Co-authored-by: Richard Tuin <richardtuin@gmail.com>
2022-07-31 23:52:47 +02:00
patchback[bot]
2cc72c2213
Pacman: Add support for install reason (#4956) (#5040)
* Pacman: Add support for setting install reason

* Improved description

* Fix documentation

* Add changelog fragment

* Use source for installation

* Get all reasons at once

* Removed default for reason

* Added version info to documentation

* Fix NameError

* Moved determination of reason to _build_inventory

* Fix duplication and sanity errors

* adjust tests for changed inventory

* Documentation: remove empty default for reason

* mention packages with changed reason in exit params/info

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Correct indentation

* Fix indentation

* Also sort changed packages in normal mode

* Also sort result in unit test

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f3841703f)

Co-authored-by: Minei3oat <Minei3oat@users.noreply.github.com>
2022-07-31 22:55:21 +02:00
patchback[bot]
1f4a98c8cc
Module listen ports facts extend output (#4953) (#5041)
* Initial Rework of netstat and ss to include additional information.
State, foreign address, process.

* Fixed sanity tests. Python 2 compatible code. pylint errors resolved.

* Sanity tests. ss_parse fix minor error I created before.

* Rename variable for clarity

* Python2 rsplit takes no keyword argument. -> remove keyword argument

* Generic improvments for split_pid_name. Added changelog

* Sanity Test (no type hints for python2.7)

* add include_non_listening param. Add param to test. Add documentation. Only return state and foreign_address when include_non_listening

* Update changelogs/fragments/4953-listen-ports-facts-extend-output.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add info to changelog fragment. Clarify documentation.

* The case where we have multiple entries in pids for udp eg: users:(("rpcbind",pid=733,fd=5),("systemd",pid=1,fd=30)) is not in the tests. So roll back to previous approach where this is covered. Fix wrong if condition for include_non_listening.

* Rewrite documentation and formatting.

* Last small documentation adjustments.

* Update parameters to match description.

* added test cases to check if include_non_listening is set to no by default. And test if ports and foreign_address exists if set to yes

* undo rename from address to local_address -> breaking change

* Replace choice with bool, as it is the correct fit here

* nestat distinguishes between tcp6 and tcp output should always be tcp

* Minor adjustments in the docs (no -> false, is set to yes -> true)

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c273498a03)

Co-authored-by: PKehnel <ga65coy@mytum.de>
2022-07-31 22:55:13 +02:00
patchback[bot]
981c7849ce
consul: add support for session TTL (#4996) (#5038)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
(cherry picked from commit d214f49be7)

Co-authored-by: wilfriedroset <wilfriedroset@users.noreply.github.com>
2022-07-31 22:12:13 +02:00
patchback[bot]
258471b267
mh base: add verbosity() property (#5035) (#5036)
* mh base: add verbosity property

* add changelog fragment

(cherry picked from commit aba089369e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-07-31 11:39:33 +02:00
patchback[bot]
3020b305bb
Fix returnall for gopass (#5027) (#5029)
* Fix returnall for gopass

Gopass was always given the --password flag, despite there being no need for this.

* Add changelog fragment

Co-authored-by: Sylvia van Os <sylvia.van.os@politie.nl>
(cherry picked from commit 3eb29eb4b6)

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2022-07-29 14:33:45 +02:00
patchback[bot]
9dc82793c4
xfconf: fix setting of boolean values (#5007) (#5013)
(cherry picked from commit 9290381bea)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-27 08:37:43 +02:00
patchback[bot]
c8d6181f64
fixing minor documentation flaws (#5000) (#5004)
Co-authored-by: Thomas Blaesing <thomas.blaesing@erwinhymergroup.com>
(cherry picked from commit 037c75db4f)

Co-authored-by: Thomas <3999809+tehtbl@users.noreply.github.com>
2022-07-26 12:26:56 +02:00
patchback[bot]
c286758248
Apk: add support for a custom world file (#4976) (#5005)
* Apk: add support for a custom world file

* Apk: Add changelog fragment for custom world file

(cherry picked from commit be0e47bfdc)

Co-authored-by: CactiChameleon9 <51231053+CactiChameleon9@users.noreply.github.com>
2022-07-26 12:26:38 +02:00
patchback[bot]
6e685e740e
xfconf and xfconf_info: use do_raise (#4975) (#4993)
* remove redundant XfConfException class

* adjusted indentation in the documentaiton blocks

* add changelog fragment

(cherry picked from commit 31ef6c914b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-07-24 13:19:59 +02:00
patchback[bot]
695599e7d5
Introduce dig lookup argument fail_on_error (#4973) (#4992)
with default False for backwards compatibility.

Allows fail-fast behavior on lookup failures instead of returning strings and continuing.

(cherry picked from commit 2662bc881f)

Co-authored-by: Benjamin <1982589+tumbl3w33d@users.noreply.github.com>
2022-07-24 13:18:38 +02:00
patchback[bot]
29e7fae303
Fix keyring_info when using keyring library (#4964) (#4991)
* Fix keyring_info when using keyring library

This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work.

* delete whitespace

* add changelog fragment

* Update changelogs/fragments/4964-fix-keyring-info.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e2426707e2)

Co-authored-by: Sargun Vohra <sargun.vohra@gmail.com>
2022-07-24 13:18:29 +02:00
patchback[bot]
303000c1a1
Expose unredirected_headers on maven_artifact (#4812) (#4994)
* Expose unredirected_headers to module

In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.

* Fix Linting errors

* Applied Comments

 - Specified version added
 - Changed description of unredirected_headers

* Check for ansible version

If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them

* Applied comments

- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
  function does not support it
- Changed function that checks for ansible version
- Removed unused import

* Remove 2.11 breaking change

Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
  - change doc to use C() on the function description
  - changed doc to use ansible-core instead of Ansible

* Changes in description for readability

* Add changelog fragment

* Change description changelog fragment

(cherry picked from commit a2677fd051)

Co-authored-by: Raul Gabriel Verdi <95469166+raul-verdi@users.noreply.github.com>
2022-07-24 12:29:11 +02:00
patchback[bot]
371ffaeabe
Update to new Github account for notifications (#4986) (#4989)
* Update to new Github account for notifications

* Update to new Github account for notifications

(cherry picked from commit 3204905e5c)

Co-authored-by: Florian <100365291+florianpaulhoberg@users.noreply.github.com>
2022-07-23 14:23:29 +02:00
patchback[bot]
e86fcf76fc
Pacman: Fix name of URL packages (#4959) (#4971)
* Strip downloading... of unseen URLs

* Added changelog fragment

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Revert "Added integration tests for reason and reason_for"

This reverts commit f60d92f0d7.

Accidentally commited to the wrong branch.

(cherry picked from commit 788cfb624a)

Co-authored-by: Minei3oat <Minei3oat@users.noreply.github.com>
2022-07-21 20:16:28 +02:00
patchback[bot]
4d2895676f
proxmox module_utils: fix get_vm int parse handling (#4945) (#4967)
* add int parse handling

* Revert "add int parse handling"

This reverts commit db2aac4254.

* fix: vmid check if state is absent

* add changelogs fragments

* Update changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c57204f9a9)

Co-authored-by: miyuk <enough7531@gmail.com>
2022-07-21 08:14:42 +02:00
patchback[bot]
97b3ad6843
Fix path detection for gopass (#4955) (#4965)
* Fix path detection for gopass

As per fc8c9a2286/docs/features.md (initializing-a-password-store), gopass defaults to ~/.local/share/gopass/stores/root for its password store root location.

However, the user can also override this, and this will be stored in the gopass config file (ed7451678c/docs/config.md (configuration-options)).

This patch ensures that the config setting in gopass is respected, falling back to the default gopass path. pass' behaviour remains unchanged.

* Formatting improvements

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add changelog fragment

* Formatting improvement

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit c31e6413f2)

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2022-07-21 08:14:30 +02:00
patchback[bot]
d7ecd40118
Redfish modules for Western Digital UltraStar Data102 storage enclosures (#4885) (#4958)
* WDC Redfish Info / Command modules for Western Digital Ultrastar Data102 storage enclosures.
Initial commands include:
* FWActivate
* UpdateAndActivate
* SimpleUpdateStatus

* delete unnecessary __init__.py modules

* PR Feedback

Notes list not guaranteed to be sorted
Use EXAMPLES tos how specifying ioms/basuri
Import missing_required_lib

* Apply suggestions from code review

Suggestions that could be auto-committed.

Co-authored-by: Felix Fontein <felix@fontein.de>

* Remove DNSCacheBypass

It is now the caller's responsibility to deal with stale IP addresses.

* Remove dnspython dependency.

Fix bug that this uncovered.

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* PR Feedback

* Documentation, simple update status output format, unit tests.

Add docs showing how to use SimpleUpdateStatus
Change the format of SimpleUpateStatus format, put the results in a sub-object.
Fix unit tests whose asserts weren't actually running.

* PR Feedback

register: result on the 2nd example

* Final adjustments for merging for 5.4.0

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit be70d18e3f)

Co-authored-by: Mike <mike@moerk.org>
2022-07-17 11:03:55 +02:00
patchback[bot]
9d5490e510
proxmox inventory: fix for agent enabled (#4910) (#4947)
* Update proxmox.py

* Forgot a debug print.

* pep

* Check if int, old school way.

* pep, once again.

* Create 4910-fix-for-agent-enabled.yml

* Must check the first listentry for enabled=1

* Update changelogs/fragments/4910-fix-for-agent-enabled.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit aa03c71267)

Co-authored-by: ube <ube@alienautopsy.net>
2022-07-12 11:17:40 +02:00
patchback[bot]
2245742255
Misc. typo fixes (#4940) (#4942)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit bf94f08bc4)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-07-11 22:18:22 +02:00
patchback[bot]
6058a5e5b1
added password prompt support for machinectl (#4849) (#4941)
* added password prompt support for machinectl

* include review comments

This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule.

* fix yaml doc with leftover bracket

* include review comments 2

* move regex compile to global scope

(cherry picked from commit 35ddf31b5f)

Co-authored-by: Louis Seubert <louis.seubert.ls@gmail.com>
2022-07-11 22:08:53 +02:00
patchback[bot]
1eb872ccea
allow configuring opentelementry callback via config file (#4916) (#4938)
this is especially useful for the `enable_from_environment` option, as
this allows to set a default for the whole project, instead of relying
on everyone setting the environment variable

(cherry picked from commit a5ff53f2ae)

Co-authored-by: Evgeni Golov <evgeni@golov.de>
2022-07-07 22:48:20 +02:00
patchback[bot]
ba18d6232a
fix lxd connection plugin inventory_hostname (#4912) (#4935)
* fixes lxd connection plugin issue #4886

remote_addr value was set to literal string 'inventory_hostname' instead
of the value for inventory_hostname variable. solution found in PR
ansible/ansible#77894

* changelog fragment - bugfix - lxd connection plugin

* correct changelog fragment

* Update changelogs/fragments/4886-fix-lxd-inventory-hostname.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* replace _host instance variable with calls to get 'remote_addr' option

suggested by felixfontein

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 905f9ec399)

Co-authored-by: antonc42 <antonc42@users.noreply.github.com>
2022-07-07 22:40:16 +02:00
patchback[bot]
6115f18837
Fix syntax in rax_clb_nodes that breaks in Python3 (#4933) (#4937)
* Use syntax that works in both Python 2 and 3 when iterating through a
    dict that's going to be mutated during iteration
  * Fixes `dictionary changed size during iteration` error
  * Fixes #4932

(cherry picked from commit 9a928d5ffb)

Co-authored-by: Teddy Caddy <tcaddy@users.noreply.github.com>
2022-07-07 22:37:10 +02:00
patchback[bot]
3f4e3dd2b6
Fix license filenames. (#4923) (#4925)
(cherry picked from commit 1c06e237c8)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-04 20:12:10 +00:00
patchback[bot]
a573661458
Do not ignore tld option in DSV lookup plugin (#4911) (#4921)
* Do not ignore tld option in DSV lookup plugin

* add changelog fragment

* Update changelogs/fragments/4911-dsv-honor-tld-option.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ffa2b525c)

Co-authored-by: andrii-zakurenyi <85106843+andrii-zakurenyi@users.noreply.github.com>
2022-07-04 20:40:25 +02:00
patchback[bot]
0977152b39
Fix GetChassisPower when multiple chassis are present (#4902) (#4915)
* Fix GetChassisPower when multiple chassis are present

When multiple chassis are present, and one or more of those chassis do _not_
report power information, the GetChassisPower command will fail. To address
that, only report a failure if _all_ of the Chassis objects lack power
power reporting functionality.

Fixes #4901

* Update changelogs/fragments/4901-fix-redfish-chassispower.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f60d12cf2d)

Co-authored-by: Jacob Yundt <jyundt@gmail.com>
2022-06-30 21:01:52 +02:00
patchback[bot]
91fe881226
Add GetFirmwareVersion command to redfish_info (#4900) (#4913)
* Add GetManagerInventory command to redfish_info

Adding GetManagerInventory command to redfish_info, similar to
GetSystemInventory to report Manager specific information like:
- FirmwareVersion
- Model
- ManagerType

Fixes #4899

* Update changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 93dcd3f54d)

Co-authored-by: Jacob Yundt <jyundt@gmail.com>
2022-06-30 21:01:37 +02:00
patchback[bot]
c79ccbbf7e
Fix command variable usage in CmdRunner (#4903) (#4906)
* Fix command variable usage

* Add changelog fragment for cmd-runner bugfix (#4903)

(cherry picked from commit 265c052c27)

Co-authored-by: Álvaro García Jaén <garciajaenalvaro@gmail.com>
2022-06-30 07:30:53 +02:00
patchback[bot]
a80761a8a4
Fix various module docs. (#4887) (#4888)
(cherry picked from commit 2dcdd2faca)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-22 22:54:08 +02:00
patchback[bot]
213419fb0c
Fix docs. (#4881) (#4884)
(cherry picked from commit aa4c994dfd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-22 14:44:33 +02:00
patchback[bot]
d0b39271b3
Sudoers validate (#4794) (#4866)
* Use visudo to validate sudoers rules before use

* Replace use of subprocess.Popen with module.run_command

* Switch out apt for package

* Check file mode when verifying file to determine whether something needs to change

* Only install sudo package for debian and redhat environments (when testing)

* Attempt to install sudo on FreeBSD too

* Try just installing sudo for non-darwin machines

* Don't validate file ownership

* Attempt to install sudo on all platforms

* Revert "Attempt to install sudo on all platforms"

This reverts commit b9562a8916.

* Remove file permissions changes from this PR

* Add changelog fragment for 4794 sudoers validation

* Add option to control when sudoers validation is used

* Update changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add version_added to validation property

Co-authored-by: Felix Fontein <felix@fontein.de>

* Also validate failed sudoers validation error message

Co-authored-by: Felix Fontein <felix@fontein.de>

* Make visudo not executable instead of trying to delete it

* Update edge case validation

* Write invalid sudoers file to alternative path to avoid breaking sudo

* Don't try to remove or otherwise modify visudo on Darwin

* Update plugins/modules/system/sudoers.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Remove trailing extra empty line to appease sanity checker

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 97c72f88b7)

Co-authored-by: Jon Ellis <ellis.jp@gmail.com>
2022-06-21 12:52:21 +02:00
patchback[bot]
09031fc9e6
Add keyring and keyring_info modules (#4764) (#4864)
(cherry picked from commit 45362d39a2)

Co-authored-by: ahussey-redhat <93101976+ahussey-redhat@users.noreply.github.com>
2022-06-20 18:27:10 +00:00
patchback[bot]
4481d0a4a9
redfish_command: VirtualMediaInsert does not work with Supermicro (#4839) (#4863)
* bugfix virtual media support for supermicro hardware

* Added Changelog for PR4839

(cherry picked from commit 5e57d2af0a)

Co-authored-by: FRUCHTiii <57792137+FRUCHTiii@users.noreply.github.com>
2022-06-20 19:29:52 +02:00
patchback[bot]
c581daa48a
sudoers: fix handling of state: absent (#4852) (#4853) (#4858)
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd407)

Co-authored-by: s-hamann <10639154+s-hamann@users.noreply.github.com>
2022-06-19 15:48:50 +02:00
patchback[bot]
75e2de3581
Add PSF-license.txt for plugins/module_utils/_mount.py (#4847) (#4848)
* Add PSF-license.txt for plugins/module_utils/_mount.py.

* Move other licenses to licenses/.

* Revert "Move other licenses to licenses/."

This reverts commit eab4209889.

(cherry picked from commit dcdfc9c413)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-17 12:49:08 +02:00
patchback[bot]
6c7bee1225
Add scw_compute_private_network (#4727) (#4845)
* Add scw_compute_private_network

* fix argument required and BOTMETA

* little fix in commentary/doc

* test with link for ansible-doc check

* remove unwanted file

* fix entry missing in  meta/runtime.yml

* scaleway_compute_private_network add some check in test and  some fic in doc

* a=add missing  del os.environ

* fix whitespace

* test_scaleway_compute_private_network : fix test

* test_scaleway_compute_private_network : fix pep8

* scaleway_compute_private_network

add . in description

* scaleway_compute_private_network: fix var name

* [scaleway_compute_private_network] add name for the example's task

* Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7f4c11cd64)

Co-authored-by: pastral <52627592+pastral@users.noreply.github.com>
2022-06-15 10:58:13 +02:00
patchback[bot]
eafcdfbceb
cmd_runner: add __call__ method to invoke context (#4791) (#4844)
* cmd_runner: add __call__ method to invoke context

* change xfconf to use the callable form

* add changelog fragment

* Update changelogs/fragments/4791-cmd-runner-callable.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 739ca737f1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-15 10:58:04 +02:00
patchback[bot]
82a764446b
passwordstore: Make compatible with shims (#4780) (#4846)
* passwordstore: Make compatible with shims, add backend config

This allows using the passwordstore plugin with scripts that wrap other
password managers. Also adds an explicit configuration (`backend` in
`ini` and `passwordstore_backend` in `vars`) to set the backend to `pass`
(the default) or `gopass`, which allows using gopass as the backend
without the need of a wrapper script. Please be aware that gopass
support is currently limited, but will work for basic operations.

Includes integrations tests.

Resolves #4766

* Apply suggestions from code review

(cherry picked from commit 006f3bfa89)

Co-authored-by: grembo <freebsd@grem.de>
2022-06-15 10:57:52 +02:00
patchback[bot]
de5fbe457f
Fix alternatives module (#4836) (#4840)
* Only pass subcommands when they are specified as module arguments.

* When 'subcommands' is specified, 'link' must be given for every subcommand.

* Extend subcommand tests.

(cherry picked from commit 84d8ca9234)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-14 16:30:42 +02:00
patchback[bot]
40b35acee2
redhat_subscription: call 'remove' instead of 'unsubscribe' (#4809) (#4838)
The 'unsubscribe' command of 'subscription-manager' was deprecated
already in subscription-manager 1.11.3, shipped with RHEL 5.11.
As it was removed in subscription-manager 1.29.x, unsubscribing from
pools was thus broken.

The simple fix is to call the proper command, 'remove'.

(cherry picked from commit a45b90e93f)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2022-06-14 07:53:49 +02:00
patchback[bot]
4275bfe87b
alternatives: Fix bug with priority default (#4810) (#4835)
* alternatives: Fix bug with priority default

If neigther the priority nor the subcommands where specified the module decided to update the priority with the default value anyway. This resulted in bug #4803 and #4804

* Add changelog fragment.

* Distinguish None from 0.

* Address review comments.

* Update plugins/modules/system/alternatives.py

Co-authored-by: Pilou <pierre-louis@libregerbil.fr>

* Remove unrelated issues from changelog.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Pilou <pierre-louis@libregerbil.fr>
(cherry picked from commit 57e83ac80b)

Co-authored-by: Marius Rieder <marius.rieder@durchmesser.ch>
2022-06-13 21:51:08 +02:00
patchback[bot]
2f87b8c63f
proxmox_kvm: fix typos (#4798) (#4832)
* Typofix

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e51221896b)

Co-authored-by: Wouter Schoot <wouter@schoot.org>
2022-06-13 12:13:16 +02:00
patchback[bot]
100fffb4c1
nmcli: do not convert undefined lists to empty strings (#4813) (#4834)
* do not convert undefined lists to empty strings

* add changelog fragment (#4813)

(cherry picked from commit 72faebffc6)

Co-authored-by: geichelberger <35195803+geichelberger@users.noreply.github.com>
2022-06-13 12:13:05 +02:00
patchback[bot]
1206900488
Ensure managed sudoers config files have 0440 permissions (#4814) (#4828)
* Ensure sudoers config files are created with 0440 permissions to appease visudo validation

* Remove change not required by the bugfix

* Add changelog fragment for 4814 sudoers file permissions

* Update changelogs/fragments/4814-sudoers-file-permissions.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Have less oct casting

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2d1e58663c)

Co-authored-by: Jon Ellis <ellis.jp@gmail.com>
2022-06-12 08:59:53 +02:00
patchback[bot]
f8d35eeb14
Added conditional to only collect qmpstatus on qemu VMs (#4816) (#4817)
* Added conditional to only collect qmpstatus on qemu VMs

* Processed feedback, added changelog

* Initial change to unit tests

* Made Sanity tests happy again

* Missed a function call, removed superfluous function

* Derp, no need to mock get_vm_status anymore

* Added detail checks whether hosts are mapped to the paused/prelaunch groups

* Fix sanity check

* Processed feedback

* Processed feedback - noqa

(cherry picked from commit 71745b8024)

Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
2022-06-11 13:55:15 +02:00
patchback[bot]
82b2d294b7
add support to create L2TP and PPTP VPN connection (#4746) (#4793)
* add support to create L2TP and PPTP VPN connection

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* apply changes pointed on tests and review

- add changelog fragment
- change example code to use jinja2 in place of shell command

* removes trailing whitespace

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* removes linux command from examples

* remove unnecessary brakets

Co-authored-by: Felix Fontein <felix@fontein.de>

* remove unnecessary brakets

Co-authored-by: Felix Fontein <felix@fontein.de>

* simplify psk encoding on example

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* add unit tests

- test unchenged l2tp and pptp vpn connections
- test create l2tp and pptp vpn connections
- fix is_connection_changed to remove default ifname attribuition

* improve tests on vpn.data param

- fix _compare_conn_params to handle vpn.data as lists

* removes block and set_fact from example

Co-authored-by: Felix Fontein <felix@fontein.de>

* makes line shortter to better reading

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e5e485390d)

Co-authored-by: José Roberto Emerich Junior <jremerich@gmail.com>
2022-06-06 21:57:53 +02:00
patchback[bot]
812fbef786
xfconf module utils: providing a cmd_runner object (#4776) (#4789)
* xfconf: changed implementation to use cmd_runner

* added module_utils/xfconf.py

* xfconf_info: using cmd_runner

* added module_utils to BOTMETA.yml

* added changelog fragment

* use cmd_runner_fmt instead of deprecated form

(cherry picked from commit 8ba3d94740)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 11:11:25 +02:00
patchback[bot]
9d795c334b
ModuleHelperException module utils - improved exception initialization (#4755) (#4786)
* ModuleHelperException module utils - improved exception initialization

* added changelog fragment

* Update plugins/module_utils/mh/exceptions.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b87edda3c7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 11:11:15 +02:00
patchback[bot]
512d412eb4
Add subcommands parameter for module alternatives. (#4654) (#4788)
* Add slaves parameter for module alternatives.

* alternatives: Improve documentation abous slaves parameter

* alternatives: Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* alternatives: Add schangelog for slaves parameter

* alernatives: Add integration tests

* alternatives: Improv tests

* alternatives: Update tests/integration/targets/alternatives/tasks/slaves.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* alternatives: Rework logic to support updating priority and subcommands

* alternatives: Use more inclusive naming

* alternatives: Fix linter warnings

* alternatives: Dont fail if link is absent

* alternatives: Update changelog fragment

* alternatives: Add tests for prio change and removing

* alternatives: Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* alternatives: Add `state=auto`to reset mode to auto

* alternatives: Fix linter warnings

* alternatives: Fix documentation.

* alternatives: Combine multiple messages.

* alternatives: Set command env for all commands.

* alternatives: Do not update subcommands if parameter is omited

* alternatives: Fix a bug with python 2.7 var scoping

* alternatives: Improce diff before generation

* alternatives: Fix linter warnings

* alternatives: Fix test names

* alternatives: Simplify subcommands handling and improve diffs

* aliases: Only test for subcommand changes if subcommands parameter is set.

* Update plugins/modules/system/alternatives.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 373da56b5b)

Co-authored-by: Marius Rieder <marius.rieder@durchmesser.ch>
2022-06-06 10:57:41 +02:00
patchback[bot]
8f0ee6966f
Add puppet confdir option (#4740) (#4787)
* Add puppet confdir option

* Add puppet confdir option change fragment

* Improve quoting in plugins/modules/system/puppet.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add version_added to plugins/modules/system/puppet.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Georg Vogt <georg.vogt@tngtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 62ff263ac1)

Co-authored-by: Ge0rgi0s <34042518+Ge0rgi0s@users.noreply.github.com>
2022-06-06 10:57:37 +02:00
patchback[bot]
3af9e39043
cmd_runner: deprecate fmt as the name for the format class (#4777) (#4784)
* cmd_runner: deprecate fmt as the name for the format class

* added changelog fragment

* fixing the deprecation comment

(cherry picked from commit 2d38c8d892)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 10:57:28 +02:00
patchback[bot]
9f0913bf73
cmd_runner: added flag check_mode_skip to context (#4736) (#4772)
* cmd_runner: added flag skip_if_check_mode to context

* added changelog fragment

* adjusted param name and added new one

(cherry picked from commit be69f95f63)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 10:30:32 +02:00
patchback[bot]
aea851018b
gconftool2_info: new module (#4743) (#4773)
* gconftool2_info: new module

* fixed imports

* fixed docs for gconftool2_info

* fixed docs for gconftool2_info

* minor adjustment in docs

* added tests

* adjustments

(cherry picked from commit 49836bb484)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 10:30:24 +02:00
patchback[bot]
69c79f618e
ansible_galaxy_install: minor improvements based on MH updates (#4752) (#4774)
* ansible_galaxy_install: minor improvements based on MH updates

* added changelog fragment

(cherry picked from commit d019e22e7d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 10:30:15 +02:00
patchback[bot]
6a51ba5169
Proxmox Inventory: added new statuses for qemu (#4723) (#4775)
* added new statuses for qemu

* added document fragment

* lint fixes

* replaced f strings with %

* move the qmpstatus for qemu to a dedicated group

* added documentation to explain the new addition

* update changelog fragment to reflect the change correctly

* update changelog fragment to reflect the change correctly

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* added a switch to get the qemu extended status

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* groups created when qemu_extended_statuses is true and added tests to make sure they are there

* added test to make sure the groups are not present when qemu_extended_statuses is false

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b556b142ec)

Co-authored-by: Ilija Matoski <ilijamt@gmail.com>
2022-06-06 10:30:08 +02:00
patchback[bot]
d4330a3e54
nmcli: use capital case "DNS" in documentation, improve examples (#4732) (#4771)
* nmcli: use capital case "DNS" in documentation

In documentation sometimes DNS was written in (incorrect) lower
case "dns" and sometimes in (correct) capital case "DNS". Use the
right capital case spelling in all parameter descriptions.

* nmcli: documentation language

Co-authored-by: Felix Fontein <felix@fontein.de>

* nmcli: documentation language

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2eadedef6d)

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2022-06-04 09:00:52 +02:00
patchback[bot]
7c3bf118ca
fix trailing whitespace after parameter (#4765) (#4768)
(cherry picked from commit b6e652b440)

Co-authored-by: Markus Bergholz <git@osuv.de>
2022-06-03 18:51:13 +02:00
patchback[bot]
c59ebc82cd
Add simplified_bsd.txt license file (#4759) (#4761)
* Add simplified_bsd.txt and adjust references.

* Add changelog.

(cherry picked from commit 0be68bf04b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-02 08:01:53 +02:00
patchback[bot]
66a7fdfeba
keycloak_realm: fix default groups and roles (#4241) (#4719) (#4754)
* keycloak_realm: fix default groups and roles (#4241)

* add changelog fragment

(cherry picked from commit 7ee15f95f7)

Co-authored-by: adam-cleo <90759784+adam-cleo@users.noreply.github.com>
2022-05-30 12:55:41 +02:00
patchback[bot]
77e25a7503
fix invalid fail_json call (#4733) (#4750)
* fix invalid fail_json call

Currently causes this error:
```
TypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg'
gitlab | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3.10"
    },
    "changed": false,
    "module_stderr": "Shared connection to 10.0.3.100 closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.redis', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.redis', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 328, in <module>\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 195, in main\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/module_utils/redis.py\", line 40, in fail_imports\r\nTypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
```

* Add changelog.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e55875107b)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-05-30 08:12:53 +02:00
patchback[bot]
22b4fc8d8b
DOC: Documment setting of NTP server in examples. (#4655) (#4748)
Tested on iLO 5 (HP Gen 10).
Command checked from iLO5 REST API reference at https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#configuring-network-time-protocol-ntp

(cherry picked from commit 3b48bde84f)

Co-authored-by: Ondrej Faměra <ondrej-xa2iel8u@famera.cz>
2022-05-30 07:04:59 +02:00
patchback[bot]
6252f3bded
Fix quoting bug in zfs. (#4726) (#4744)
(cherry picked from commit 01b32fec14)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-29 07:59:03 +02:00
patchback[bot]
99958cea49
redfish modules: documentation language and formatting (#4722) (#4725)
* redfish_command: documentation language and formatting

Update the documentation block with more English language
more consistent with other modules and finish each description
with a full stop.

* redfish_command: do not end short desc in full stop

* redfish_command: remove more "the" on documentation

Remove "The" from beginning of descriptions.

* redfish_command: start documentation description with capital case

* redfish_config: update documentation language and format

Add full stops at end of descriptions, small updates to language,
ensure descriptions start with a capital case letter.

* redfish_config: documentation consistency

Use "username" for description similarly to redfish_command.

* redfish_info: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* idrac_redfish_command: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* idrac_redfish_command: more doc consistency fixes

Call it iDRAC everywhere and not sometimes OOB controller.

* idrac_redfish_command: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* idrac_redfish_info: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* ilo_redfish_config: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* ilo_redfish_info: documentation formatting and language

Update documentation block for consistency with other modules
with full stop at end of descriptions and small language updates.

* idrac_redfish_info: documentation language

Call it "HTTP request" and not "URL request".

* idrac_redfish_command: documentation language fix

Call it "HTTP request" and not "URL request".

* idrac_redfish_config: documentation language fix

Call it "HTTP request" and not "URL request".

* redfish_command: documentation language fix

Call it "HTTP request" and not "URL request".

* redfish_config: documentation language fix

Call it "HTTP request" and not "URL request".

* redfish_info: documentation language fix

Call it "HTTP request" and not "URL request".

* redfish_command: documentation language fix

Boot device should be two words.

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 88cd35fd45)

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2022-05-24 20:20:25 +02:00
patchback[bot]
b2802dc8eb
redfish_command: documentation typo and language (#4718) (#4721)
Fix typo "od" to "of" and language

(cherry picked from commit d73789ba3a)

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2022-05-24 07:11:53 +02:00
patchback[bot]
8617568146
consul: applied bugfix from issue (#4712) (#4716)
* applied bugfix from issue

* added changelog fragment

(cherry picked from commit 4d2bed1dde)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-23 07:37:08 +02:00
patchback[bot]
7569d6315c
Multiple modules using ModuleHelper (#4674) (#4713)
* Multiple modules using ModuleHelper

Replaced raising exception with calling method do_raise() in MH.
Removed the importing of the exception class.

* added changelog fragment

(cherry picked from commit 6052776de1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-23 07:32:54 +02:00
patchback[bot]
ab5143b15d
Add RHEL 9.0, FreeBSD 13.1, Ubuntu 22.04 and Fedora 36 to CI, fix bug in filesystem module (#4700) (#4710)
* Add RHEL 9.0 and FreeBSD 13.1 to CI.

* RHEL 9 has no pyOpenSSL apparently.

* Adjust URL for EPEL.

* Fix cargo install on FreeBSD 13.1.

* Add Ubuntu 22.04 and Fedora 36 to CI.

* Fix logic.

* filesystem: do not die output line does not contain ':'

* Skip django_manage tests on RHEL 9 as well.

* homectl tests don't work with RHEL 9.0.

* Improve error handling, improve fatresize output handling.

* Skip Fedora 36.

* Skip filesystem vfat tests on Ubuntu 22.04.

There, resizing fails with a bug:
Bug: Assertion (disk != NULL) at ../../libparted/disk.c:1620 in function ped_disk_get_partition_by_sector() failed.

* 'trusty' is 14.04. Adding 22.04 to skip list.

* Skip jail tests for FreeBSD 13.1.

* Add config for postgres on Ubuntu 22.04.

* Make CentOS 6 happy.

* Adjust postgres version.

* Try installing EPEL a bit differently.

* Skip ufw and iso_extract tests on RHEL 9.

* Skip odbc tests on RHEL 9.

* Skip RHEL 9.0 for snap tests.

* Add changelog fragment for filesystem code changes.

(cherry picked from commit 319c29c2a2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-22 17:48:34 +02:00
patchback[bot]
056e16baa5
Update lenovoxcc module for compatibility with the virtualMedia resource location from Manager to System (#4682) (#4685)
* Update lenovoxcc module for compatibility due to redfish spec changes the virtualMedia resource location from Managers to Systems

* Add changelogs fragment for PR 4682

* Update changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8db265f99b)

Co-authored-by: jixj5 <66418293+jixj5@users.noreply.github.com>
2022-05-18 07:47:16 +02:00
Kirill Petrov
da2dfd0706
gitlab_hook: use None for non-existent attr in gitlab API response (#4668)
* gitlab_hook: use empty string for non-existent attr in gitlab API response;

* gitlab_hook: use None for non-existent attr in gitlab API response;

* gitlab_hook: use None for non-existent attr in gitlab API response - add changelog fragment;

* gitlab_hook: update changelog fragment for #4668

* Update changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-17 07:45:10 +02:00
Josh Kelley
00abaf6f80
Remove unsupported and unnecessary --no-emoji option (#4662)
* Remove unsupported and unnecessary --no-emoji option

`--no-emoji` causes errors in Yarn 2+ and should be unnecessary in Yarn 1.x; Yarn 1.x should only use emoji on supported interactive terminals.

* Add changelog fragment

* Update changelogs/fragments/4662-yarn-emoji.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/4662-yarn-emoji.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-16 08:45:12 +02:00
Ge0rgi0s
aeeb09f0da
Set firstrun to avoid use before definition (#4667)
* Set firstrun to avoid use before definition

At the moment if zypper updates itself the parse_zypper_xml function
calls itself with packages not None, but in check_mode zypper still
needs to update itself -> rc = 103 and firstrun is undefined

* Add changelog frament

* Update changelogs/fragments/4651-zypper-checkmode-fix.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Georg Vogt <georg.vogt@tngtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-16 07:40:46 +02:00
Alexei Znamensky
5d72d1be2f
ModuleHelper: added a do_raise() method to MH base class (#4660)
* ModuleHelper: added a do_raise() method to MH base class

* added changelog fragment

* Update changelogs/fragments/4660-mh-added-do-raise.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/module_utils/mh/base.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* using do_raise in CmdMixin

* simplified do_raise()

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-13 20:40:17 +02:00
Alexei Znamensky
fbff98c5f2
gconftool2: improvements (#4647)
* gconftool2: improvements

* added changelog fragment

* typo

* Update changelogs/fragments/4647-gconftool2-command-arg.yaml

Per recommendation from Felix. Danke!
2022-05-12 07:10:34 +02:00
Alexei Znamensky
a4b4756777
vmadm: minor refactoring (#4648)
* vmadm: minor refactor

- simplifications
- adjusting comments
- minor changes

* added changelog fragment

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-11 22:05:35 +02:00
Alexei Znamensky
358b579803
rax_files_objects: refactoring (#4649)
* rax_files_objects: refactoring

- simplifications
- use of comprehensions
- better use of exceptions
- improvements on the documentation blob
- src and dest mutually exclusive in module definition

* added changelog fragment

* Update plugins/modules/cloud/rackspace/rax_files_objects.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* rollback of mutually_exclusive

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-11 22:05:18 +02:00
Alexei Znamensky
73cea82fe7
ansible_galaxy_install: added deprecation for ansible 2.9 and ansible-base 2.10 (#4601)
* ansible_galaxy_install: added deprecation for ansible 2.9 and ansible-base 2.10

* added changelog fragment

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* ansible29 condition

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-10 05:59:45 +02:00
genofire
72bffce2fe
feat(ipa_dnsrecord): add multiple record support (#4578)
Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 22:28:34 +02:00
vvatlin
cf55ef852e
[pritunl] add mac_addresses parameter (#4535)
* add mac_addresses parameter

* add changelog

* remove debug line

* add second blank line

* add mac_addresses comparision

* Update changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: vadim <vadim>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 07:38:10 +02:00
Sam Doran
9e1af2d1bc
onepassword - Get first found config file (#4640)
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 07:24:35 +02:00
Alexei Znamensky
bca7f09b71
ModuleHelper module utils: delegates unknown attributes to AnsibleModule (#4600)
* ModuleHelper module util: delegates unknown attributes to AnsibleModule

* added changelog fragment

* delegate only a few selected attrs

* Update plugins/module_utils/mh/base.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/4600-mh-delegate.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 07:10:49 +02:00
Alexei Znamensky
b9266c31d0
zfs: refactoring (#4650)
* zfs: refactoring

* added changelog fragment
2022-05-08 13:50:53 +02:00
Jan-Piet Mens
e57fc54a10
Clarify ansible_pre_command_output (#4636)
##### SUMMARY
Clarify what ansible_pre_command_output actually is

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2022-05-08 08:45:55 +02:00
Andrea Tartaglia
4b0245355e
change list.copy() with list[:] for py2 compat in terraform module (#4621)
* change list.copy() with list[:] for py2 compat in terraform module

* add changelog fragment

* Update changelogs/fragments/4621-terraform-py2-compat.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-08 08:45:15 +02:00
Victor Martinez
9f702946cd
[opentelemetry][callback] fix hardcoded value for ansible_task_message (#4624)
* [opentelemetry][callback] fix hardcoded value for ansible_task_message

* opentelemetry: add changelog fragment
2022-05-05 12:42:59 +02:00
Alexei Znamensky
532a26692c
vmadm: improvements (#4581)
* improvements on vmadm

* added changelog fragment

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-05 08:23:52 +02:00
Alexei Znamensky
5a8422c8cb
consul: fixed bug in ConsulService when storing checks (#4590)
* consul: fixed bug in ConsulService when storing checks

* added changelog fragment

* typo
2022-05-05 08:23:00 +02:00
Victor Martinez
841b46ff6a
[opentelemetry][callback] fix warning when using the include_tasks (#4623)
* opentelemetry: fix include_tasks missing _task_fields

* opentelemetry: add uts for the include_tasks

* opentelemetry: add changelog fragment

* pep8: fix spaces
2022-05-05 08:21:16 +02:00
Felix Fontein
b711038b3b
dig lookup: deprecate DLV record type (#4618)
* Deprecate DLV record type.

* Use correct name.
2022-05-05 08:18:04 +02:00
Felix Fontein
9462506edc
Rename single-filter plugins so that the filename equals the filter name. (#4625) 2022-05-05 08:03:49 +02:00
Adam Robinson
f8889d1dd8
redfish_command: VirtualMediaInsert does not work with HPE iLO4 (#4596)
* Inserted not supported in patch on some hardware

Signed-off-by: Adam Robinson <adarobin@umich.edu>

* return error for ilo4 options with no defaults

* Update changelog

Co-authored-by: Felix Fontein <felix@fontein.de>

* make virtual_media_insert_via_patch backwards compatible

Co-authored-by: Felix Fontein <felix@fontein.de>

* remove ilo 4 specific properties check

* return ExtendedInfo as a string if no Message

* only worry about Inserted and WriteProtected

* update changelog

* fix for PEP8

* fix up comments

* fix VirtualMediaEject for iLO4 as well

* update changlog

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-05 07:56:26 +02:00
René Moser
dd9afc09a8
time_filter: allow 0 to return 0 (#4612)
* time_filter: allow 0 to return 0

* add changelog

* Update changelogs/fragments/4612-time_filter_zero.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-04 07:38:16 +02:00
René Moser
8d37591605
doc: time_filter: fix duplicate (#4611) 2022-05-03 17:46:36 +02:00
Felix Fontein
5cb7c2e45e
Small fixes. (#4605) 2022-05-02 07:49:49 +02:00
Felix Fontein
f055f47161
Document all filter and test plugins (#4597)
* Fix/improve docs.

* Document the a_module test.

* Document the dict filter.

* Linting.

* Add more filter docs.

* More filters.

* Update BOTMETA.

* Add another plugin.

* Fix typos.

* Add explicit entries.

* Fix lookup documentation.
2022-05-02 07:25:45 +02:00
Alexei Znamensky
a7499ce319
hponcfg: added missing types in documentation (#4589) 2022-04-28 07:58:03 +02:00
Alexei Znamensky
e96d2a5a3e
hpilo_info: added missing types in documentation (#4588) 2022-04-28 07:27:37 +02:00
Brian Coca
e62a56e15c
Add docs for ansible-core 2.13 use (#4202)
* Add docs for ansible-core 2.13 use

local testing shows fine, adding here as example for other filters/tests

* Update plugins/filter/random_mac.py

* Improve docs.

* Remove wrong 'positional'.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-27 23:13:05 +02:00
Brian Coca
378b20ac32
documenting to_seconds filter (#4203)
* documenting to_seconds filter

example of documenting filters when multiple exist inside one file

* Update to_seconds.yml

* Apply suggestions from code review

* Extend documentation. Add BOTMETA entry.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-27 22:39:36 +02:00
Alexei Znamensky
79f9d30989
hpilo_boot: added missing types in documentation (#4582) 2022-04-27 18:17:54 +02:00
Alexei Znamensky
c35bca6c8f
vmadm: deprecating unused parameter debug (#4580)
* vmadm: deprecating unused parameter debug

* added changelog fragment
2022-04-27 08:04:29 +02:00
Felix Fontein
7743ecd776
Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
Felix Fontein
1a9b3214fd
[5.0.0] Remove Ansible 2.9 / ansible-base 2.10 compatibility code (#4548)
* Remove Ansible 2.9 / ansible-base 2.10 compatibility code.

* Remove path_join shim from BOTMETA.

* Update comment.

* Bump minimally required ansible-core version.
2022-04-26 11:51:01 +02:00
Felix Fontein
36a0eca193
Deprecate norc's default. (#4517) 2022-04-26 11:45:43 +02:00
Felix Fontein
54b2f0819d
[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)
* Remove deprecated features.

* Fix changelog.

* Remove ignore.txt entries.

* One more.

* Remove state=get tests.
2022-04-26 11:45:15 +02:00
Tanner Prestegard
29c49febd9
Add 'state' parameter for alternatives (#4557)
* Add 'activate' parameter for alternatives

Allow alternatives to be installed without being set as the current
selection.

* add changelog fragment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* rename 'activate' -> 'selected'

* rework 'selected' parameter -> 'state'

* handle unsetting of currently selected alternative

* add integration tests for 'state' parameter

* fix linting issues

* fix for Python 2.7 compatibility

* Remove alternatives file.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-26 08:20:29 +02:00
CWollinger
d7e5e85f3e
New module alerta_customer (#4554)
* first draft of alerta_customer

* Update BOTMETA.yml

* update after review

* fix pagination and state description

* remove whitespace
2022-04-26 07:58:32 +02:00
Philippe Pépos-Petitclerc
346bfba9c5
Parse lxc key from api data for lxc containers (#4555)
* Parse lxc key from api data for lxc containers

When configuring containers in the `/etc/pve/lxc/` file, the API
adds a 'lxc' key that caused the plugin to crash as it tried to
split a list on ','.

This commit introduces logic to convert the list of lists in the
returned data to a dict as with the other keys.

```
'lxc': [['lxc.apparmor.profile', 'unconfined'],
	['lxc.cgroup.devices.allow', 'a']]
```

becomes

```
"proxmox_lxc": {
	"apparmor.profile": "unconfined",
	"cap.drop": "",
	"cgroup.devices.allow": "a"
}
```

* Add changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Philippe Pepos Petitclerc <peposp@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-25 22:21:36 +02:00
Raymond Chang
1d3506490f
New Module: LXD Projects (#4521)
* add lxd_project module

* documentation improvement and version_added entry

* improve documentation

* use os.path.expanduser

* exclude from use-argspec-type-path test

* improve documentation
2022-04-25 22:20:54 +02:00
Alexei Znamensky
f5b1b3c6f0
Command Runner (#4476)
* initial commit, passing unit tests

* passing one very silly integration test

* multiple changes:

- updated copyright year
- cmd_runner
  - added fmt_optval
  - created specific exceptions
  - fixed bug in context class where values from module params were not
    being used for resolving cmd arguments
  - changed order of class declaration for readability purpose
- tests
  - minor improvements in integration test code
  - removed some extraneous code in msimple.yml
  - minor improvements in unit tests
  - added few missing cases to unit test

* multiple changes

cmd_runner.py

- renamed InvalidParameterName to MissingArgumentFormat
  - improved exception parameters
- added repr and str to all exceptions
- added unpacking decorator for fmt functions
- CmdRunner
  - improved parameter validation
- _CmdRunnerContext
  - Context runs must now pass named arguments
  - Simplified passing of additional arguments to module.run_command()
  - Provided multiple context variables with info about the run

Integration tests

- rename msimple.py to cmd_echo.py for clarity
- added more test cases

* cmd_runner: env update can be passed to runner

* adding runner context info to output

* added comment on OrderedDict

* wrong variable

* refactored all fmt functions into static methods of a class

Imports should be simpler now, only one object fmt, with attr access to all callables

* added unit tests for CmdRunner

* fixed sanity checks

* fixed mock imports

* added more unit tests for CmdRunner

* terminology consistency

* multiple adjustments:

- remove extraneous imports
- renamed some variables
- added wrapper around arg formatters to handle individual arg ignore_none behaviour

* removed old code commented out in test

* multiple changes:

- ensure fmt functions return list of strings
- renamed fmt parameter from `option` to `args`
- renamed fmt.mapped to fmt.as_map
- simplified fmt.as_map
- added tests for fmt.as_fixed

* more improvements in formats

* fixed sanity

* args_order can be a string (to be split())

and improved integration test

* simplified integration test

* removed overkill str() on values - run_command does that for us

* as_list makes more sense than as_str in that context

* added changelog fragment

* Update plugins/module_utils/cmd_runner.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* adjusted __repr__ output for the exceptions

* added superclass object to classes

* added additional comment on the testcase sample/example

* suggestion from PR

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-25 22:12:00 +02:00
Timon Michel
dbad1e0f11
Allow Proxmox Snapshot Restoring (#4377)
* Allow restoring of snapshots

* Fix formatting

* Add documentation for new feature

* Revert unrelated reformatting

* Add documentation for snapshot change

* Remove redundant multiple call to status API

* Remove unneccesary indent

* Add documentation for timeout fix

* Update changelog fragment to reflect real changes

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelog fragment to reflect real changes

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add Tests for Snapshot rollback

* Update tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/4377-allow-proxmox-snapshot-restoring.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/misc/proxmox_snap.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-25 06:39:15 +02:00
Daniel
c8c2636676
Proxmox inventory: implement API token auth (#4540)
* Proxmox inventory: implement api token auth

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* fix linter errors

* add changelog fragment

* add examples

* fix a typo and break long lines

* Update changelogs/fragments/4540-proxmox-inventory-token-auth.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-24 12:55:47 +02:00
Alexei Znamensky
3b103f905e
Removed 'default=None' in a batch of modules 2 (#4567)
* removed default=None

* added changelog fragment
2022-04-24 07:42:36 +02:00
Alexei Znamensky
b916cb369b
Removed 'default=None' in a batch of modules (#4556)
* removed default=None

* removed default=None

* removed default=None

* removed default=None

* added changelog fragment
2022-04-24 07:41:24 +02:00
Raymond Chang
552db0d353
Add project support for lxd_container and lxd_profile module (#4479)
* add project support for lxd modules

* fix lxd_container yaml format error

* add changelog fragement add version_add entry

* fix LXD spelling

* complete lxd_profile example
2022-04-22 22:32:32 +02:00
Alexandr
0620cd2e74
Fix keycloak realm parameters types (#4526)
* Fix keycloack realm parameters types

* Add changelog fragment

* Update changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-22 22:31:38 +02:00
dupondje
53f6c68026
nmcli: Change hairpin default mode (#4334)
* nmcli: Deprecate default hairpin mode

Deprecate the default hairpin mode for a bridge.
Plain nmcli/bridge tools defaults to no, but for some reason ansible
defaults to yes.

We deprecate the default value so we can switch to default 'no' in
ansible 6.0.0

* Code review fixes

Co-authored-by: Felix Fontein <felix@fontein.de>

* Fix comments

* Update changelogs/fragments/4320-nmcli-hairpin.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/4320-nmcli-hairpin.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-04-22 22:30:53 +02:00
Bill Sanders
8e72e98adb
Implement contructable support for opennebula inventory plugin: keyed… (#4524)
* Implement contructable support for opennebula inventory plugin: keyed_groups, compose, groups

* Fixed templating mock issues in unit tests, corrected some linting errors

* trying to make the linter happy

* Now trying to make python2.7 happy

* Added changelog fragment

* changelog fragment needs pluralization

* Update changelogs/fragments/4524-update-opennebula-inventory-plugin-to-match-documentation.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-21 13:16:15 +02:00
ottobits
3cce1217db
nmap inventory plugin: Add sudo nmap (#4506)
* nmap.py: Add sudo nmap

* Update plugins/inventory/nmap.py

Change description of new plugin option adding version_added

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/nmap.py

Change boolean values of sudo option in example

Co-authored-by: Felix Fontein <felix@fontein.de>

* Create 4506-sudo-in-nmap-inv-plugin.yaml

* Fix typo in yaml format

* Update changelogs/fragments/4506-sudo-in-nmap-inv-plugin.yaml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/4506-sudo-in-nmap-inv-plugin.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Document default as false.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-04-21 09:54:38 +02:00
Alexei Znamensky
a2bfb96213
xfconf: added missing value types (#4534)
* xfconf: added missing value types

* added changelog fragment

* Update plugins/modules/system/xfconf.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-20 20:58:40 +02:00
vvatlin
51a68517ce
[pritunl] removed unnecessary data from auth string (#4530)
* removed unnecessary data from auth string

* add changelog

Co-authored-by: vadim <vadim>
2022-04-20 09:24:29 +02:00
Alexei Znamensky
3c6cb547f3
xfconf: improve docs (#4533) 2022-04-20 08:24:51 +02:00
Marcin
8076f16aa9
Correctly handle exception when no VM name returned by proxmox (#4508) 2022-04-19 18:31:12 +02:00
York Wong
a8abb1a5bf
remove deprecated branch.unprotect() method in community.general.gitlab_branch (#4496)
* remove deprecated branch.protect method

* add changelog fragment

* Update changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-19 18:26:09 +02:00
Felix Fontein
9e537d4a6b
Bump version numbers for deprecation and removal since we didn't deprecate this in 4.0.0. (#4515) 2022-04-16 21:28:11 +02:00
Felix Fontein
efbf02f284
Remove no longer true statement. (#4505) 2022-04-15 15:35:02 +02:00
Martin
3c515dd221
pacman: Fix removing locally installed packages (#4464)
* pacman: Fix removing locally installed packages

Without this, using `absent` state for a locally installed package (for example from AUR, or from a package that was dropped from repositories) would return that package is already removed, despite remaining installed

* Undo unwanted whitespace removal

* Add changelog fragment

* Update changelogs/fragments/4464-pacman-fix-local-remove.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add test.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 13:34:33 +02:00
John Villalovos
fe4bbc5de3
gitlab: Use all=True in most list() calls (#4491)
If `all=True` is not set then by default only 20 records will be
returned when calling `list()`. Use `all=True` so that all records
will be returned.

For the `list()` use where do not desire to retrieve all entries then
use`all=False` to show explicityly that we don't want to get all of
the entries.

Fixes: #3729
Fixes: #4460
2022-04-13 13:32:25 +02:00
Kamil Markowicz
e4a25beedc
Terraform init -upgrade flag (#4455)
* Adds optional `-upgrade` flag to terraform init.

This allows Terraform to install provider dependencies into an existing project when the provider constraints change.

* fix transposed documentation keys

* Add integration tests for terraform init

* Revert to validate_certs: yes for general public testing

* skip integration tests on irrelevant platforms

* skip legacy Python versions from CI tests

* add changelog fragment

* Update plugins/modules/cloud/misc/terraform.py

Adds version_added metadata to the new module option.

Co-authored-by: Felix Fontein <felix@fontein.de>

* Change terraform_arch constant to Ansible fact mapping

* correct var typo, clarify task purpose

* Squashed some logic bugs, added override for local Terraform

If `existing_terraform_path` is provided, the playbook will not download Terraform or check its version.

I also tested this on a local system with Terraform installed, and squashed some bugs related to using of an
existing binary.

* revert to previous test behavior for TF install

* readability cleanup

* Update plugins/modules/cloud/misc/terraform.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 11:16:54 +00:00
drevai753
06675034fe
dnsmadeeasy: only get monitor if it is not null api response (#4459)
* Only get monitor if it is not null api response

* Add changelog fragment

* Update changelogs/fragments/4459-only-get-monitor-if-it-is-not-null-api-response.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/dnsmadeeasy.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: drevai <revai.dominik@gravityrd.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 07:10:15 +02:00
elara-leitstellentechnik
8ccc4d1fbb
Implement btrfs resize support (#4465)
* Implement btrfs resize support

* Add changelog fragment for btrfs resize support

Co-authored-by: Fabian Klemp <fabian.klemp@frequentis.com>
2022-04-13 07:07:51 +02:00
Mike Raineri
a9125c02e7
Redfish: Added IndicatorLED commands to the Systems category (#4458)
* Redfish: Added IndicatorLED commands to the Systems category

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Method call typo fix

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Update 4084-add-redfish-system-indicator-led.yml

* Backwards compatibility suggestion

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2022-04-11 20:10:18 +02:00
ermeaney
6edc176143
add support for datadog monitors of type event-v2 (#4457)
* add support for datadog monitors of type event-v2

See https://docs.datadoghq.com/events/guides/migrating_to_new_events_features/

* add changelog fragement for PR

* typos

* add link to PR

* minor_fetaure, not bugfix

* add to description when we added event-v2 type

* Update changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-11 07:09:27 +02:00
Cameron Nemo
d3adde4739
modules/xbps: fix error message (#4438)
The previous error message was not giving the full or even correct
information to the user.
2022-04-11 07:05:04 +02:00
Alexei Znamensky
7e6a2453d0
seport: minor refactor (#4471)
* seport: minor refactor

* added changelog fragment

* Update plugins/modules/system/seport.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/system/seport.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-10 14:34:15 +02:00
Felix Fontein
865d7ac698
Deprecate want_proxmox_nodes_ansible_host option's default value. (#4466) 2022-04-10 08:46:49 +02:00
Ulf Tigerstedt
fa65b9d1f0
Fix documentation for sudoers module (#4469)
* Fix documentation for sudoers module

* Update plugins/modules/system/sudoers.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-10 15:39:09 +12:00
Wouter Schoot
380de2d0c1
Fix small typo (#4452) 2022-04-05 13:49:03 +02:00
Ricky White
e7ffa76db6
Bug fix: Warns user if incorrect SDK version is installed (#4422)
* Add error handling to check correct SDK version installed

* Fix CI errors

* Added changelog fragment

* Changed exeption type

* Update changelogs fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-05 07:25:41 +02:00
whoamiUNIX
79256b2bd2
Keycloak client, Add always_display_in_console option (#4429)
* Keycloak client, Add always_display_in_console option

* Add 4429-keycloak-client-add-always-display-in-console.yml fragment.

* Update changelogs/fragments/4429-keycloak-client-add-always-display-in-console.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Michal Vasko <mvasko@cloudwerkstatt.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-05 06:59:02 +02:00
Alex Groshev
feb0fffd58
nmcli: suggest new routes4 and routes6 format (#4328)
* suggest new routes4 and routes6 format

* make new options instead of modifying exiting one

* fix docs and some small errors

* fixing docs
2022-04-05 06:58:02 +02:00
tover99
bbe231e261
Bugfix: zypper issue with specified package versions (#4421)
* fixed issue with specified package versions

zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list.

* Create 4421-zypper_package_version_handling_fix

added changelog fragment for https://github.com/ansible-collections/community.general/pull/4421

* Delete 4421-zypper_package_version_handling_fix

* Create 4421-zypper_package_version_handling_fix.yml
2022-04-05 05:43:53 +02:00
sodd
1b357bade7
ipa_service: Add skip_host_check option (#4417)
* ipa_service: Add `skip_host_check` option

* Update plugins/modules/identity/ipa/ipa_service.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/ipa/ipa_service.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/ipa/ipa_service.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* changelogs/fragments: Add 4417-ipa_service-add-skip_host_check.yml

Co-authored-by: sodd <4178855+sodd@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-01 22:52:23 +02:00
Ilija Matoski
13d18c9aa8
Proxmox Inventory: Add support for templating in inventory file (#4418)
* added templating to the url, user, and password

* added changelog fragment

* typo in description for url, and password

* clarify in the changelog what can you change

* update documentation and added an example

* missing quote from examples

* Apply suggestions from code review

Changed to I for option names

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/proxmox.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-01 22:51:36 +02:00
Laurent Meunier
34420e143e
keycloak: add missing validate_certs parameters for open_url calls (#4382)
* fix: missing `validate_certs` parameters for `open_url` calls

As stated in the documentation, the `validate_certs` parameter can be
used to verify (or not) the TLS certificates. But, for some modules (at
least for the `keycloak_authentication` module), this parameter is not
used with the `open_url` function.

* add changelog fragment

* Update changelogs/fragments/4382-keycloak-add-missing-validate_certs-parameters.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Laurent Meunier <lme@atolcd.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-28 21:28:42 +02:00
Alex Lubbock
30c65cd84c
keycloak_client: add default_client_scopes and optional_client_scopes (#4385)
* keycloak_client: add default_client_scopes and optional_client_scopes

* Changelog fragment for #4385

* Update changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-28 21:28:03 +02:00
Emmanuel Benoît
622895fb55
Proxmox inventory plugin - Fix tags parsing (#4378)
* Proxmox inventory plugin - Fix tags parsing

  * In some cases the Proxmox API returns a tags string that consists in
    a single space. The Proxmox inventory plugin parsed that into a
    single, empty tag. Stripping the initial string then checking
    whether it actually contains something fixes that.
  * Do not call `_to_safe` on the concatenation of a known safe string
    and a string that was already made safe.

* Changelog fragment for Proxmox inventory plugin tags fix

* Proxmox inventory plugin - Include link to PR in fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-24 07:09:25 +01:00
shnee
cb30eb2d30
Fixed typo in keycloak_client_rolemapping examples (#4393)
* Fixed typo in keycloak_client_rolemapping examples

* Add a changelog fragment.

* Removed changelogs fragment for docs-only change.

Co-authored-by: shnee <shnee@shnee.net>
2022-03-24 07:08:11 +01:00
doubletwist13
17fe813c18
feat: sudoers module supports runas parameter with default of root (#4380)
* feat: sudoers module supports runas parameter with default of root

* fix: sudoers tests now pass

* chore: add changelog fragment for 4380

* fix: runas feature now a non-breaking change wh no def with no default

* fix: no trailing space in sudoers.py

* Update plugins/modules/system/sudoers.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-24 07:07:07 +01:00
Alexei Znamensky
8515c03dc7
ldap: added documentation as requested (#4389)
* added documentation as requested

* Update plugins/doc_fragments/ldap.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-24 07:05:26 +01:00
monkz
421ccd5dc9
plugins/inventory/lxd.py: fix listing of containers without os / release (#4351)
* plugins/inventory/lxd.py: fix listing of containers without os / release

In some cases, a container might be present, that was initialized empty, therefore lacking meta information about the os or the release.
Test if the data entry is None to avoid calling lower on it.

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Create 4351-inventory-lxd-handling_metadata_wo_os_and_release.yml

* fix yaml readability of changelog fragment

* Update changelogs/fragments/4351-inventory-lxd-handling_metadata_wo_os_and_release.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Malte Kuhn <mkuhn@maxcluster.de>
2022-03-16 13:52:22 +01:00
Felix Fontein
9618fb9786
Revert "Allow complex values in variables parameter of terraform module (#4281)" (#4368)
This reverts commit 4cc7f41395.
2022-03-16 07:13:17 +01:00
Emmanuel Benoît
3eec63421a
Proxmox inventory plugin - Fix string to dict conversion (#4349)
* Proxmox inventory plugin - Fix string to dict conversion (#4348)

  * Re-use the (defined but unused) `plaintext_configs` variable to list
    configuration entries that should be ignored by the string to
    dictionary conversion code. At this point, it only contains the
    `description` string.
  * Convert to a dictionary if the all substrings obtained by splitting
    off the initial value with commas contain a `=` character
  * Limit substring splitting to a single split, so that a substring
    containing `a=b=c` will generate an `a` entry with value `b=c`.

* Added changelog fragment for PR #4349

* Fix changelog fragment for #4349
2022-03-15 12:25:14 +01:00
Emmanuel Benoît
761171b532
Proxmox inventory filters (#4352)
* Proxmox inventory plugin - Initial implementation of filters

  * This is an attempt at implementing something that would satisfy
    issue #3553
  * A rather massive code rewrite was needed as adding the host to the
    inventory, setting its variables and adding it to various groups
    used to be done as soon as the information became available. This is
    not possible when it is not known whether the host should be added
    to the inventory before all data has been gathered.
  * The code for both LXC containers and Qemu VMs was refactored into a
    single loop.
  * Helper functions to generate group and fact names were added.

* Proxmox inventory plugin - Warnings for filter errors

  * When an error occurs while compositing a filter's value and strict
    mode is disabled, display a warning.

* Proxmox inventory plugin - Fixed pool groups building

  * Hosts that were excluded by the host filters were still being added
    to pool groups, causing errors.

* Proxmox inventory plugin - Refactoring

  * Split off the VM/container handling code from the
    `_populate()` method
  * Split off pool group attribution from the `_populate()` method

* Proxmox inventory filters - Changelog fragment

* proxmox inventory - Simplify _can_add_host() method

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-15 12:22:43 +01:00
Felix Fontein
85925eabea
Add description on keeping old behavior and already switching to new behavior. (#4361) 2022-03-15 11:45:47 +01:00