|
|
@ -25,12 +25,10 @@ options:
|
|
|
|
api_host:
|
|
|
|
api_host:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the host of the Proxmox VE cluster
|
|
|
|
- the host of the Proxmox VE cluster
|
|
|
|
default: null
|
|
|
|
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
api_user:
|
|
|
|
api_user:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the user to authenticate with
|
|
|
|
- the user to authenticate with
|
|
|
|
default: null
|
|
|
|
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
api_password:
|
|
|
|
api_password:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
@ -52,26 +50,26 @@ options:
|
|
|
|
node:
|
|
|
|
node:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Proxmox VE node, when new VM will be created
|
|
|
|
- Proxmox VE node, when new VM will be created
|
|
|
|
- required only for state="present"
|
|
|
|
- required only for C(state=present)
|
|
|
|
- for another states will be autodiscovered
|
|
|
|
- for another states will be autodiscovered
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
password:
|
|
|
|
password:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the instance root password
|
|
|
|
- the instance root password
|
|
|
|
- required only for state="present"
|
|
|
|
- required only for C(state=present)
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
hostname:
|
|
|
|
hostname:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the instance hostname
|
|
|
|
- the instance hostname
|
|
|
|
- required only for state="present"
|
|
|
|
- required only for C(state=present)
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
ostemplate:
|
|
|
|
ostemplate:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the template for VM creating
|
|
|
|
- the template for VM creating
|
|
|
|
- required only for state="present"
|
|
|
|
- required only for C(state=present)
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
disk:
|
|
|
|
disk:
|
|
|
@ -145,9 +143,9 @@ options:
|
|
|
|
force:
|
|
|
|
force:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- forcing operations
|
|
|
|
- forcing operations
|
|
|
|
- can be used only with states "present", "stopped", "restarted"
|
|
|
|
- can be used only with states C(present), C(stopped), C(restarted)
|
|
|
|
- with state="present" force option allow to overwrite existing container
|
|
|
|
- with C(state=present) force option allow to overwrite existing container
|
|
|
|
- with states "stopped", "restarted" allow to force stop instance
|
|
|
|
- with states C(stopped) , C(restarted) allow to force stop instance
|
|
|
|
default: false
|
|
|
|
default: false
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
type: boolean
|
|
|
@ -159,7 +157,7 @@ options:
|
|
|
|
notes:
|
|
|
|
notes:
|
|
|
|
- Requires proxmoxer and requests modules on host. This modules can be installed with pip.
|
|
|
|
- Requires proxmoxer and requests modules on host. This modules can be installed with pip.
|
|
|
|
requirements: [ "proxmoxer", "requests" ]
|
|
|
|
requirements: [ "proxmoxer", "requests" ]
|
|
|
|
author: Sergei Antipov
|
|
|
|
author: "Sergei Antipov @UnderGreen"
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|