����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
# -*- coding: utf-8 -*-
#
# Copyright Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

from __future__ import absolute_import, division, print_function
__metaclass__ = type

DOCUMENTATION = '''
---
module: proxmox
short_description: Management of instances in Proxmox VE cluster
description:
  - allows you to create/delete/stop instances in Proxmox VE cluster
  - Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older)
  - Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior).
attributes:
  check_mode:
    support: none
  diff_mode:
    support: none
options:
  password:
    description:
      - the instance root password
    type: str
  hostname:
    description:
      - the instance hostname
      - required only for C(state=present)
      - must be unique if vmid is not passed
    type: str
  ostemplate:
    description:
      - the template for VM creating
      - required only for C(state=present)
    type: str
  disk:
    description:
      - This option was previously described as "hard disk size in GB for instance" however several formats describing
        a lxc mount are permitted.
      - Older versions of Proxmox will accept a numeric value for size using the I(storage) parameter to automatically
        choose which storage to allocate from, however new versions enforce the C(<STORAGE>:<SIZE>) syntax.
      - "Additional options are available by using some combination of the following key-value pairs as a
        comma-delimited list C([volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>]
        [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>])."
      - See U(https://pve.proxmox.com/wiki/Linux_Container) for a full description.
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(3).
    type: str
  cores:
    description:
      - Specify number of cores per socket.
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
    type: int
  cpus:
    description:
      - numbers of allocated cpus for instance
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
    type: int
  memory:
    description:
      - memory size in MB for instance
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(512).
    type: int
  swap:
    description:
      - swap memory size in MB for instance
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(0).
    type: int
  netif:
    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
    type: dict
  ip_address:
    description:
      - specifies the address the container will be assigned
    type: str
  onboot:
    description:
      - specifies whether a VM will be started during system bootup
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(false).
    type: bool
  storage:
    description:
      - target storage
    type: str
    default: 'local'
  cpuunits:
    description:
      - CPU weight for a VM
      - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1000).
    type: int
  nameserver:
    description:
      - sets DNS server IP address for a container
    type: str
  searchdomain:
    description:
      - sets DNS search domain for a container
    type: str
  tags:
    description:
      - List of tags to apply to the container.
      - Tags must start with C([a-z0-9_]) followed by zero or more of the following characters C([a-z0-9_-+.]).
      - Tags are only available in Proxmox 7+.
    type: list
    elements: str
    version_added: 6.2.0
  timeout:
    description:
      - timeout for operations
    type: int
    default: 30
  force:
    description:
      - forcing operations
      - can be used only with states C(present), C(stopped), C(restarted)
      - with C(state=present) force option allow to overwrite existing container
      - with states C(stopped) , C(restarted) allow to force stop instance
    type: bool
    default: false
  purge:
    description:
      - Remove container from all related configurations.
      - For example backup jobs, replication jobs, or HA.
      - Related ACLs and Firewall entries will always be removed.
      - Used with state C(absent).
    type: bool
    default: false
    version_added: 2.3.0
  state:
    description:
     - Indicate desired state of the instance
    type: str
    choices: ['present', 'started', 'absent', 'stopped', 'restarted']
    default: present
  pubkey:
    description:
      - Public key to add to /root/.ssh/authorized_keys. This was added on Proxmox 4.2, it is ignored for earlier versions
    type: str
  unprivileged:
    description:
      - 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
  description:
    description:
      - Specify the description for the container. Only used on the configuration web interface.
      - This is saved as a comment inside the configuration file.
    type: str
    version_added: '0.2.0'
  hookscript:
    description:
      - Script that will be executed during various steps in the containers lifetime.
    type: str
    version_added: '0.2.0'
  proxmox_default_behavior:
    description:
      - As of community.general 4.0.0, various options no longer have default values.
        These default values caused problems when users expected different behavior from Proxmox
        by default or filled options which caused problems when set.
      - The value C(compatibility) (default before community.general 4.0.0) will ensure that the default values
        are used when the values are not explicitly specified by the user. The new default is C(no_defaults),
        which makes sure these options have no defaults.
      - This affects the I(disk), I(cores), I(cpus), I(memory), I(onboot), I(swap), I(cpuunits) options.
    type: str
    default: no_defaults
    choices:
      - compatibility
      - no_defaults
    version_added: "1.3.0"
  clone:
    description:
      - ID of the container to be cloned.
      - I(description), I(hostname), and I(pool) will be copied from the cloned container if not specified.
      - The type of clone created is defined by the I(clone_type) parameter.
      - This operator is only supported for Proxmox clusters that use LXC containerization (PVE version >= 4).
    type: int
    version_added: 4.3.0
  clone_type:
    description:
      - Type of the clone created.
      - C(full) creates a full clone, and I(storage) must be specified.
      - C(linked) creates a linked clone, and the cloned container must be a template container.
      - C(opportunistic) creates a linked clone if the cloned container is a template container, and a full clone if not.
        I(storage) may be specified, if not it will fall back to the default.
    type: str
    choices: ['full', 'linked', 'opportunistic']
    default: opportunistic
    version_added: 4.3.0
author: Sergei Antipov (@UnderGreen)
extends_documentation_fragment:
  - community.general.proxmox.documentation
  - community.general.proxmox.selection
  - community.general.attributes
'''

EXAMPLES = r'''
- name: Create new container with minimal options
  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'

- name: Create new container with hookscript and description
  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'
    hookscript: 'local:snippets/vm_hook.sh'
    description: created with ansible

- name: Create new container automatically selecting the next available vmid.
  community.general.proxmox:
    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'

- name: Create new container with minimal options with force(it will rewrite existing 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'
    force: true

- name: Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before)
  community.general.proxmox:
    vmid: 100
    node: uk-mc02
    api_user: root@pam
    api_host: node1
    password: 123456
    hostname: example.org
    ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'

- name: Create new container with minimal options defining network interface with dhcp
  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'
    netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}'

- name: Create new container with minimal options defining network interface with static ip
  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'
    netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}'

- name: Create new container with minimal options defining a mount with 8GB
  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'
    mounts: '{"mp0":"local:8,mp=/mnt/test/"}'

- name: Create new container with minimal options defining a cpu core limit
  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'
    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: >
    Create a linked clone of the template container with id 100. The newly created container with be a
    linked clone, because no storage parameter is defined
  community.general.proxmox:
    vmid: 201
    node: uk-mc02
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    clone: 100
    hostname: clone.example.org

- name: Create a full clone of the container with id 100
  community.general.proxmox:
    vmid: 201
    node: uk-mc02
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    clone: 100
    hostname: clone.example.org
    storage: local

- name: Start container
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    state: started

- name: >
    Start container with mount. You should enter a 90-second timeout because servers
    with additional disks take longer to boot
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    state: started
    timeout: 90

- name: Stop container
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    state: stopped

- name: Stop container with force
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    force: true
    state: stopped

- name: Restart container(stopped or mounted container you can't restart)
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    state: restarted

- name: Remove container
  community.general.proxmox:
    vmid: 100
    api_user: root@pam
    api_password: 1q2w3e
    api_host: node1
    state: absent
'''

import re
import time

from ansible_collections.community.general.plugins.module_utils.version import LooseVersion

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native

from ansible_collections.community.general.plugins.module_utils.proxmox import (
    ansible_to_proxmox_bool, proxmox_auth_argument_spec, ProxmoxAnsible)

VZ_TYPE = None


class ProxmoxLxcAnsible(ProxmoxAnsible):
    def content_check(self, node, ostemplate, template_store):
        return [True for cnt in self.proxmox_api.nodes(node).storage(template_store).content.get() if cnt['volid'] == ostemplate]

    def is_template_container(self, node, vmid):
        """Check if the specified container is a template."""
        proxmox_node = self.proxmox_api.nodes(node)
        config = getattr(proxmox_node, VZ_TYPE)(vmid).config.get()
        return config['template']

    def create_instance(self, vmid, node, disk, storage, cpus, memory, swap, timeout, clone, **kwargs):

        # Version limited features
        minimum_version = {
            'tags': 7,
        }
        proxmox_node = self.proxmox_api.nodes(node)

        # Remove all empty kwarg entries
        kwargs = dict((k, v) for k, v in kwargs.items() if v is not None)

        version = self.version()
        pve_major_version = 3 if version < LooseVersion('4.0') else version.version[0]

        # Fail on unsupported features
        for option, version in minimum_version.items():
            if pve_major_version < version and option in kwargs:
                self.module.fail_json(changed=False, msg="Feature {option} is only supported in PVE {version}+, and you're using PVE {pve_major_version}".
                                      format(option=option, version=version, pve_major_version=pve_major_version))

        if VZ_TYPE == 'lxc':
            kwargs['cpulimit'] = cpus
            kwargs['rootfs'] = disk
            if 'netif' in kwargs:
                kwargs.update(kwargs['netif'])
                del kwargs['netif']
            if 'mounts' in kwargs:
                kwargs.update(kwargs['mounts'])
                del kwargs['mounts']
            if 'pubkey' in kwargs:
                if self.version() >= LooseVersion('4.2'):
                    kwargs['ssh-public-keys'] = kwargs['pubkey']
                del kwargs['pubkey']
        else:
            kwargs['cpus'] = cpus
            kwargs['disk'] = disk

        # LXC tags are expected to be valid and presented as a comma/semi-colon delimited string
        if 'tags' in kwargs:
            re_tag = re.compile(r'^[a-z0-9_][a-z0-9_\-\+\.]*$')
            for tag in kwargs['tags']:
                if not re_tag.match(tag):
                    self.module.fail_json(msg='%s is not a valid tag' % tag)
            kwargs['tags'] = ",".join(kwargs['tags'])

        if clone is not None:
            if VZ_TYPE != 'lxc':
                self.module.fail_json(changed=False, msg="Clone operator is only supported for LXC enabled proxmox clusters.")

            clone_is_template = self.is_template_container(node, clone)

            # By default, create a full copy only when the cloned container is not a template.
            create_full_copy = not clone_is_template

            # Only accept parameters that are compatible with the clone endpoint.
            valid_clone_parameters = ['hostname', 'pool', 'description']
            if self.module.params['storage'] is not None and clone_is_template:
                # Cloning a template, so create a full copy instead of a linked copy
                create_full_copy = True
            elif self.module.params['storage'] is None and not clone_is_template:
                # Not cloning a template, but also no defined storage. This isn't possible.
                self.module.fail_json(changed=False, msg="Cloned container is not a template, storage needs to be specified.")

            if self.module.params['clone_type'] == 'linked':
                if not clone_is_template:
                    self.module.fail_json(changed=False, msg="'linked' clone type is specified, but cloned container is not a template container.")
                # Don't need to do more, by default create_full_copy is set to false already
            elif self.module.params['clone_type'] == 'opportunistic':
                if not clone_is_template:
                    # Cloned container is not a template, so we need our 'storage' parameter
                    valid_clone_parameters.append('storage')
            elif self.module.params['clone_type'] == 'full':
                create_full_copy = True
                valid_clone_parameters.append('storage')

            clone_parameters = {}

            if create_full_copy:
                clone_parameters['full'] = '1'
            else:
                clone_parameters['full'] = '0'
            for param in valid_clone_parameters:
                if self.module.params[param] is not None:
                    clone_parameters[param] = self.module.params[param]

            taskid = getattr(proxmox_node, VZ_TYPE)(clone).clone.post(newid=vmid, **clone_parameters)
        else:
            taskid = getattr(proxmox_node, VZ_TYPE).create(vmid=vmid, storage=storage, memory=memory, swap=swap, **kwargs)

        while timeout:
            if self.api_task_ok(node, taskid):
                return True
            timeout -= 1
            if timeout == 0:
                self.module.fail_json(msg='Reached timeout while waiting for creating VM. Last line in task before timeout: %s' %
                                      proxmox_node.tasks(taskid).log.get()[:1])

            time.sleep(1)
        return False

    def start_instance(self, vm, vmid, timeout):
        taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.start.post()
        while timeout:
            if self.api_task_ok(vm['node'], taskid):
                return True
            timeout -= 1
            if timeout == 0:
                self.module.fail_json(msg='Reached timeout while waiting for starting VM. Last line in task before timeout: %s' %
                                      self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1])

            time.sleep(1)
        return False

    def stop_instance(self, vm, vmid, timeout, force):
        if force:
            taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.shutdown.post(forceStop=1)
        else:
            taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.shutdown.post()
        while timeout:
            if self.api_task_ok(vm['node'], taskid):
                return True
            timeout -= 1
            if timeout == 0:
                self.module.fail_json(msg='Reached timeout while waiting for stopping VM. Last line in task before timeout: %s' %
                                      self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1])

            time.sleep(1)
        return False

    def umount_instance(self, vm, vmid, timeout):
        taskid = getattr(self.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.umount.post()
        while timeout:
            if self.api_task_ok(vm['node'], taskid):
                return True
            timeout -= 1
            if timeout == 0:
                self.module.fail_json(msg='Reached timeout while waiting for unmounting VM. Last line in task before timeout: %s' %
                                      self.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1])

            time.sleep(1)
        return False


def main():
    module_args = proxmox_auth_argument_spec()
    proxmox_args = dict(
        vmid=dict(type='int', required=False),
        node=dict(),
        pool=dict(),
        password=dict(no_log=True),
        hostname=dict(),
        ostemplate=dict(),
        disk=dict(type='str'),
        cores=dict(type='int'),
        cpus=dict(type='int'),
        memory=dict(type='int'),
        swap=dict(type='int'),
        netif=dict(type='dict'),
        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(),
        searchdomain=dict(),
        timeout=dict(type='int', default=30),
        force=dict(type='bool', default=False),
        purge=dict(type='bool', default=False),
        state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']),
        pubkey=dict(type='str'),
        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']),
        clone=dict(type='int'),
        clone_type=dict(default='opportunistic', choices=['full', 'linked', 'opportunistic']),
        tags=dict(type='list', elements='str')
    )
    module_args.update(proxmox_args)

    module = AnsibleModule(
        argument_spec=module_args,
        required_if=[
            ('state', 'present', ['node', 'hostname']),
            ('state', 'present', ('clone', 'ostemplate'), True),  # Require one of clone and ostemplate. Together with mutually_exclusive this ensures that we
                                                                  # either clone a container or create a new one from a template file.
        ],
        required_together=[
            ('api_token_id', 'api_token_secret')
        ],
        required_one_of=[('api_password', 'api_token_id')],
        mutually_exclusive=[('clone', 'ostemplate')],  # Creating a new container is done either by cloning an existing one, or based on a template.
    )

    proxmox = ProxmoxLxcAnsible(module)

    global VZ_TYPE
    VZ_TYPE = 'openvz' if proxmox.version() < LooseVersion('4.0') else 'lxc'

    state = module.params['state']
    vmid = module.params['vmid']
    node = module.params['node']
    disk = module.params['disk']
    cpus = module.params['cpus']
    memory = module.params['memory']
    swap = module.params['swap']
    storage = module.params['storage']
    hostname = module.params['hostname']
    if module.params['ostemplate'] is not None:
        template_store = module.params['ostemplate'].split(":")[0]
    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",
            cores=1,
            cpus=1,
            memory=512,
            swap=0,
            onboot=False,
            cpuunits=1000,
        )
        for param, value in old_default_values.items():
            if module.params[param] is None:
                module.params[param] = value

    # If vmid not set get the Next VM id from ProxmoxAPI
    # If hostname is set get the VM id from ProxmoxAPI
    if not vmid and state == 'present':
        vmid = proxmox.get_nextvmid()
    elif not vmid and hostname:
        vmid = proxmox.get_vmid(hostname)
    elif not vmid:
        module.exit_json(changed=False, msg="Vmid could not be fetched for the following action: %s" % state)

    # Create a new container
    if state == 'present' and clone is None:
        try:
            if proxmox.get_vm(vmid, ignore_missing=True) and not module.params['force']:
                module.exit_json(changed=False, msg="VM with vmid = %s is already exists" % vmid)
            # If no vmid was passed, there cannot be another VM named 'hostname'
            if (not module.params['vmid'] and
                    proxmox.get_vmid(hostname, ignore_missing=True) and
                    not module.params['force']):
                vmid = proxmox.get_vmid(hostname)
                module.exit_json(changed=False, msg="VM with hostname %s already exists and has ID number %s" % (hostname, vmid))
            elif not proxmox.get_node(node):
                module.fail_json(msg="node '%s' not exists in cluster" % node)
            elif not proxmox.content_check(node, module.params['ostemplate'], template_store):
                module.fail_json(msg="ostemplate '%s' not exists on node %s and storage %s"
                                 % (module.params['ostemplate'], node, template_store))
        except Exception as e:
            module.fail_json(msg="Pre-creation checks of {VZ_TYPE} VM {vmid} failed with exception: {e}".format(VZ_TYPE=VZ_TYPE, vmid=vmid, e=e))

        try:
            proxmox.create_instance(vmid, node, disk, storage, cpus, memory, swap, timeout, clone,
                                    cores=module.params['cores'],
                                    pool=module.params['pool'],
                                    password=module.params['password'],
                                    hostname=module.params['hostname'],
                                    ostemplate=module.params['ostemplate'],
                                    netif=module.params['netif'],
                                    mounts=module.params['mounts'],
                                    ip_address=module.params['ip_address'],
                                    onboot=ansible_to_proxmox_bool(module.params['onboot']),
                                    cpuunits=module.params['cpuunits'],
                                    nameserver=module.params['nameserver'],
                                    searchdomain=module.params['searchdomain'],
                                    force=ansible_to_proxmox_bool(module.params['force']),
                                    pubkey=module.params['pubkey'],
                                    features=",".join(module.params['features']) if module.params['features'] is not None else None,
                                    unprivileged=ansible_to_proxmox_bool(module.params['unprivileged']),
                                    description=module.params['description'],
                                    hookscript=module.params['hookscript'],
                                    tags=module.params['tags'])

            module.exit_json(changed=True, msg="Deployed VM %s from template %s" % (vmid, module.params['ostemplate']))
        except Exception as e:
            module.fail_json(msg="Creation of %s VM %s failed with exception: %s" % (VZ_TYPE, vmid, e))

    # Clone a container
    elif state == 'present' and clone is not None:
        try:
            if proxmox.get_vm(vmid, ignore_missing=True) and not module.params['force']:
                module.exit_json(changed=False, msg="VM with vmid = %s is already exists" % vmid)
            # If no vmid was passed, there cannot be another VM named 'hostname'
            if (not module.params['vmid'] and
                    proxmox.get_vmid(hostname, ignore_missing=True) and
                    not module.params['force']):
                vmid = proxmox.get_vmid(hostname)
                module.exit_json(changed=False, msg="VM with hostname %s already exists and has ID number %s" % (hostname, vmid))
            if not proxmox.get_vm(clone, ignore_missing=True):
                module.exit_json(changed=False, msg="Container to be cloned does not exist")
        except Exception as e:
            module.fail_json(msg="Pre-clone checks of {VZ_TYPE} VM {vmid} failed with exception: {e}".format(VZ_TYPE=VZ_TYPE, vmid=vmid, e=e))

        try:
            proxmox.create_instance(vmid, node, disk, storage, cpus, memory, swap, timeout, clone)

            module.exit_json(changed=True, msg="Cloned VM %s from %s" % (vmid, clone))
        except Exception as e:
            module.fail_json(msg="Cloning %s VM %s failed with exception: %s" % (VZ_TYPE, vmid, e))

    elif state == 'started':
        try:
            vm = proxmox.get_vm(vmid)
            if getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.current.get()['status'] == 'running':
                module.exit_json(changed=False, msg="VM %s is already running" % vmid)

            if proxmox.start_instance(vm, vmid, timeout):
                module.exit_json(changed=True, msg="VM %s started" % vmid)
        except Exception as e:
            module.fail_json(msg="starting of VM %s failed with exception: %s" % (vmid, e))

    elif state == 'stopped':
        try:
            vm = proxmox.get_vm(vmid)

            if getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.current.get()['status'] == 'mounted':
                if module.params['force']:
                    if proxmox.umount_instance(vm, vmid, timeout):
                        module.exit_json(changed=True, msg="VM %s is shutting down" % vmid)
                else:
                    module.exit_json(changed=False, msg=("VM %s is already shutdown, but mounted. "
                                                         "You can use force option to umount it.") % vmid)

            if getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.current.get()['status'] == 'stopped':
                module.exit_json(changed=False, msg="VM %s is already shutdown" % vmid)

            if proxmox.stop_instance(vm, vmid, timeout, force=module.params['force']):
                module.exit_json(changed=True, msg="VM %s is shutting down" % vmid)
        except Exception as e:
            module.fail_json(msg="stopping of VM %s failed with exception: %s" % (vmid, e))

    elif state == 'restarted':
        try:
            vm = proxmox.get_vm(vmid)

            vm_status = getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.current.get()['status']
            if vm_status in ['stopped', 'mounted']:
                module.exit_json(changed=False, msg="VM %s is not running" % vmid)

            if (proxmox.stop_instance(vm, vmid, timeout, force=module.params['force']) and
                    proxmox.start_instance(vm, vmid, timeout)):
                module.exit_json(changed=True, msg="VM %s is restarted" % vmid)
        except Exception as e:
            module.fail_json(msg="restarting of VM %s failed with exception: %s" % (vmid, e))

    elif state == 'absent':
        if not vmid:
            module.exit_json(changed=False, msg='VM with hostname = %s is already absent' % hostname)
        try:
            vm = proxmox.get_vm(vmid, ignore_missing=True)
            if not vm:
                module.exit_json(changed=False, msg="VM %s does not exist" % vmid)

            vm_status = getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE)(vmid).status.current.get()['status']
            if vm_status == 'running':
                module.exit_json(changed=False, msg="VM %s is running. Stop it before deletion." % vmid)

            if vm_status == 'mounted':
                module.exit_json(changed=False, msg="VM %s is mounted. Stop it with force option before deletion." % vmid)

            delete_params = {}

            if module.params['purge']:
                delete_params['purge'] = 1

            taskid = getattr(proxmox.proxmox_api.nodes(vm['node']), VZ_TYPE).delete(vmid, **delete_params)

            while timeout:
                if proxmox.api_task_ok(vm['node'], taskid):
                    module.exit_json(changed=True, msg="VM %s removed" % vmid)
                timeout -= 1
                if timeout == 0:
                    module.fail_json(msg='Reached timeout while waiting for removing VM. Last line in task before timeout: %s'
                                     % proxmox.proxmox_api.nodes(vm['node']).tasks(taskid).log.get()[:1])

                time.sleep(1)
        except Exception as e:
            module.fail_json(msg="deletion of VM %s failed with exception: %s" % (vmid, to_native(e)))


if __name__ == '__main__':
    main()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
aerospike_migrations.py File 18.75 KB 0644
airbrake_deployment.py File 4.8 KB 0644
aix_devices.py File 9.89 KB 0644
aix_filesystem.py File 17.48 KB 0644
aix_inittab.py File 7.33 KB 0644
aix_lvg.py File 11 KB 0644
aix_lvol.py File 10.54 KB 0644
alerta_customer.py File 6.61 KB 0644
ali_instance.py File 39.51 KB 0644
ali_instance_info.py File 13.79 KB 0644
alternatives.py File 14.23 KB 0644
ansible_galaxy_install.py File 15.21 KB 0644
apache2_mod_proxy.py File 16.85 KB 0644
apache2_module.py File 8.95 KB 0644
apk.py File 12.07 KB 0644
apt_repo.py File 3.71 KB 0644
apt_rpm.py File 7.75 KB 0644
archive.py File 22.65 KB 0644
atomic_container.py File 6.69 KB 0644
atomic_host.py File 2.8 KB 0644
atomic_image.py File 5.3 KB 0644
awall.py File 4.61 KB 0644
beadm.py File 11.87 KB 0644
bearychat.py File 5.36 KB 0644
bigpanda.py File 6.32 KB 0644
bitbucket_access_key.py File 8.75 KB 0644
bitbucket_pipeline_key_pair.py File 5.95 KB 0644
bitbucket_pipeline_known_host.py File 8.8 KB 0644
bitbucket_pipeline_variable.py File 8.6 KB 0644
bower.py File 6.78 KB 0644
btrfs_info.py File 3.08 KB 0644
btrfs_subvolume.py File 28.14 KB 0644
bundler.py File 6.98 KB 0644
bzr.py File 6.02 KB 0644
campfire.py File 5.15 KB 0644
capabilities.py File 6.8 KB 0644
cargo.py File 5.9 KB 0644
catapult.py File 4.35 KB 0644
circonus_annotation.py File 7.46 KB 0644
cisco_webex.py File 5.58 KB 0644
clc_aa_policy.py File 10.52 KB 0644
clc_alert_policy.py File 17.39 KB 0644
clc_blueprint_package.py File 10.25 KB 0644
clc_firewall_policy.py File 21.16 KB 0644
clc_group.py File 16.72 KB 0644
clc_loadbalancer.py File 34.43 KB 0644
clc_modify_server.py File 34.27 KB 0644
clc_publicip.py File 12.15 KB 0644
clc_server.py File 55.34 KB 0644
clc_server_snapshot.py File 14.16 KB 0644
cloud_init_data_facts.py File 3.45 KB 0644
cloudflare_dns.py File 34.21 KB 0644
cobbler_sync.py File 4.38 KB 0644
cobbler_system.py File 10.74 KB 0644
composer.py File 9.25 KB 0644
consul.py File 21.73 KB 0644
consul_acl.py File 21.9 KB 0644
consul_kv.py File 11.4 KB 0644
consul_session.py File 9.69 KB 0644
copr.py File 16.71 KB 0644
cpanm.py File 8.59 KB 0644
cronvar.py File 13.65 KB 0644
crypttab.py File 10.98 KB 0644
datadog_downtime.py File 10.48 KB 0644
datadog_event.py File 5.77 KB 0644
datadog_monitor.py File 15.77 KB 0644
dconf.py File 18.53 KB 0644
deploy_helper.py File 19.5 KB 0644
dimensiondata_network.py File 9.03 KB 0644
dimensiondata_vlan.py File 18.51 KB 0644
discord.py File 6.7 KB 0644
django_manage.py File 15.82 KB 0644
dnf_versionlock.py File 12.25 KB 0644
dnsimple.py File 16.26 KB 0644
dnsimple_info.py File 9.35 KB 0644
dnsmadeeasy.py File 23.71 KB 0644
dpkg_divert.py File 13.43 KB 0644
easy_install.py File 6.63 KB 0644
ejabberd_user.py File 5.88 KB 0644
elasticsearch_plugin.py File 9.72 KB 0644
emc_vnx_sg_member.py File 5.12 KB 0644
etcd3.py File 8.56 KB 0644
facter.py File 1.88 KB 0644
filesize.py File 16.85 KB 0644
filesystem.py File 21 KB 0644
flatpak.py File 12.16 KB 0644
flatpak_remote.py File 9.08 KB 0644
flowdock.py File 5.84 KB 0644
gandi_livedns.py File 5.05 KB 0644
gconftool2.py File 5.41 KB 0644
gconftool2_info.py File 2.2 KB 0644
gem.py File 10.22 KB 0644
git_config.py File 8.63 KB 0644
github_deploy_key.py File 11.91 KB 0644
github_issue.py File 3.1 KB 0644
github_key.py File 7.49 KB 0644
github_release.py File 6.16 KB 0644
github_repo.py File 8.57 KB 0644
github_webhook.py File 8.75 KB 0644
github_webhook_info.py File 5.27 KB 0644
gitlab_branch.py File 5.46 KB 0644
gitlab_deploy_key.py File 9.41 KB 0644
gitlab_group.py File 13.13 KB 0644
gitlab_group_members.py File 18.54 KB 0644
gitlab_group_variable.py File 15.39 KB 0644
gitlab_hook.py File 12.31 KB 0644
gitlab_project.py File 26.07 KB 0644
gitlab_project_badge.py File 5.99 KB 0644
gitlab_project_members.py File 18.81 KB 0644
gitlab_project_variable.py File 16.48 KB 0644
gitlab_protected_branch.py File 6.92 KB 0644
gitlab_runner.py File 16.47 KB 0644
gitlab_user.py File 22.36 KB 0644
grove.py File 3.37 KB 0644
gunicorn.py File 6.73 KB 0644
hana_query.py File 7 KB 0644
haproxy.py File 17.2 KB 0644
heroku_collaborator.py File 4.21 KB 0644
hg.py File 9.77 KB 0644
hipchat.py File 6.28 KB 0644
homebrew.py File 30.28 KB 0644
homebrew_cask.py File 27.09 KB 0644
homebrew_tap.py File 7.59 KB 0644
homectl.py File 25.17 KB 0644
honeybadger_deployment.py File 3.76 KB 0644
hpilo_boot.py File 6.77 KB 0644
hpilo_info.py File 8.43 KB 0644
hponcfg.py File 3.1 KB 0644
htpasswd.py File 9.23 KB 0644
hwc_ecs_instance.py File 58.07 KB 0644
hwc_evs_disk.py File 34.9 KB 0644
hwc_network_vpc.py File 13.83 KB 0644
hwc_smn_topic.py File 9.79 KB 0644
hwc_vpc_eip.py File 26.16 KB 0644
hwc_vpc_peering_connect.py File 17.58 KB 0644
hwc_vpc_port.py File 30.1 KB 0644
hwc_vpc_private_ip.py File 9.57 KB 0644
hwc_vpc_route.py File 11.57 KB 0644
hwc_vpc_security_group.py File 18.89 KB 0644
hwc_vpc_security_group_rule.py File 17.45 KB 0644
hwc_vpc_subnet.py File 20.28 KB 0644
ibm_sa_domain.py File 4.35 KB 0644
ibm_sa_host.py File 3.38 KB 0644
ibm_sa_host_ports.py File 3.64 KB 0644
ibm_sa_pool.py File 3.06 KB 0644
ibm_sa_vol.py File 2.79 KB 0644
ibm_sa_vol_map.py File 3.71 KB 0644
icinga2_feature.py File 4.32 KB 0644
icinga2_host.py File 10.07 KB 0644
idrac_redfish_command.py File 7.79 KB 0644
idrac_redfish_config.py File 10.92 KB 0644
idrac_redfish_info.py File 7.95 KB 0644
ilo_redfish_command.py File 5.17 KB 0644
ilo_redfish_config.py File 5.46 KB 0644
ilo_redfish_info.py File 5.85 KB 0644
imc_rest.py File 15.01 KB 0644
imgadm.py File 9.8 KB 0644
infinity.py File 21.86 KB 0644
influxdb_database.py File 3.84 KB 0644
influxdb_query.py File 2.73 KB 0644
influxdb_retention_policy.py File 11.77 KB 0644
influxdb_user.py File 9.03 KB 0644
influxdb_write.py File 2.55 KB 0644
ini_file.py File 18.01 KB 0644
installp.py File 9.18 KB 0644
interfaces_file.py File 14.75 KB 0644
ip_netns.py File 3.49 KB 0644
ipa_config.py File 12.92 KB 0644
ipa_dnsrecord.py File 12.58 KB 0644
ipa_dnszone.py File 5.83 KB 0644
ipa_group.py File 11.41 KB 0644
ipa_hbacrule.py File 13.54 KB 0644
ipa_host.py File 10.51 KB 0644
ipa_hostgroup.py File 7.69 KB 0644
ipa_otpconfig.py File 5.69 KB 0644
ipa_otptoken.py File 22.64 KB 0644
ipa_pwpolicy.py File 8.83 KB 0644
ipa_role.py File 10.72 KB 0644
ipa_service.py File 7.15 KB 0644
ipa_subca.py File 7.54 KB 0644
ipa_sudocmd.py File 4.65 KB 0644
ipa_sudocmdgroup.py File 6.13 KB 0644
ipa_sudorule.py File 18.58 KB 0644
ipa_user.py File 13.82 KB 0644
ipa_vault.py File 7.93 KB 0644
ipify_facts.py File 2.91 KB 0644
ipinfoio_facts.py File 3.61 KB 0644
ipmi_boot.py File 6.45 KB 0644
ipmi_power.py File 8.27 KB 0644
iptables_state.py File 21.49 KB 0644
ipwcli_dns.py File 10.97 KB 0644
irc.py File 9.31 KB 0644
iso_create.py File 10.63 KB 0644
iso_customize.py File 11.19 KB 0644
iso_extract.py File 6.48 KB 0644
jabber.py File 4.56 KB 0644
java_cert.py File 19.97 KB 0644
java_keystore.py File 21.66 KB 0644
jboss.py File 5.84 KB 0644
jenkins_build.py File 9.01 KB 0644
jenkins_job.py File 11.73 KB 0644
jenkins_job_info.py File 7.49 KB 0644
jenkins_plugin.py File 27.48 KB 0644
jenkins_script.py File 6.6 KB 0644
jira.py File 26.18 KB 0644
kdeconfig.py File 8.16 KB 0644
kernel_blacklist.py File 4.04 KB 0644
keycloak_authentication.py File 19.1 KB 0644
keycloak_authz_authorization_scope.py File 9.72 KB 0644
keycloak_client.py File 36.33 KB 0644
keycloak_client_rolemapping.py File 12.5 KB 0644
keycloak_clientscope.py File 18.03 KB 0644
keycloak_clientscope_type.py File 8.93 KB 0644
keycloak_clientsecret_info.py File 4.47 KB 0644
keycloak_clientsecret_regenerate.py File 4.78 KB 0644
keycloak_clienttemplate.py File 16.01 KB 0644
keycloak_group.py File 16.42 KB 0644
keycloak_identity_provider.py File 22.37 KB 0644
keycloak_realm.py File 27.68 KB 0644
keycloak_realm_info.py File 3.82 KB 0644
keycloak_role.py File 11.54 KB 0644
keycloak_user_federation.py File 38.33 KB 0644
keycloak_user_rolemapping.py File 14.9 KB 0644
keyring.py File 8.28 KB 0644
keyring_info.py File 4.1 KB 0644
kibana_plugin.py File 7.94 KB 0644
launchd.py File 17.04 KB 0644
layman.py File 7.67 KB 0644
lbu.py File 2.88 KB 0644
ldap_attrs.py File 10.93 KB 0644
ldap_entry.py File 8.73 KB 0644
ldap_passwd.py File 3.95 KB 0644
ldap_search.py File 5.42 KB 0644
librato_annotation.py File 5.65 KB 0644
linode.py File 24.74 KB 0644
linode_v4.py File 9.45 KB 0644
listen_ports_facts.py File 14.46 KB 0644
lldp.py File 2.54 KB 0644
locale_gen.py File 7.23 KB 0644
logentries.py File 4.44 KB 0644
logentries_msg.py File 2.34 KB 0644
logstash_plugin.py File 4.82 KB 0644
lvg.py File 12.66 KB 0644
lvol.py File 21.61 KB 0644
lxc_container.py File 54.26 KB 0644
lxca_cmms.py File 4.56 KB 0644
lxca_nodes.py File 5.57 KB 0644
lxd_container.py File 30.1 KB 0644
lxd_profile.py File 17.68 KB 0644
lxd_project.py File 14.49 KB 0644
macports.py File 9.77 KB 0644
mail.py File 14.63 KB 0644
make.py File 6.44 KB 0644
manageiq_alert_profiles.py File 11.22 KB 0644
manageiq_alerts.py File 12.87 KB 0644
manageiq_group.py File 22.44 KB 0644
manageiq_policies.py File 6.58 KB 0644
manageiq_policies_info.py File 3.87 KB 0644
manageiq_provider.py File 35.9 KB 0644
manageiq_tags.py File 5.49 KB 0644
manageiq_tags_info.py File 3.41 KB 0644
manageiq_tenant.py File 17.7 KB 0644
manageiq_user.py File 9.6 KB 0644
mas.py File 8.77 KB 0644
matrix.py File 4 KB 0644
mattermost.py File 5.77 KB 0644
maven_artifact.py File 31.46 KB 0644
memset_dns_reload.py File 5.95 KB 0644
memset_memstore_info.py File 5.01 KB 0644
memset_server_info.py File 8.51 KB 0644
memset_zone.py File 10.9 KB 0644
memset_zone_domain.py File 9.23 KB 0644
memset_zone_record.py File 13.82 KB 0644
mksysb.py File 4.93 KB 0644
modprobe.py File 10.7 KB 0644
monit.py File 11.61 KB 0644
mqtt.py File 7.82 KB 0644
mssql_db.py File 7.14 KB 0644
mssql_script.py File 10.34 KB 0644
nagios.py File 41.18 KB 0644
netcup_dns.py File 8.16 KB 0644
newrelic_deployment.py File 5.7 KB 0644
nexmo.py File 3.65 KB 0644
nginx_status_info.py File 4.6 KB 0644
nictagadm.py File 5.97 KB 0644
nmcli.py File 103.39 KB 0644
nomad_job.py File 8.35 KB 0644
nomad_job_info.py File 12.15 KB 0644
nosh.py File 17.21 KB 0644
npm.py File 10.47 KB 0644
nsupdate.py File 19.44 KB 0644
ocapi_command.py File 8.68 KB 0644
ocapi_info.py File 6.5 KB 0644
oci_vcn.py File 7.99 KB 0644
odbc.py File 5.2 KB 0644
office_365_connector_card.py File 9.69 KB 0644
ohai.py File 1.38 KB 0644
omapi_host.py File 11.68 KB 0644
one_host.py File 9.92 KB 0644
one_image.py File 11.22 KB 0644
one_image_info.py File 7.71 KB 0644
one_service.py File 25.03 KB 0644
one_template.py File 7.79 KB 0644
one_vm.py File 59.44 KB 0644
oneandone_firewall_policy.py File 18.35 KB 0644
oneandone_load_balancer.py File 22.49 KB 0644
oneandone_monitoring_policy.py File 33.48 KB 0644
oneandone_private_network.py File 14.33 KB 0644
oneandone_public_ip.py File 9.74 KB 0644
oneandone_server.py File 22.31 KB 0644
onepassword_info.py File 16.47 KB 0644
oneview_datacenter_info.py File 4.82 KB 0644
oneview_enclosure_info.py File 7.85 KB 0644
oneview_ethernet_network.py File 8.95 KB 0644
oneview_ethernet_network_info.py File 5.95 KB 0644
oneview_fc_network.py File 4.03 KB 0644
oneview_fc_network_info.py File 3.55 KB 0644
oneview_fcoe_network.py File 3.83 KB 0644
oneview_fcoe_network_info.py File 3.47 KB 0644
oneview_logical_interconnect_group.py File 5.99 KB 0644
oneview_logical_interconnect_group_info.py File 4.01 KB 0644
oneview_network_set.py File 5.25 KB 0644
oneview_network_set_info.py File 5.14 KB 0644
oneview_san_manager.py File 7.77 KB 0644
oneview_san_manager_info.py File 4.17 KB 0644
online_server_info.py File 5.08 KB 0644
online_user_info.py File 1.88 KB 0644
open_iscsi.py File 14.72 KB 0644
openbsd_pkg.py File 26.47 KB 0644
opendj_backendprop.py File 6.99 KB 0644
openwrt_init.py File 5.92 KB 0644
opkg.py File 6.9 KB 0644
osx_defaults.py File 14.2 KB 0644
ovh_ip_failover.py File 8.7 KB 0644
ovh_ip_loadbalancing_backend.py File 11.29 KB 0644
ovh_monthly_billing.py File 5.03 KB 0644
pacemaker_cluster.py File 6.99 KB 0644
packet_device.py File 21.72 KB 0644
packet_ip_subnet.py File 10.73 KB 0644
packet_project.py File 7.07 KB 0644
packet_sshkey.py File 8.76 KB 0644
packet_volume.py File 9.13 KB 0644
packet_volume_attachment.py File 9.01 KB 0644
pacman.py File 31.36 KB 0644
pacman_key.py File 10.91 KB 0644
pagerduty.py File 8.89 KB 0644
pagerduty_alert.py File 8.91 KB 0644
pagerduty_change.py File 6.14 KB 0644
pagerduty_user.py File 9.15 KB 0644
pam_limits.py File 10.85 KB 0644
pamd.py File 30.43 KB 0644
parted.py File 25.85 KB 0644
pear.py File 11.32 KB 0644
pids.py File 6.7 KB 0644
pingdom.py File 3.88 KB 0644
pip_package_info.py File 4.3 KB 0644
pipx.py File 12.34 KB 0644
pipx_info.py File 6.58 KB 0644
pkg5.py File 5.2 KB 0644
pkg5_publisher.py File 5.47 KB 0644
pkgin.py File 11.7 KB 0644
pkgng.py File 18.61 KB 0644
pkgutil.py File 8.98 KB 0644
pmem.py File 21.09 KB 0644
portage.py File 16.14 KB 0644
portinstall.py File 6.74 KB 0644
pritunl_org.py File 5.52 KB 0644
pritunl_org_info.py File 3.6 KB 0644
pritunl_user.py File 10.08 KB 0644
pritunl_user_info.py File 4.65 KB 0644
profitbricks.py File 21.55 KB 0644
profitbricks_datacenter.py File 7.57 KB 0644
profitbricks_nic.py File 8.26 KB 0644
profitbricks_volume.py File 13.07 KB 0644
profitbricks_volume_attachments.py File 7.76 KB 0644
proxmox.py File 32.89 KB 0644
proxmox_disk.py File 27.7 KB 0644
proxmox_domain_info.py File 3.56 KB 0644
proxmox_group_info.py File 3.94 KB 0644
proxmox_kvm.py File 58.01 KB 0644
proxmox_nic.py File 10.28 KB 0644
proxmox_snap.py File 13.66 KB 0644
proxmox_storage_info.py File 5.61 KB 0644
proxmox_tasks_info.py File 5.1 KB 0644
proxmox_template.py File 8.66 KB 0644
proxmox_user_info.py File 7.99 KB 0644
pubnub_blocks.py File 23.72 KB 0644
pulp_repo.py File 25.61 KB 0644
puppet.py File 8.55 KB 0644
pushbullet.py File 5.82 KB 0644
pushover.py File 4.57 KB 0644
python_requirements_info.py File 6.21 KB 0644
rax.py File 32.63 KB 0644
rax_cbs.py File 7.03 KB 0644
rax_cbs_attachments.py File 7.05 KB 0644
rax_cdb.py File 7.99 KB 0644
rax_cdb_database.py File 4.8 KB 0644
rax_cdb_user.py File 6.31 KB 0644
rax_clb.py File 9.61 KB 0644
rax_clb_nodes.py File 8.63 KB 0644
rax_clb_ssl.py File 9.9 KB 0644
rax_dns.py File 5.25 KB 0644
rax_dns_record.py File 11.75 KB 0644
rax_facts.py File 4.52 KB 0644
rax_files.py File 12.19 KB 0644
rax_files_objects.py File 17.24 KB 0644
rax_identity.py File 3 KB 0644
rax_keypair.py File 5.14 KB 0644
rax_meta.py File 5.06 KB 0644
rax_mon_alarm.py File 7.66 KB 0644
rax_mon_check.py File 11.26 KB 0644
rax_mon_entity.py File 6.12 KB 0644
rax_mon_notification.py File 5.21 KB 0644
rax_mon_notification_plan.py File 6.09 KB 0644
rax_network.py File 3.74 KB 0644
rax_queue.py File 3.49 KB 0644
rax_scaling_group.py File 14.15 KB 0644
rax_scaling_policy.py File 8.91 KB 0644
read_csv.py File 6.36 KB 0644
redfish_command.py File 30.56 KB 0644
redfish_config.py File 13.2 KB 0644
redfish_info.py File 19.79 KB 0644
redhat_subscription.py File 47.28 KB 0644
redis.py File 10.67 KB 0644
redis_data.py File 7.41 KB 0644
redis_data_incr.py File 5.98 KB 0644
redis_data_info.py File 2.87 KB 0644
redis_info.py File 7.3 KB 0644
rhevm.py File 49.79 KB 0644
rhn_channel.py File 6.45 KB 0644
rhn_register.py File 15.37 KB 0644
rhsm_release.py File 4.1 KB 0644
rhsm_repository.py File 9.19 KB 0644
riak.py File 7.26 KB 0644
rocketchat.py File 7.85 KB 0644
rollbar_deployment.py File 4.1 KB 0644
rpm_ostree_pkg.py File 4.48 KB 0644
rundeck_acl_policy.py File 7.45 KB 0644
rundeck_job_executions_info.py File 5.52 KB 0644
rundeck_job_run.py File 10.55 KB 0644
rundeck_project.py File 5.46 KB 0644
runit.py File 7.88 KB 0644
sap_task_list_execute.py File 11.85 KB 0644
sapcar_extract.py File 7.38 KB 0644
say.py File 2.48 KB 0644
scaleway_compute.py File 23.75 KB 0644
scaleway_compute_private_network.py File 5.95 KB 0644
scaleway_container.py File 12.53 KB 0644
scaleway_container_info.py File 4.25 KB 0644
scaleway_container_namespace.py File 9.25 KB 0644
scaleway_container_namespace_info.py File 4.14 KB 0644
scaleway_container_registry.py File 8.03 KB 0644
scaleway_container_registry_info.py File 4.03 KB 0644
scaleway_database_backup.py File 11.92 KB 0644
scaleway_function.py File 11.85 KB 0644
scaleway_function_info.py File 4.16 KB 0644
scaleway_function_namespace.py File 9.21 KB 0644
scaleway_function_namespace_info.py File 4.11 KB 0644
scaleway_image_info.py File 3.79 KB 0644
scaleway_ip.py File 7.17 KB 0644
scaleway_ip_info.py File 2.8 KB 0644
scaleway_lb.py File 10.42 KB 0644
scaleway_organization_info.py File 3.02 KB 0644
scaleway_private_network.py File 6.74 KB 0644
scaleway_security_group.py File 7.27 KB 0644
scaleway_security_group_info.py File 3.08 KB 0644
scaleway_security_group_rule.py File 7.77 KB 0644
scaleway_server_info.py File 6.75 KB 0644
scaleway_snapshot_info.py File 3.16 KB 0644
scaleway_sshkey.py File 4.86 KB 0644
scaleway_user_data.py File 5.17 KB 0644
scaleway_volume.py File 5.14 KB 0644
scaleway_volume_info.py File 2.96 KB 0644
sefcontext.py File 13.65 KB 0644
selinux_permissive.py File 4.13 KB 0644
selogin.py File 7.24 KB 0644
sendgrid.py File 9.14 KB 0644
sensu_check.py File 12.81 KB 0644
sensu_client.py File 8.96 KB 0644
sensu_handler.py File 9.12 KB 0644
sensu_silence.py File 8.55 KB 0644
sensu_subscription.py File 4.92 KB 0644
seport.py File 8.93 KB 0644
serverless.py File 6.85 KB 0644
shutdown.py File 2.25 KB 0644
sl_vm.py File 12.47 KB 0644
slack.py File 19.4 KB 0644
slackpkg.py File 6.36 KB 0644
smartos_image_info.py File 3.45 KB 0644
snap.py File 13.94 KB 0644
snap_alias.py File 5.61 KB 0644
snmp_facts.py File 15.6 KB 0644
solaris_zone.py File 16.76 KB 0644
sorcery.py File 20.13 KB 0644
spectrum_device.py File 10.58 KB 0644
spectrum_model_attrs.py File 20.53 KB 0644
spotinst_aws_elastigroup.py File 49.74 KB 0644
ss_3par_cpg.py File 9.22 KB 0644
ssh_config.py File 11.22 KB 0644
stackdriver.py File 6.68 KB 0644
stacki_host.py File 10.32 KB 0644
statsd.py File 4.89 KB 0644
statusio_maintenance.py File 16.93 KB 0644
sudoers.py File 8.21 KB 0644
supervisorctl.py File 9.26 KB 0644
svc.py File 9.21 KB 0644
svr4pkg.py File 7.71 KB 0644
swdepot.py File 6.04 KB 0644
swupd.py File 8.82 KB 0644
syslogger.py File 5.62 KB 0644
syspatch.py File 4.1 KB 0644
sysrc.py File 7.22 KB 0644
sysupgrade.py File 4.25 KB 0644
taiga_issue.py File 11.1 KB 0644
telegram.py File 4.17 KB 0644
terraform.py File 25.6 KB 0644
timezone.py File 36.39 KB 0644
twilio.py File 5.86 KB 0644
typetalk.py File 3.41 KB 0644
udm_dns_record.py File 7.01 KB 0644
udm_dns_zone.py File 7.03 KB 0644
udm_group.py File 5.04 KB 0644
udm_share.py File 18.8 KB 0644
udm_user.py File 18.57 KB 0644
ufw.py File 22.58 KB 0644
uptimerobot.py File 3.85 KB 0644
urpmi.py File 6.32 KB 0644
utm_aaa_group.py File 7.3 KB 0644
utm_aaa_group_info.py File 3.58 KB 0644
utm_ca_host_key_cert.py File 4.62 KB 0644
utm_ca_host_key_cert_info.py File 2.99 KB 0644
utm_dns_host.py File 4.86 KB 0644
utm_network_interface_address.py File 3.9 KB 0644
utm_network_interface_address_info.py File 2.81 KB 0644
utm_proxy_auth_profile.py File 12.12 KB 0644
utm_proxy_exception.py File 7.56 KB 0644
utm_proxy_frontend.py File 9.02 KB 0644
utm_proxy_frontend_info.py File 4.33 KB 0644
utm_proxy_location.py File 6.69 KB 0644
utm_proxy_location_info.py File 3.66 KB 0644
vdo.py File 31.63 KB 0644
vertica_configuration.py File 6.42 KB 0644
vertica_info.py File 9.15 KB 0644
vertica_role.py File 8.03 KB 0644
vertica_schema.py File 11.41 KB 0644
vertica_user.py File 14.03 KB 0644
vexata_eg.py File 5.77 KB 0644
vexata_volume.py File 5.06 KB 0644
vmadm.py File 24.5 KB 0644
wakeonlan.py File 3.72 KB 0644
wdc_redfish_command.py File 10.37 KB 0644
wdc_redfish_info.py File 6.29 KB 0644
webfaction_app.py File 5.92 KB 0644
webfaction_db.py File 5.88 KB 0644
webfaction_domain.py File 5.06 KB 0644
webfaction_mailbox.py File 4.08 KB 0644
webfaction_site.py File 6.59 KB 0644
xattr.py File 6.81 KB 0644
xbps.py File 11.18 KB 0644
xcc_redfish_command.py File 30.16 KB 0644
xenserver_facts.py File 5.27 KB 0644
xenserver_guest.py File 97.16 KB 0644
xenserver_guest_info.py File 7.63 KB 0644
xenserver_guest_powerstate.py File 9.96 KB 0644
xfconf.py File 9.96 KB 0644
xfconf_info.py File 5.29 KB 0644
xfs_quota.py File 14.61 KB 0644
xml.py File 35.6 KB 0644
yarn.py File 12.68 KB 0644
yum_versionlock.py File 5.37 KB 0644
zfs.py File 9.46 KB 0644
zfs_delegate_admin.py File 9.46 KB 0644
zfs_facts.py File 7.84 KB 0644
znode.py File 9.07 KB 0644
zpool_facts.py File 6.11 KB 0644
zypper.py File 20.8 KB 0644
zypper_repository.py File 16.99 KB 0644