mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* changed the default proxmox container to unprivileged
* Reverted the default value with a deprecation.
* use true/false instead of yes/no
* Update plugins/modules/cloud/misc/proxmox.py
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* param -> parameter
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix
* review
* Update changelogs/fragments/5224-proxmox-unprivileged-default.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 33059a807c
)
Co-authored-by: Shaul Shnaidman <shaul753@gmail.com>
This commit is contained in:
parent
5d6047a21a
commit
ae3fe51929
2 changed files with 15 additions and 3 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
deprecated_features:
|
||||||
|
- proxmox - deprecated the current ``unprivileged`` default value, will be changed to ``true`` in community.general 7.0.0 (https://github.com/pull/5224).
|
|
@ -140,9 +140,11 @@ options:
|
||||||
type: str
|
type: str
|
||||||
unprivileged:
|
unprivileged:
|
||||||
description:
|
description:
|
||||||
- Indicate if the container should be unprivileged
|
- Indicate if the container should be unprivileged.
|
||||||
|
- >
|
||||||
|
The default value for this parameter is C(false) but that is deprecated
|
||||||
|
and it will be replaced with C(true) in community.general 7.0.0.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Specify the description for the container. Only used on the configuration web interface.
|
- Specify the description for the container. Only used on the configuration web interface.
|
||||||
|
@ -565,7 +567,7 @@ def main():
|
||||||
purge=dict(type='bool', default=False),
|
purge=dict(type='bool', default=False),
|
||||||
state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']),
|
state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']),
|
||||||
pubkey=dict(type='str'),
|
pubkey=dict(type='str'),
|
||||||
unprivileged=dict(type='bool', default=False),
|
unprivileged=dict(type='bool'),
|
||||||
description=dict(type='str'),
|
description=dict(type='str'),
|
||||||
hookscript=dict(type='str'),
|
hookscript=dict(type='str'),
|
||||||
proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']),
|
proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']),
|
||||||
|
@ -607,6 +609,14 @@ def main():
|
||||||
timeout = module.params['timeout']
|
timeout = module.params['timeout']
|
||||||
clone = module.params['clone']
|
clone = module.params['clone']
|
||||||
|
|
||||||
|
if module.params['unprivileged'] is None:
|
||||||
|
module.params['unprivileged'] = False
|
||||||
|
module.deprecate(
|
||||||
|
'The default value `false` for the parameter "unprivileged" is deprecated and it will be replaced with `true`',
|
||||||
|
version='7.0.0',
|
||||||
|
collection_name='community.general'
|
||||||
|
)
|
||||||
|
|
||||||
if module.params['proxmox_default_behavior'] == 'compatibility':
|
if module.params['proxmox_default_behavior'] == 'compatibility':
|
||||||
old_default_values = dict(
|
old_default_values = dict(
|
||||||
disk="3",
|
disk="3",
|
||||||
|
|
Loading…
Reference in a new issue