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

961 commits

Author SHA1 Message Date
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
Felix Fontein
73dde79484 Release 5.0.0-a1. 2022-04-29 12:28:39 +02:00
Felix Fontein
cca7f67c19 Prepare 5.0.0-a1 release. 2022-04-29 08:25:26 +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
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
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
Felix Fontein
828656a761 Fix filename. 2022-04-22 23:29:45 +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
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
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
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
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
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