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

1290 commits

Author SHA1 Message Date
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
Emmanuel Benoît
0b71d123d2
ldap_entry - Recursive deletion (#4355)
* ldap_entry - Recursive deletion

  * Recursive deletion can be enabled with the `recursive` option. It is
    disabled by default.
  * When enabled, deletion is attempted by sending a single delete
    request with the Subtree Delete control. If that request fails with
    the `NOT_ALLOWED_ON_NONLEAF` error, try deleting the whole branch in
    reverse order using individual delete requests.

* ldap_entry recursive deletion - Changelog fragment

* ldap_entry - Refactored to avoid lint message

* Update changelogs/fragments/4355-ldap-recursive-delete.yml

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

* ldap_entry - Add version_added to the recursive flag

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

* ldap_entry - Moved member assignment to a more suitable location

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-15 05:39:51 +01:00
Felix Fontein
cf4d68ac50
pacman: implement change detection for update_cache=true; add cache_updated return value (#4337)
* Implement change detection for update_cache=true. Add cache_updated return value.

* ...

* Make sure pacman --sync --list is called only as often as necessary.
2022-03-15 05:38:59 +01:00
Felix Fontein
ca2c64b5ca
Fix sanity issues. (#4346) 2022-03-14 20:56:27 +01:00
steven jacobs
386bb4bdd5
Fix linode inventory filtering (#4336)
* Fix linode inventory filtering

There was a regression introduced in the addition of caching. The
`_consume_options` method was added and provided the `config_data`
dictionary. This `pop`s every entry, resulting in an empty `config_data`
dict, which was then reused and expected to be populated.

After reviewing, `_consume_data` doesn't need to be called. Also, once
the ``_read_config_data` method has been called, we no longer need the
config_data dict, and can instead use the `get_option` method throughout.

Once those were removed, the filtering function seemed a bit odd, since
we were no longer using the file. I used that opportunity to move the
filter calls into the populate function directly.

* Remove tests that target removed methods

This removes tests that targeted some custom methods on configuration
file handling. These are no longer necessary since they are now handled
by the BaseInventoryPlugin `_read_config_data` method.

* Add changelog entry for linode inventory bugfix

* Revert filters back to their own method

This moves filters back into their own method, but now uses the
get_option calls to pull filter configuration items.
2022-03-14 20:38:32 +01:00
Fredrik Lysén
c40684db58
datadog: Add missing priority (#4311)
* datadog: Add missing priority

* datadog: Add missing priority

* datadog: Add missing priority

* datadog: Add documentation and variable declaration

* datadog: Add documentation and variable declaration

* datadog: Add documentation and variable declaration

* Update plugins/modules/monitoring/datadog/datadog_monitor.py

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

Co-authored-by: Fredrik Lysén <fredrik.lysen@klarna.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-14 07:14:58 +01:00
Alexei Znamensky
4af7f49ac0
mksysb - revamped module + fix bug in backup_dmapi_fs option (#3295)
* Revamped module + fix bug in backup_dmapi_fs option

* added changelog fragment

* added copyright line
2022-03-14 07:13:45 +01:00
Boosai
4fbba96841
jira: Use fields in comment to merge in additional data (#4304)
* jira: Use fields in comment to merge in additional data

* changlog fragment added

* Update changelogs/fragments/4304-jira-fields-in-comment.yml

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

* updated fields documentation

* Update plugins/modules/web_infrastructure/jira.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-12 07:30:28 +01:00
Josef Fuchs
c0415b9fae
Update doc. tss.py (env REQUESTS_CA_BUNDLE) (#4338)
* Update doc. tss.py (env REQUESTS_CA_BUNDLE)

Add a reference to environment variable REQUESTS_CA_BUNDLE to enable using self signed certificates (on-prem server) in documentation.

* Update tss.py

Remove trailing blank

* Update plugins/lookup/tss.py

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

* Update plugins/lookup/tss.py

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

* Update plugins/lookup/tss.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-11 06:55:08 +01:00
jcharlytown
9a74ace1e4
Add tls parameter to redis module (#4207)
* Add tls parameter to redis module

* Rename changelog fragment to match PR

* Apply suggestions from code review

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

* Port redis module to redis auth module util

* Update changelogs/fragments/4207-add-redis-tls-support.yml

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

* Update plugins/modules/database/misc/redis.py

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

* Undo reuse of redis auth doc fragment

* Use doc fragment.

Co-authored-by: Julian Faude <julian.faude@zweiacht.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-11 06:54:38 +01:00
Felix Fontein
10ca62905f
pacman: improve docs, make sure that packages is always returned, deprecate update_cache behavior (#4330)
* Improve docs, make sure that packages is always returned, deprecate update_cache behavior.

* Add cache_updated return value.

* Revert "Add cache_updated return value."

This reverts commit 367297bb5c.

* Update tests/unit/plugins/modules/packaging/os/test_pacman.py

Co-authored-by: Jean Raby <jean@raby.sh>

Co-authored-by: Jean Raby <jean@raby.sh>
2022-03-11 06:54:05 +01:00
Webster Mudge
4cc7f41395
Allow complex values in variables parameter of terraform module (#4281)
* Allow complex values in variables parameter

Signed-off-by: Webster Mudge <wmudge@gmail.com>

* Add changelog fragment

Signed-off-by: Webster Mudge <wmudge@gmail.com>

* Update changelogs fragments formatting

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-10 21:38:29 +01:00
Daniel Miller
43af053d73
npm: add support for production flag when using ci (#4299)
* npm - add  '--production` support to 'npm ci' flag

* add changelog fragement for 4299

* Add backticks

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-10 21:37:44 +01:00
Jean Raby
c698ecd201
pacman: add support for remove_nosave (#4316)
* pacman: add support for remove_nosave

New parameter: remove_nosave
When enabled, will pass --nosave to pacman when removing packages.
--nosave cannot be used with --print-format and thus it couldn't be
passed via extra_args. See #4315

The code adds the option right before the actual removal of the pkgs.

(This is based on an initial diff from MorphBonehunter)

* changelog

* Update plugins/modules/packaging/os/pacman.py

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

* wording

* ssss

* remove_package: simplify {force,extra,nosave}_args

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-08 07:21:40 +01:00
Davíð Steinn Geirsson
c0f53d60c4
proxmox: Fix error on VM clone (#4278) (#4306)
* proxmox: Fix error on VM clone (#4278)

Incorrect parameters for `get_vmid()` and `get_vm()` caused failures when
cloning VMs.

Fixes #4278

* Update changelogs/fragments/4306-proxmox-fix-error-on-vm-clone.yml

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

Co-authored-by: Davíð Steinn Geirsson <david@isnic.is>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-07 07:45:19 +01:00
Evangelos Foutras
cc8151f209
pacman: don't always return changed w/ update_cache (#4318)
* pacman: don't always return changed w/ update_cache

This used to be the behavior before the recent refactoring. [1]

Allows the following to return changed only when packages were upgraded:

  - pacman:
    update_cache: yes
    upgrade: yes

And the following to return changed only when the foo package wasn't at
the latest version:

  - pacman:
    name: foo
    state: latest
    update_cache: yes

[1] https://github.com/ansible-collections/community.general/pull/3907

* Update changelogs/fragments/4318-pacman-restore-old-changed-behavior.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-06 21:38:33 +01:00
Trey West
1ca7894d30
Remove nmcli modify dependency on type parameter (#4108)
* Remove nmcli modify dependency on type parameter

* Add fragment

* Add newline for lint

* Fixed linting for tests

* Fix fragment

* Move aliases to ip_conn_type function

* Remove connection_map

* Updated fragment

* Fixed fragment

Co-authored-by: Trey West <--local>
2022-03-06 08:56:44 +01:00
Jean Raby
d4e92fc720
pacman: user --groups instead of --group (#4312)
* s/group/groups/

Pacman accepts --group but the actual option name is --groups.
Allows use of other binaries with the same CLI interface as pacman (yay)

* changelog

* Apply suggestions from code review

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

* Add note regarding pacman compat + --print-format

* Update plugins/modules/packaging/os/pacman.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-04 19:25:42 +01:00
Markus Reiter
36ddb9b8e5
Fix error when checking if Proxmox VM exists. (#4287)
* Fix error when checking if VM exists.

* Add changelog entry.

* Reword changelog entry.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-04 07:31:24 +01:00
andrewroffey
9c3704bd00
[plugins/callback/syslog_json.py] use v2 api, add option to skip sysl… (#4223)
* [plugins/callback/syslog_json.py] use v2 api, add option to skip syslog on gather_facts

* Update plugins/callback/syslog_json.py

Add version

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

* Update plugins/callback/syslog_json.py

consistency for description

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

* Update plugins/callback/syslog_json.py

ANSIBLE_ environment variable prefix

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

* add changelog fragment for PR 4223

* Update changelogs/fragments/4223-syslog-json-skip-syslog-option.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-03 07:33:29 +01:00
Alexei Znamensky
f988eb5726
pipx: added options editable and pip_args (#4303)
* pipx: added options editable and pip_args

* added changelog fragment

* added version markers on new options
2022-03-02 22:16:47 +01:00
Jean Raby
a9db4742fc
pacman: re-adding support for URL based pkgs (#4286)
* pacman: re-adding support for URL based pkgs

* Update plugins/modules/packaging/os/pacman.py

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

* Update plugins/modules/packaging/os/pacman.py

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

* cmd=cmd in every call to self.fail()

* pacman: integration test for mixed pkg sources

* Add more tests + fix minor bug with URL packages

Version checking for URL packages is left to pacman, so add a check
after the dry run to see if it would actually install anything.

* remove double templating

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-01 06:03:18 +01:00
Jeff Mahoney
9a34e97702
zypper: support automatic removal of orphaned dependencies (#4195)
* zypper: support automatic removal of orphaned dependencies

* zypper: support automatic removal of orphaned dependencies

  - Add support for --clean-deps option during package removal, which
    will clean up packages that were only installed as dependencies
    of the package being removed.

* Update changelogs/fragments/4192-zypper-add-clean-deps.yml

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

* Update plugins/modules/packaging/os/zypper.py

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

* Update plugins/modules/packaging/os/zypper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-28 19:29:34 +01:00
quidame
0da8cb2e02
filesize: fix alpine linux sparse file (#4288)
* fix sparse file creation on Alpine linux

* re-enable tests for Alpine
* remove `conv=sparse` flag (rely only on `seek=fullsize` & `count=0`)
* doc: add a reference to busybox's dd
* doc: remove restrictions for OpenBSD, Solaris & AIX (should work as
  for Alpine linux now)
* add a changelog fragment

* fix typo

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-27 13:45:41 +01:00
Jean Raby
b9f62bb4ef
pacman: fix upgrade: yes (#4275)
* s/sys-upgrade/sysupgrade/

* changelog fragment

* yamllint

* more fragment tweaks
2022-02-23 17:24:14 +01:00
Jules Lamur
c1485b885d
Fixes for keycloak_user_federation (#4212)
* keycloak: fix creating a user federation w/ idempotent id

Creating a user federation while specifying an id (that doesn't exist
yet) will fail with a 404. This commits fix this behavior.

* keycloak: fix user federation mapper duplication

This commit fixes a bug where mappers are duplicated instead of
configured when creating a user federation.

When creating a user federation, some mappers are autogenerated by
keycloak. This commit lets the keycloak_user_federation module recompute
mappers final values after the user federation is created so that the
module can try to merge them by their name.

* add missing fragment for pr #4212
2022-02-22 09:23:44 +01:00
Alexei Znamensky
98073a2642
ansible_galaxy_install: added no_deps option (#4240)
* ansible_galaxy_install: added no_deps option

* added changelog fragment

* 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-02-22 08:59:04 +01:00
grembo
2416b81aa4
passwordstore: Add configurable locking (#4194)
* passwordstore: Add configurable locking

Passwordstore cannot be accessed safely in parallel, which causes
various issues:

- When accessing the same path, multiple different secrets are
  returned when the secret didn't exist (missing=create).
- When accessing the same _or different_ paths, multiple pinentry
  dialogs will be spawned by gpg-agent sequentially, having to enter
  the password for the same gpg key multiple times in a row.
- Due to issues in gpg dependencies, accessing gpg-agent in parallel
  is not reliable, causing plays to fail (this can be fixed by adding
  `auto-expand-secmem` to _~/.gnupg/gpg-agent.conf_ though).

These problems have been described in various github issues in the past,
e.g., ansible/ansible#23816 and ansible/ansible#27277.

This cannot be worked around in playbooks by users in a non-error-prone
way.

It is addressed by adding new configuration options:

- lock:
  - readwrite: Lock all operations
  - write: Only lock write operations (default)
  - none: Disable locking
- locktimeout: Time to wait for getting a lock (s/m/h suffix)
  (defaults to 15m)

These options can also be set in ansible.cfg, e.g.:

    [passwordstore_lookup]
    lock=readwrite
    locktimeout=30s

Also, add a note about modifying gpg-agent.conf.

* Tidy up locking config

There is no reason why lock configuration should be part of self.paramvals.
Now locking and its configuration happen all in one place.

* Change timeout description wording to the suggested value.

* Rearrange plugin setup, apply PR feedback
2022-02-21 21:14:17 +01:00
mizumm
5841935e37
pmem: Add namespace and namespace_append options (#4225)
* pmem: Add namespace and namespace_append options

- namespace: Configure the namespace of PMem. PMem should be configured
  by appdirect/memmode, or socket option in advance.
- namespace_append: Enables to append the new namespaces.

* Add changelog fragment entry

* Update the changelog fragment

* Update changelog fragment entry

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

* Update to use human_to_bytes

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

* Update to fix the description of namespace_append

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

* Update to release v4.5.0

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

* Update to fix the typo in the description of namespace_append

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-20 22:10:13 +01:00
Boris
40f9445aea
Fix module failure due to itertools.izip_longest (#4211)
* Fix module failure due to itertools.izip_longest

* Add changelog fragment. Remove itertools import

* Update changelogs/fragments/4206-imc-rest-module.yaml

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

Co-authored-by: Boris Vasilev <bvasilev@vmware.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-20 09:40:56 +01:00
Will Hegedus
f6e0693e86
feat: support cache in Linode inventory (#4179) 2022-02-18 23:15:29 +01:00
Felix Fontein
a262a30122
Fix some more instances of ansible.module_utils._text. (#4232) 2022-02-18 23:14:51 +01:00
Lénaïc Huard
8682ac96df
mail: fix the encoding of the mail senders and recipients name (#4061) 2022-02-18 21:58:46 +01:00
fachleitner
f5ec73735f
yum_versionlock: Fix entry matching (#4183)
As an input the module receives names of packages to lock.
Those never matched existing entries and therefore always reported
changes.

For compatibility yum is symlinked to dnf on newer systems,
but versionlock entries defer. Try to parse both formats.

Signed-off-by: Florian Achleitner <flo@fopen.at>
2022-02-18 21:07:09 +01:00
Sebastian Guarino
44f9bf545d
Rework of gitlab_project_variable over gitlab_group_variable (#4086)
* Rework of gitlab_project_variable over gitlab_group_variable

* Linting and removed unused example

* Fix test 2

* Sync from review of gitlab_project_variable #4038

* Linting, default protected True, value optional

* Next version is 4.5.0

* Roll back protected default true, and value not required

* Apply suggestions from code review

Missing check_mode

Co-authored-by: Markus Bergholz <git@osuv.de>

* Fix one unit test, comment test that requires premium gitlab

* Add changelog

* Update plugins/modules/source_control/gitlab/gitlab_group_variable.py

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

* Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml

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

* Added conditional gitlab_premium_tests variable when required

* Allow delete without value

* Fix variable name

* Linting

* Value should not be required in doc

* Linting missing new-line

* Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml

Co-authored-by: Markus Bergholz <git@osuv.de>

Co-authored-by: Markus Bergholz <git@osuv.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-18 20:58:38 +01:00
grembo
77a0c139c9
passwordstore: Fix error detection for non-English locales (#4219)
The passwordstore lookup plugin depends on parsing GnuPG's
error messages in English language. As a result, detection of
a specific error failes when users set a different locale.

This change corrects this by setting the `LANGUAGE` environment
variable to `C` when invoking `pass`, as this only affects
gettext translations.

See
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
2022-02-17 22:00:02 +01:00
grembo
da49c0968d
passwordstore: Prevent using path as password (#4192)
Given a password stored in _path/to/secret_, requesting the password
_path/to_ will literally return `path/to`. This can lead to using
weak passwords by accident/mess up logic in code, based on the
state of the password store.

This is worked around by applying the same logic `pass` uses:
If a password was returned, check if there is a .gpg file it could
have come from. If not, treat it as missing.

Fixes ansible-collections/community.general#4185
2022-02-17 20:58:36 +01:00
James Livulpi
f527bb61f9
ini_file: Don't report changed=true when removing if nothing is changed. (#4155)
* don't report changed when nothing is removed

* add change log

* linter happy

* Update plugins/modules/files/ini_file.py

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

* Update changelogs/fragments/4154-ini_file_changed.yml

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

* add absent idempotency test

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-17 13:35:46 +01:00
Léo GATELLIER
05c3e0d69f
gitlab_runner: Make owned and project mutually exclusive (#4136)
* gitlab_runner: Set owned and project mutually exclusive

* gitlab_runner : Refactor _runners_endpoint usage
2022-02-16 22:54:46 +01:00
thuttinpasseron
988cc82a89
[modules/cloud/misc/proxmox_kvm] Adding EFI disk support (#4106)
* Included efidisk0 option to be able to create VMs with persitent EFI disks

* Added forgotten argument to create_vm invocation and missing test for update

* Added changelog fragment relevant to PR

* Fixed documentation issues (missing period, and added version) from review

* Removed breaking change dependency for new option, modified changelog fragment according to review

* Fixed typo in documentation

* Added examples of `efidisk0` usage

* Added examples of `efidisk0` usage

* Fixed lines containing blank spaces

* Rebased on 4.4.0, added efi option, added sanity checks on efi option

* Adjusted version_added to 4.5.0

* Corrected typo in create_vm invocation, adjusted merging of efi and efidisk0 options

* Updated efidosk0 option to dict, added flattening to str, added constraint on bios option if efidisk0 is set

* Replaced loop by list comprehension for efidisk0 flattening

* Removed unused code left over from refactor from efi/efidis0 options
2022-02-16 22:32:57 +01:00
mizumm
7f793c83f1
New module: pmem to configure Intel Optane Persistent Memory modules (#4162)
* Add new module: pmem

This commit introduces to pmem module to configure Intel Optane
Persistent Memory modules (PMem).

* Add botmeta

* Update plugins/modules/storage/pmem/pmem.py

* Convert to snake_case options

* Update related to xmltodict

* Update to use list instead of string

* Update to use single quote to the string

* Update plugins/modules/storage/pmem/pmem.py
2022-02-16 22:30:17 +01:00
Nikolas Laskaris
2498591695
Updated keycloak.py to allow defining connection timeout value (#4168) (#4178)
* Updated keycloak.py to allow defining connection timeout value (#4168) (#2)

* Added parameter to doc_fragments and edited the changelog message (#4168)

* Added parameter to doc_fragments and edited the changelog message (#4168)
2022-02-14 19:43:17 +01:00
pastral
54b29208a2
Add scaleway_private_network module (#4042)
* begin add private network

* scaleway_private_network , basic add and remove ok, work in progress

* scaleway_private_network : add search in next page

* scalewy_private_network add tags

* scaleway_private_network fix correct return value for register

* scaleway_privat_network change some text

* fix some sanity

* fix  line too long

* fix  line too long SCALEWAY_LOCATION

* some change for sanity

* fix sanity again

* add author in BOTMETA

* fix error in name  in fike BOTMETA

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* add test for scaleway_private_network

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

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

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

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

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

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-14 18:13:55 +01:00
Andrea Ghensi
00cab64f7a
proxmox_kvm: add win11 to ostype (#4191)
* proxmox_kvm: add win11 to ostype

* add changelog fragment

* Update changelogs/fragments/4191-proxmox-add-win11.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-12 17:44:20 +01:00
Victor Martinez
aa554c2887
opentelemetry: enrich services for jenkins, hetzner or jira (#4105)
* opentelemetry: enrich services for jenkins, hetzner, jira, zypper, chocolatey

* remove source and name for the time being

Those arguments can be later on in the future added, maybe with some opt-in feature, so let's only focus in the ones which are fully http based for now

* changelog fragment

* Update changelogs/fragments/4105-opentelemetry_plugin-enrich_jira_hetzner_jenkins_services.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-12 09:31:00 +01:00
thuttinpasseron
14b8cd9c64
[modules/cloud/misc/proxmox_kvm] Update docs for storage format option (#4186)
* Updated storage format documentation to point to PVE docs to show possible values

* Fixed trailing space
2022-02-12 09:22:03 +01:00
Pavol Babinčák‏
9567c99c9f
dconf: Skip processes that disappeared while we inspected them (#4153)
* dconf: Skip processes that disappeared while we inspected them

Fixes #4151

* Update changelogs/fragments/4151-dconf-catch-psutil-nosuchprocess.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-10 07:15:37 +01:00
Jean Raby
1580f3c2b4
request for comments - pacman: speed up most operations when working with a package list (#3907)
* pacman: rewrite with a cache to speed up execution

- Use a cache (or inventory) to speed up lookups of:
  - installed packages and groups
  - available packages and groups
  - upgradable packages
- Call pacman with the list of pkgs instead of one call per package (for
  installations, upgrades and removals)
- Use pacman [--sync|--upgrade] --print-format [...] to gather list of
  changes. Parsing that instead of the regular output of pacman, which
  is error prone and can be changed by user configuration.
  This can introduce a TOCTOU problem but unless something else calls
  pacman between the invocations, it shouldn't be a concern.
- Given the above, "check mode" code is within the function that would
  carry out the actual operation. This should make it harder for the
  check code and the "real code" to diverge.
- Support for specifying alternate package name formats is a bit more
  robust. pacman is used to extract the name of the package when the
  specified package is a file or a URL.
  The "<repo>/<pkgname>" format is also supported.

For "state: latest" with a list of ~35 pkgs, this module is about 5
times faster than the original.

* Let fail() actually work

* all unhappy paths now end up calling fail()

* Update copyright

* Argument changes

update_cache_extra_args handled as a list like the others
moved the module setup to its own function for easier testing
update and upgrade have no defaults (None) to let required_one_of() do
its job properly

* update_cache exit path

Shift successful exit without name or upgrade under "update_cache".

It is an error if name or upgrade isn't specified and update_cache wasn't specified
either. (Caught by ansiblemodule required_one_of but still)

* Add pkgs to output on success only

Also align both format, only pkg name for now

* Multiple fixes

Move VersionTuple to top level for import from tests
Add removed pkgs to the exit json when removing packages
fixup list of upgraded pkgs reported on upgrades (was tuple of list for
no reason)
use list idiom for upgrades, like the rest
drop unused expand_package_groups function
skip empty lines when building inventory

* pacman: add tests

* python 2.x compat + pep8

* python 2.x some more

* Fix failure when pacman emits warnings

Add tests covering that failure case

* typo

* Whitespace

black failed me...

* Adjust documentation to fit implicit defaults

* fix test failures on older pythons

* remove file not intended for commit

* Test exception str with e.match

* Build inventory after cache update + adjust tests

* Apply suggestions from code review

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

* Update plugins/modules/packaging/os/pacman.py

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

* changelog

* bump copyright year and add my name to authors

* Update changelogs/fragments/3907-pacman-speedup.yml

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

* maintainer entry

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-08 22:46:00 +01:00
Joseph Torcasso
acd8853242
vdo: Remove unused variable (#4163)
* fix vdo error #3916

* add changelog fragment
2022-02-07 20:12:44 +01:00
Markus Reiter
a61bdbadd5
Refactor all Proxmox modules to use shared module_utils. (#4029)
* Refactor Proxmox modules to use `module_utils`.

* Fix tests.

* Rename `node_check`.

* Add `ignore_missing` to `get_vm`.

* Refactor `proxmox` module.

* Add changelog entry.

* Add `choose_first_if_multiple` parameter for deprecation.
2022-02-07 06:21:24 +01:00
IronTooch
c09f529f02
Update Proxmox Inventory Documentation with additional examples (#4148)
* Update Documentation with additional example

* Added an example to have the plugin return an IP address for a Proxmox guest, instead of the name of the guest (default behavior)
* Added an example to include a string literal to every guest (to support a playbook being able to check for variable presence to identify inventory in use)

* Update for line length readability

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

* Changed to cleaner static value

* Changed text for clarity

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-05 21:16:07 +01:00
Markus Bergholz
69551ac325
gitlab_project_variable: Allow delete without value (#4150)
* value is not required when state is absent

* fix integration test. missing value

* fix condition

* add changelog fragment

* fail fast

* try required_if on suboptions

* revert

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* fix naming in doc

* typo in name

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-05 21:02:04 +01:00
Felix Fontein
9322809b3a
Fix return value documentation to use a valid value for 'type'. (#4142) 2022-02-02 20:58:27 +00:00
Joseph Torcasso
8b95c56030
homebrew_cask: reinstall when force is install option (#4090)
* homebrew_cask: reinstall when force is install option

* add changelog entry

* Fix OSX CI runs - run as non-root

* test with cask that has no macos dependencies

* use `brooklyn` cask to test
2022-02-02 21:31:05 +01:00
Felix Fontein
e09254df91
mail callback: fully use Ansible's option handling; deprecate not specifying sender (#4140)
* Fully use Ansible's option handling. Deprecate not specifying sender.

* Update plugins/callback/mail.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-02-01 10:12:03 +01:00
Markus Bergholz
33a65ae20f
Fix and rework gitlab_project_variable (#4038)
* rework-and-fix

* fix delete bug and change report

* delete the requested variables based on env scope

* fix absent logic when not purge: remove what is requested

* change code to current behaviour

* complete implementation

* fix delete

* restore origin return structure

* reorder

* add test for origin bug

* add changelog fragment

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* remove yaml

* apply suggestions

* readd accidental removed line

* improve the truth of return value 'project_variable' in check mode

* fix pep8, over-indented

* fix typos and add subelement options

* Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml

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

* Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* remove diff feature

* resolve all recommentdations

* resolve change requests, improve doc and remove default value before compare, because values always exists (prebuild)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 20:00:37 +01:00
Nedelin Petkov
969ad475e3
Added new feature for ansible_user and ansible_port in Icinga2 inventory source (#4088)
* Added new feature for ansible_user and ansible_port

* Replaced 'try' and 'except' with 'if' condition

* Replace '!=' with 'is not'

* Fixed if condition

* Implement the constructed interface

* Correction at the suggestion of felixfontein

* Added new options in unit test for icinga2 inventory

* Added blank lines in unit test for icinga2 inventory

* Added default filter in example

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

* Fixed variable name in example

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

* Added a changelog fragment

* Fixed changelog fragment

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

* Updated documentation options

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:50:08 +01:00
LucasBoisserie
5710faab64
Add profile parameter for scaleway inventory (#4049)
* add profile parameter for scaleway inventory

* Update doc from review and add changelog

* Update changelogs from review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:33:35 +01:00
gaetan-craft
6a7811f696
Fix local port regex in listen_ports_facts (#4092)
* Fix local port regex

Thsi PR fix the bug reported in #4091

* Update changelogs/fragments/4092-fix_local_ports_regex_listen_ports_facts.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:33:11 +01:00
Seena Fallah
929136808f
gitlab: use gitlab instance runner to create runner (#3965)
When using project it will use project level runner to create runner that based on python-gitlab it will be used for enabling runner and needs a runner_id so for creating a new runner it should use gitlab level runner

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2022-01-31 05:58:00 +01:00
Orion Poplawski
0dd886bac8
[inventory/cobbler] Add include_profiles option (#4068)
* [inventory/cobbler] Add exclude/include_profile option

Also some minor cleanup

* Review suggestions

* Still must init cache_key

* Add note to exclude_profiles about include_profiles

* Add changelog fragment
2022-01-31 05:57:09 +01:00
Will Hegedus
f77a1114fb
linode: Allow templating token for dynamic inventory (#4040)
* linode: Allow templating token for dynamic inventory

Template the value for the access_token if it's a Jinja template.

Allows for looking up tokens from files or pulling from secrets stores like Vault.

* add Linode changelog fragment

* Fix lookup example for newer versions of Ansible

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

* Rename test case for clarity

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-30 22:16:59 +01:00