mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Proxmox - add features flag (#1413)
* Add 'features' option to proxmox LXC Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/misc/proxmox.py Co-authored-by: Felix Fontein <felix@fontein.de> * Apply suggestions from code review Co-authored-by: Amin Vakil <info@aminvakil.com> * Update proxmox.py Working fix * Update changelogs/fragments/1413-proxmox-features.yml Co-authored-by: Amin Vakil <info@aminvakil.com> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
2
changelogs/fragments/1413-proxmox-features.yml
Normal file
2
changelogs/fragments/1413-proxmox-features.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
minor_changes:
|
||||||
|
- proxmox - add ``features`` option to LXC (https://github.com/ansible-collections/community.general/issues/816).
|
||||||
@@ -69,6 +69,13 @@ options:
|
|||||||
description:
|
description:
|
||||||
- specifies network interfaces for the container. As a hash/dictionary defining interfaces.
|
- specifies network interfaces for the container. As a hash/dictionary defining interfaces.
|
||||||
type: dict
|
type: dict
|
||||||
|
features:
|
||||||
|
description:
|
||||||
|
- Specifies a list of features to be enabled. For valid options, see U(https://pve.proxmox.com/wiki/Linux_Container#pct_options).
|
||||||
|
- Some features require the use of a privileged container.
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
version_added: 2.0.0
|
||||||
mounts:
|
mounts:
|
||||||
description:
|
description:
|
||||||
- specifies additional mounts (separate disks) for the container. As a hash/dictionary defining mount points
|
- specifies additional mounts (separate disks) for the container. As a hash/dictionary defining mount points
|
||||||
@@ -270,6 +277,21 @@ EXAMPLES = r'''
|
|||||||
ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||||
cores: 2
|
cores: 2
|
||||||
|
|
||||||
|
- name: Create a new container with nesting enabled and allows the use of CIFS/NFS inside the container.
|
||||||
|
community.general.proxmox:
|
||||||
|
vmid: 100
|
||||||
|
node: uk-mc02
|
||||||
|
api_user: root@pam
|
||||||
|
api_password: 1q2w3e
|
||||||
|
api_host: node1
|
||||||
|
password: 123456
|
||||||
|
hostname: example.org
|
||||||
|
ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||||
|
features:
|
||||||
|
- nesting=1
|
||||||
|
- mount=cifs,nfs
|
||||||
|
|
||||||
|
|
||||||
- name: Start container
|
- name: Start container
|
||||||
community.general.proxmox:
|
community.general.proxmox:
|
||||||
vmid: 100
|
vmid: 100
|
||||||
@@ -479,6 +501,7 @@ def main():
|
|||||||
mounts=dict(type='dict'),
|
mounts=dict(type='dict'),
|
||||||
ip_address=dict(),
|
ip_address=dict(),
|
||||||
onboot=dict(type='bool'),
|
onboot=dict(type='bool'),
|
||||||
|
features=dict(type='list', elements='str'),
|
||||||
storage=dict(default='local'),
|
storage=dict(default='local'),
|
||||||
cpuunits=dict(type='int'),
|
cpuunits=dict(type='int'),
|
||||||
nameserver=dict(),
|
nameserver=dict(),
|
||||||
@@ -599,6 +622,7 @@ def main():
|
|||||||
searchdomain=module.params['searchdomain'],
|
searchdomain=module.params['searchdomain'],
|
||||||
force=int(module.params['force']),
|
force=int(module.params['force']),
|
||||||
pubkey=module.params['pubkey'],
|
pubkey=module.params['pubkey'],
|
||||||
|
features=",".join(module.params['features'] or []),
|
||||||
unprivileged=int(module.params['unprivileged']),
|
unprivileged=int(module.params['unprivileged']),
|
||||||
description=module.params['description'],
|
description=module.params['description'],
|
||||||
hookscript=module.params['hookscript'])
|
hookscript=module.params['hookscript'])
|
||||||
|
|||||||
Reference in New Issue
Block a user