mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 01:55:51 +00:00
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>
This commit is contained in:
parent
1d3506490f
commit
346bfba9c5
2 changed files with 16 additions and 1 deletions
4
changelogs/fragments/4555-proxmox-lxc-key.yml
Normal file
4
changelogs/fragments/4555-proxmox-lxc-key.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
bugfixes:
|
||||
- proxmox inventory plugin - fix error when parsing container with LXC configs (https://github.com/ansible-collections/community.general/issues/4472, https://github.com/ansible-collections/community.general/pull/4472).
|
||||
minor_changes:
|
||||
- proxmox inventory plugin - parse LXC configs returned by the proxmox API (https://github.com/ansible-collections/community.general/pull/4472).
|
||||
Loading…
Add table
Add a link
Reference in a new issue