Repository: ansible-collections/community.general

Issue:
proxmox lxc - add features (nesting, nfs, cifs...)
##### SUMMARY
Proxmox VE offers some special features for LXC containers. Please add these features to this module. These are:
- Nesting
- NFS
- CIFS
- FUSE
- Create Device Nodes

GUI Screenshot
![image](https://user-images.githubusercontent.com/38238648/90955545-9c72c180-e47e-11ea-8fee-23aa2f54665e.png)

Usage from command line:
pct create ... --features nesting=1 ...

Thank you

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/misc/proxmox.py









Discussion:
Files identified in the description:
* [`plugins/modules/cloud/misc/proxmox.py`](https://github.com/ansible-collections/community.general/blob/master/plugins/modules/cloud/misc/proxmox.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @UnderGreen @joshainglis @karmab
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py
--- a/plugins/modules/cloud/misc/proxmox.py
+++ b/plugins/modules/cloud/misc/proxmox.py
@@ -115,6 +115,13 @@
     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
@@ -317,6 +324,21 @@
     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
@@ -526,6 +548,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(),
@@ -646,6 +669,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'])


Test patch: