diff --git a/changelogs/fragments/5224-proxmox-unprivileged-default.yaml b/changelogs/fragments/5224-proxmox-unprivileged-default.yaml new file mode 100644 index 0000000000..d716ff285f --- /dev/null +++ b/changelogs/fragments/5224-proxmox-unprivileged-default.yaml @@ -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). diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index c6fbf24f9b..406666f57b 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -140,9 +140,11 @@ options: type: str unprivileged: 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 - default: false description: description: - 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), state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']), pubkey=dict(type='str'), - unprivileged=dict(type='bool', default=False), + unprivileged=dict(type='bool'), description=dict(type='str'), hookscript=dict(type='str'), proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']), @@ -607,6 +609,14 @@ def main(): timeout = module.params['timeout'] 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': old_default_values = dict( disk="3",