mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
5016f402a5
commit
39bf187a25
2 changed files with 26 additions and 0 deletions
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:
|
||||
- specifies network interfaces for the container. As a hash/dictionary defining interfaces.
|
||||
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:
|
||||
description:
|
||||
- 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'
|
||||
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
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
|
@ -479,6 +501,7 @@ def main():
|
|||
mounts=dict(type='dict'),
|
||||
ip_address=dict(),
|
||||
onboot=dict(type='bool'),
|
||||
features=dict(type='list', elements='str'),
|
||||
storage=dict(default='local'),
|
||||
cpuunits=dict(type='int'),
|
||||
nameserver=dict(),
|
||||
|
@ -599,6 +622,7 @@ def main():
|
|||
searchdomain=module.params['searchdomain'],
|
||||
force=int(module.params['force']),
|
||||
pubkey=module.params['pubkey'],
|
||||
features=",".join(module.params['features'] or []),
|
||||
unprivileged=int(module.params['unprivileged']),
|
||||
description=module.params['description'],
|
||||
hookscript=module.params['hookscript'])
|
||||
|
|
Loading…
Reference in a new issue