cloudstack: streamline modules doc (part 5) (#54523)
This commit is contained in:
parent
8d96af2df5
commit
7f57d88f00
9 changed files with 224 additions and 175 deletions
|
@ -19,115 +19,128 @@ short_description: Manages volume snapshot policies on Apache CloudStack based c
|
||||||
description:
|
description:
|
||||||
- Create, update and delete volume snapshot policies.
|
- Create, update and delete volume snapshot policies.
|
||||||
version_added: '2.2'
|
version_added: '2.2'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
volume:
|
volume:
|
||||||
description:
|
description:
|
||||||
- Name of the volume.
|
- Name of the volume.
|
||||||
- Either C(volume) or C(vm) is required.
|
- Either I(volume) or I(vm) is required.
|
||||||
|
type: str
|
||||||
volume_type:
|
volume_type:
|
||||||
description:
|
description:
|
||||||
- Type of the volume.
|
- Type of the volume.
|
||||||
|
type: str
|
||||||
choices:
|
choices:
|
||||||
- DATADISK
|
- DATADISK
|
||||||
- ROOT
|
- ROOT
|
||||||
version_added: "2.3"
|
version_added: '2.3'
|
||||||
vm:
|
vm:
|
||||||
description:
|
description:
|
||||||
- Name of the instance to select the volume from.
|
- Name of the instance to select the volume from.
|
||||||
- Use C(volume_type) if VM has a DATADISK and ROOT volume.
|
- Use I(volume_type) if VM has a DATADISK and ROOT volume.
|
||||||
- In case of C(volume_type=DATADISK), additionally use C(device_id) if VM has more than one DATADISK volume.
|
- In case of I(volume_type=DATADISK), additionally use I(device_id) if VM has more than one DATADISK volume.
|
||||||
- Either C(volume) or C(vm) is required.
|
- Either I(volume) or I(vm) is required.
|
||||||
version_added: "2.3"
|
type: str
|
||||||
|
version_added: '2.3'
|
||||||
device_id:
|
device_id:
|
||||||
description:
|
description:
|
||||||
- ID of the device on a VM the volume is attached to.
|
- ID of the device on a VM the volume is attached to.
|
||||||
- This will only be considered if VM has multiple DATADISK volumes.
|
- This will only be considered if VM has multiple DATADISK volumes.
|
||||||
version_added: "2.3"
|
type: int
|
||||||
|
version_added: '2.3'
|
||||||
vpc:
|
vpc:
|
||||||
description:
|
description:
|
||||||
- Name of the vpc the instance is deployed in.
|
- Name of the vpc the instance is deployed in.
|
||||||
version_added: "2.3"
|
type: str
|
||||||
|
version_added: '2.3'
|
||||||
interval_type:
|
interval_type:
|
||||||
description:
|
description:
|
||||||
- Interval of the snapshot.
|
- Interval of the snapshot.
|
||||||
|
type: str
|
||||||
default: daily
|
default: daily
|
||||||
choices: [ hourly, daily, weekly, monthly ]
|
choices: [ hourly, daily, weekly, monthly ]
|
||||||
aliases: [ interval ]
|
aliases: [ interval ]
|
||||||
max_snaps:
|
max_snaps:
|
||||||
description:
|
description:
|
||||||
- Max number of snapshots.
|
- Max number of snapshots.
|
||||||
|
type: int
|
||||||
default: 8
|
default: 8
|
||||||
aliases: [ max ]
|
aliases: [ max ]
|
||||||
schedule:
|
schedule:
|
||||||
description:
|
description:
|
||||||
- Time the snapshot is scheduled. Required if C(state=present).
|
- Time the snapshot is scheduled. Required if I(state=present).
|
||||||
- 'Format for C(interval_type=HOURLY): C(MM)'
|
- 'Format for I(interval_type=HOURLY): C(MM)'
|
||||||
- 'Format for C(interval_type=DAILY): C(MM:HH)'
|
- 'Format for I(interval_type=DAILY): C(MM:HH)'
|
||||||
- 'Format for C(interval_type=WEEKLY): C(MM:HH:DD (1-7))'
|
- 'Format for I(interval_type=WEEKLY): C(MM:HH:DD (1-7))'
|
||||||
- 'Format for C(interval_type=MONTHLY): C(MM:HH:DD (1-28))'
|
- 'Format for I(interval_type=MONTHLY): C(MM:HH:DD (1-28))'
|
||||||
|
type: str
|
||||||
time_zone:
|
time_zone:
|
||||||
description:
|
description:
|
||||||
- Specifies a timezone for this command.
|
- Specifies a timezone for this command.
|
||||||
|
type: str
|
||||||
default: UTC
|
default: UTC
|
||||||
aliases: [ timezone ]
|
aliases: [ timezone ]
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the snapshot policy.
|
- State of the snapshot policy.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [ present, absent ]
|
choices: [ present, absent ]
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the volume is related to.
|
- Domain the volume is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Account the volume is related to.
|
- Account the volume is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- Name of the project the volume is related to.
|
- Name of the project the volume is related to.
|
||||||
|
type: str
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: ensure a snapshot policy daily at 1h00 UTC
|
- name: ensure a snapshot policy daily at 1h00 UTC
|
||||||
local_action:
|
cs_snapshot_policy:
|
||||||
module: cs_snapshot_policy
|
|
||||||
volume: ROOT-478
|
volume: ROOT-478
|
||||||
schedule: '00:1'
|
schedule: '00:1'
|
||||||
max_snaps: 3
|
max_snaps: 3
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a snapshot policy daily at 1h00 UTC on the second DATADISK of VM web-01
|
- name: ensure a snapshot policy daily at 1h00 UTC on the second DATADISK of VM web-01
|
||||||
local_action:
|
cs_snapshot_policy:
|
||||||
module: cs_snapshot_policy
|
|
||||||
vm: web-01
|
vm: web-01
|
||||||
volume_type: DATADISK
|
volume_type: DATADISK
|
||||||
device_id: 2
|
device_id: 2
|
||||||
schedule: '00:1'
|
schedule: '00:1'
|
||||||
max_snaps: 3
|
max_snaps: 3
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a snapshot policy hourly at minute 5 UTC
|
- name: ensure a snapshot policy hourly at minute 5 UTC
|
||||||
local_action:
|
cs_snapshot_policy:
|
||||||
module: cs_snapshot_policy
|
|
||||||
volume: ROOT-478
|
volume: ROOT-478
|
||||||
schedule: '5'
|
schedule: '5'
|
||||||
interval_type: hourly
|
interval_type: hourly
|
||||||
max_snaps: 1
|
max_snaps: 1
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a snapshot policy weekly on Sunday at 05h00, TZ Europe/Zurich
|
- name: ensure a snapshot policy weekly on Sunday at 05h00, TZ Europe/Zurich
|
||||||
local_action:
|
cs_snapshot_policy:
|
||||||
module: cs_snapshot_policy
|
|
||||||
volume: ROOT-478
|
volume: ROOT-478
|
||||||
schedule: '00:5:1'
|
schedule: '00:5:1'
|
||||||
interval_type: weekly
|
interval_type: weekly
|
||||||
max_snaps: 1
|
max_snaps: 1
|
||||||
time_zone: 'Europe/Zurich'
|
time_zone: 'Europe/Zurich'
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a snapshot policy is absent
|
- name: ensure a snapshot policy is absent
|
||||||
local_action:
|
cs_snapshot_policy:
|
||||||
module: cs_snapshot_policy
|
|
||||||
volume: ROOT-478
|
volume: ROOT-478
|
||||||
interval_type: hourly
|
interval_type: hourly
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -2,21 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# (c) 2015, René Moser <mail@renemoser.net>
|
# (c) 2015, René Moser <mail@renemoser.net>
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['stableinterface'],
|
'status': ['stableinterface'],
|
||||||
|
@ -32,49 +18,55 @@ description:
|
||||||
- If no key was found and no public key was provided and a new SSH
|
- If no key was found and no public key was provided and a new SSH
|
||||||
private/public key pair will be created and the private key will be returned.
|
private/public key pair will be created and the private key will be returned.
|
||||||
version_added: '2.0'
|
version_added: '2.0'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of public key.
|
- Name of public key.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the public key is related to.
|
- Domain the public key is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Account the public key is related to.
|
- Account the public key is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- Name of the project the public key to be registered in.
|
- Name of the project the public key to be registered in.
|
||||||
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the public key.
|
- State of the public key.
|
||||||
default: 'present'
|
type: str
|
||||||
choices: [ 'present', 'absent' ]
|
default: present
|
||||||
|
choices: [ present, absent ]
|
||||||
public_key:
|
public_key:
|
||||||
description:
|
description:
|
||||||
- String of the public key.
|
- String of the public key.
|
||||||
|
type: str
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# create a new private / public key pair:
|
- name: create a new private / public key pair
|
||||||
- cs_sshkeypair:
|
cs_sshkeypair:
|
||||||
name: linus@example.com
|
name: linus@example.com
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
register: key
|
register: key
|
||||||
- debug:
|
- debug:
|
||||||
msg: 'Private key is {{ key.private_key }}'
|
msg: 'Private key is {{ key.private_key }}'
|
||||||
|
|
||||||
# remove a public key by its name:
|
- name: remove a public key by its name
|
||||||
- cs_sshkeypair:
|
cs_sshkeypair:
|
||||||
name: linus@example.com
|
name: linus@example.com
|
||||||
state: absent
|
state: absent
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
# register your existing local public key:
|
- name: register your existing local public key
|
||||||
- cs_sshkeypair:
|
cs_sshkeypair:
|
||||||
name: linus@example.com
|
name: linus@example.com
|
||||||
public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
|
@ -15,46 +15,56 @@ module: cs_staticnat
|
||||||
short_description: Manages static NATs on Apache CloudStack based clouds.
|
short_description: Manages static NATs on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, update and remove static NATs.
|
- Create, update and remove static NATs.
|
||||||
version_added: "2.0"
|
version_added: '2.0'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
ip_address:
|
ip_address:
|
||||||
description:
|
description:
|
||||||
- Public IP address the static NAT is assigned to.
|
- Public IP address the static NAT is assigned to.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
vm:
|
vm:
|
||||||
description:
|
description:
|
||||||
- Name of virtual machine which we make the static NAT for.
|
- Name of virtual machine which we make the static NAT for.
|
||||||
- Required if I(state=present).
|
- Required if I(state=present).
|
||||||
|
type: str
|
||||||
vm_guest_ip:
|
vm_guest_ip:
|
||||||
description:
|
description:
|
||||||
- VM guest NIC secondary IP address for the static NAT.
|
- VM guest NIC secondary IP address for the static NAT.
|
||||||
|
type: str
|
||||||
network:
|
network:
|
||||||
description:
|
description:
|
||||||
- Network the IP address is related to.
|
- Network the IP address is related to.
|
||||||
version_added: "2.2"
|
type: str
|
||||||
|
version_added: '2.2'
|
||||||
vpc:
|
vpc:
|
||||||
description:
|
description:
|
||||||
- VPC the network related to.
|
- VPC the network related to.
|
||||||
version_added: "2.3"
|
type: str
|
||||||
|
version_added: '2.3'
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the static NAT.
|
- State of the static NAT.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [ present, absent ]
|
choices: [ present, absent ]
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the static NAT is related to.
|
- Domain the static NAT is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Account the static NAT is related to.
|
- Account the static NAT is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- Name of the project the static NAT is related to.
|
- Name of the project the static NAT is related to.
|
||||||
|
type: str
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- Name of the zone in which the virtual machine is in.
|
- Name of the zone in which the virtual machine is in.
|
||||||
- If not set, default zone is used.
|
- If not set, default zone is used.
|
||||||
|
type: str
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- Poll async jobs until job has finished.
|
- Poll async jobs until job has finished.
|
||||||
|
@ -65,16 +75,16 @@ extends_documentation_fragment: cloudstack
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Create a static NAT for IP 1.2.3.4 to web01
|
- name: Create a static NAT for IP 1.2.3.4 to web01
|
||||||
local_action:
|
cs_staticnat:
|
||||||
module: cs_staticnat
|
|
||||||
ip_address: 1.2.3.4
|
ip_address: 1.2.3.4
|
||||||
vm: web01
|
vm: web01
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Remove a static NAT
|
- name: Remove a static NAT
|
||||||
local_action:
|
cs_staticnat:
|
||||||
module: cs_staticnat
|
|
||||||
ip_address: 1.2.3.4
|
ip_address: 1.2.3.4
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -3,21 +3,7 @@
|
||||||
#
|
#
|
||||||
# (c) 2017, Netservers Ltd. <support@netservers.co.uk>
|
# (c) 2017, Netservers Ltd. <support@netservers.co.uk>
|
||||||
# (c) 2017, René Moser <mail@renemoser.net>
|
# (c) 2017, René Moser <mail@renemoser.net>
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
|
@ -30,33 +16,39 @@ module: cs_storage_pool
|
||||||
short_description: Manages Primary Storage Pools on Apache CloudStack based clouds.
|
short_description: Manages Primary Storage Pools on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, update, put into maintenance, disable, enable and remove storage pools.
|
- Create, update, put into maintenance, disable, enable and remove storage pools.
|
||||||
version_added: "2.4"
|
version_added: '2.4'
|
||||||
author:
|
author:
|
||||||
- "Netservers Ltd. (@netservers)"
|
- Netservers Ltd. (@netservers)
|
||||||
- "René Moser (@resmo)"
|
- René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the storage pool.
|
- Name of the storage pool.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- Name of the zone in which the host should be deployed.
|
- Name of the zone in which the host should be deployed.
|
||||||
- If not set, default zone is used.
|
- If not set, default zone is used.
|
||||||
|
type: str
|
||||||
storage_url:
|
storage_url:
|
||||||
description:
|
description:
|
||||||
- URL of the storage pool.
|
- URL of the storage pool.
|
||||||
- Required if C(state=present).
|
- Required if I(state=present).
|
||||||
|
type: str
|
||||||
pod:
|
pod:
|
||||||
description:
|
description:
|
||||||
- Name of the pod.
|
- Name of the pod.
|
||||||
|
type: str
|
||||||
cluster:
|
cluster:
|
||||||
description:
|
description:
|
||||||
- Name of the cluster.
|
- Name of the cluster.
|
||||||
|
type: str
|
||||||
scope:
|
scope:
|
||||||
description:
|
description:
|
||||||
- The scope of the storage pool.
|
- The scope of the storage pool.
|
||||||
- Defaults to cluster when C(cluster) is provided, otherwise zone.
|
- Defaults to cluster when C(cluster) is provided, otherwise zone.
|
||||||
|
type: str
|
||||||
choices: [ cluster, zone ]
|
choices: [ cluster, zone ]
|
||||||
managed:
|
managed:
|
||||||
description:
|
description:
|
||||||
|
@ -66,27 +58,35 @@ options:
|
||||||
hypervisor:
|
hypervisor:
|
||||||
description:
|
description:
|
||||||
- Required when creating a zone scoped pool.
|
- Required when creating a zone scoped pool.
|
||||||
|
type: str
|
||||||
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM, Simulator ]
|
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM, Simulator ]
|
||||||
storage_tags:
|
storage_tags:
|
||||||
description:
|
description:
|
||||||
- Tags associated with this storage pool.
|
- Tags associated with this storage pool.
|
||||||
|
type: list
|
||||||
|
aliases: [ storage_tag ]
|
||||||
provider:
|
provider:
|
||||||
description:
|
description:
|
||||||
- Name of the storage provider e.g. SolidFire, SolidFireShared, DefaultPrimary, CloudByte.
|
- Name of the storage provider e.g. SolidFire, SolidFireShared, DefaultPrimary, CloudByte.
|
||||||
|
type: str
|
||||||
default: DefaultPrimary
|
default: DefaultPrimary
|
||||||
capacity_bytes:
|
capacity_bytes:
|
||||||
description:
|
description:
|
||||||
- Bytes CloudStack can provision from this storage pool.
|
- Bytes CloudStack can provision from this storage pool.
|
||||||
|
type: int
|
||||||
capacity_iops:
|
capacity_iops:
|
||||||
description:
|
description:
|
||||||
- Bytes CloudStack can provision from this storage pool.
|
- Bytes CloudStack can provision from this storage pool.
|
||||||
|
type: int
|
||||||
allocation_state:
|
allocation_state:
|
||||||
description:
|
description:
|
||||||
- Allocation state of the storage pool.
|
- Allocation state of the storage pool.
|
||||||
|
type: str
|
||||||
choices: [ enabled, disabled, maintenance ]
|
choices: [ enabled, disabled, maintenance ]
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the storage pool.
|
- State of the storage pool.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [ present, absent ]
|
choices: [ present, absent ]
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
|
@ -94,18 +94,17 @@ extends_documentation_fragment: cloudstack
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: ensure a zone scoped storage_pool is present
|
- name: ensure a zone scoped storage_pool is present
|
||||||
local_action:
|
cs_storage_pool:
|
||||||
module: cs_storage_pool
|
|
||||||
zone: zone01
|
zone: zone01
|
||||||
storage_url: rbd://admin:SECRET@ceph-mons.domain/poolname
|
storage_url: rbd://admin:SECRET@ceph-mons.domain/poolname
|
||||||
provider: DefaultPrimary
|
provider: DefaultPrimary
|
||||||
name: Ceph RBD
|
name: Ceph RBD
|
||||||
scope: zone
|
scope: zone
|
||||||
hypervisor: KVM
|
hypervisor: KVM
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a cluster scoped storage_pool is disabled
|
- name: ensure a cluster scoped storage_pool is disabled
|
||||||
local_action:
|
cs_storage_pool:
|
||||||
module: cs_storage_pool
|
|
||||||
name: Ceph RBD
|
name: Ceph RBD
|
||||||
zone: zone01
|
zone: zone01
|
||||||
cluster: cluster01
|
cluster: cluster01
|
||||||
|
@ -114,10 +113,10 @@ EXAMPLES = '''
|
||||||
provider: DefaultPrimary
|
provider: DefaultPrimary
|
||||||
scope: cluster
|
scope: cluster
|
||||||
allocation_state: disabled
|
allocation_state: disabled
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a cluster scoped storage_pool is in maintenance
|
- name: ensure a cluster scoped storage_pool is in maintenance
|
||||||
local_action:
|
cs_storage_pool:
|
||||||
module: cs_storage_pool
|
|
||||||
name: Ceph RBD
|
name: Ceph RBD
|
||||||
zone: zone01
|
zone: zone01
|
||||||
cluster: cluster01
|
cluster: cluster01
|
||||||
|
@ -126,12 +125,13 @@ EXAMPLES = '''
|
||||||
provider: DefaultPrimary
|
provider: DefaultPrimary
|
||||||
scope: cluster
|
scope: cluster
|
||||||
allocation_state: maintenance
|
allocation_state: maintenance
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure a storage_pool is absent
|
- name: ensure a storage_pool is absent
|
||||||
local_action:
|
cs_storage_pool:
|
||||||
module: cs_storage_pool
|
|
||||||
name: Ceph RBD
|
name: Ceph RBD
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -18,33 +18,39 @@ description:
|
||||||
- Create templates from a ROOT volume of a stopped VM or its snapshot.
|
- Create templates from a ROOT volume of a stopped VM or its snapshot.
|
||||||
- Update (since version 2.7), extract and delete templates.
|
- Update (since version 2.7), extract and delete templates.
|
||||||
version_added: '2.0'
|
version_added: '2.0'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the template.
|
- Name of the template.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- URL of where the template is hosted on I(state=present).
|
- URL of where the template is hosted on I(state=present).
|
||||||
- URL to which the template would be extracted on I(state=extracted).
|
- URL to which the template would be extracted on I(state=extracted).
|
||||||
- Mutually exclusive with C(vm).
|
- Mutually exclusive with I(vm).
|
||||||
|
type: str
|
||||||
vm:
|
vm:
|
||||||
description:
|
description:
|
||||||
- VM name the template will be created from its volume or alternatively from a snapshot.
|
- VM name the template will be created from its volume or alternatively from a snapshot.
|
||||||
- VM must be in stopped state if created from its volume.
|
- VM must be in stopped state if created from its volume.
|
||||||
- Mutually exclusive with C(url).
|
- Mutually exclusive with I(url).
|
||||||
|
type: str
|
||||||
snapshot:
|
snapshot:
|
||||||
description:
|
description:
|
||||||
- Name of the snapshot, created from the VM ROOT volume, the template will be created from.
|
- Name of the snapshot, created from the VM ROOT volume, the template will be created from.
|
||||||
- C(vm) is required together with this argument.
|
- I(vm) is required together with this argument.
|
||||||
|
type: str
|
||||||
os_type:
|
os_type:
|
||||||
description:
|
description:
|
||||||
- OS type that best represents the OS of this template.
|
- OS type that best represents the OS of this template.
|
||||||
|
type: str
|
||||||
checksum:
|
checksum:
|
||||||
description:
|
description:
|
||||||
- The MD5 checksum value of this template.
|
- The MD5 checksum value of this template.
|
||||||
- If set, we search by checksum instead of name.
|
- If set, we search by checksum instead of name.
|
||||||
|
type: str
|
||||||
is_ready:
|
is_ready:
|
||||||
description:
|
description:
|
||||||
- "Note: this flag was not implemented and therefore marked as deprecated."
|
- "Note: this flag was not implemented and therefore marked as deprecated."
|
||||||
|
@ -53,61 +59,69 @@ options:
|
||||||
is_public:
|
is_public:
|
||||||
description:
|
description:
|
||||||
- Register the template to be publicly available to all users.
|
- Register the template to be publicly available to all users.
|
||||||
- Only used if C(state) is present.
|
- Only used if I(state) is C(present).
|
||||||
type: bool
|
type: bool
|
||||||
is_featured:
|
is_featured:
|
||||||
description:
|
description:
|
||||||
- Register the template to be featured.
|
- Register the template to be featured.
|
||||||
- Only used if C(state) is present.
|
- Only used if I(state) is C(present).
|
||||||
type: bool
|
type: bool
|
||||||
is_dynamically_scalable:
|
is_dynamically_scalable:
|
||||||
description:
|
description:
|
||||||
- Register the template having XS/VMWare tools installed in order to support dynamic scaling of VM CPU/memory.
|
- Register the template having XS/VMWare tools installed in order to support dynamic scaling of VM CPU/memory.
|
||||||
- Only used if C(state) is present.
|
- Only used if I(state) is C(present).
|
||||||
type: bool
|
type: bool
|
||||||
cross_zones:
|
cross_zones:
|
||||||
description:
|
description:
|
||||||
- Whether the template should be synced or removed across zones.
|
- Whether the template should be synced or removed across zones.
|
||||||
- Only used if C(state) is present or absent.
|
- Only used if I(state) is C(present) or C(absent).
|
||||||
default: no
|
default: no
|
||||||
type: bool
|
type: bool
|
||||||
mode:
|
mode:
|
||||||
description:
|
description:
|
||||||
- Mode for the template extraction.
|
- Mode for the template extraction.
|
||||||
- Only used if I(state=extracted).
|
- Only used if I(state=extracted).
|
||||||
|
type: str
|
||||||
default: http_download
|
default: http_download
|
||||||
choices: [ http_download, ftp_upload ]
|
choices: [ http_download, ftp_upload ]
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the template, snapshot or VM is related to.
|
- Domain the template, snapshot or VM is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Account the template, snapshot or VM is related to.
|
- Account the template, snapshot or VM is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- Name of the project the template to be registered in.
|
- Name of the project the template to be registered in.
|
||||||
|
type: str
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- Name of the zone you wish the template to be registered or deleted from.
|
- Name of the zone you wish the template to be registered or deleted from.
|
||||||
- If not specified, first found zone will be used.
|
- If not specified, first found zone will be used.
|
||||||
|
type: str
|
||||||
template_filter:
|
template_filter:
|
||||||
description:
|
description:
|
||||||
- Name of the filter used to search for the template.
|
- Name of the filter used to search for the template.
|
||||||
- The filter C(all) was added in 2.7.
|
- The filter C(all) was added in 2.7.
|
||||||
|
type: str
|
||||||
default: self
|
default: self
|
||||||
choices: [ all, featured, self, selfexecutable, sharedexecutable, executable, community ]
|
choices: [ all, featured, self, selfexecutable, sharedexecutable, executable, community ]
|
||||||
template_find_options:
|
template_find_options:
|
||||||
description:
|
description:
|
||||||
- Options to find a template uniquely.
|
- Options to find a template uniquely.
|
||||||
- More than one allowed.
|
- More than one allowed.
|
||||||
|
type: list
|
||||||
choices: [ display_text, checksum, cross_zones ]
|
choices: [ display_text, checksum, cross_zones ]
|
||||||
version_added: 2.7
|
version_added: '2.7'
|
||||||
aliases: [ template_find_option ]
|
aliases: [ template_find_option ]
|
||||||
default: []
|
default: []
|
||||||
hypervisor:
|
hypervisor:
|
||||||
description:
|
description:
|
||||||
- Name the hypervisor to be used for creating the new template.
|
- Name the hypervisor to be used for creating the new template.
|
||||||
- Relevant when using I(state=present).
|
- Relevant when using I(state=present).
|
||||||
|
type: str
|
||||||
choices:
|
choices:
|
||||||
- KVM
|
- KVM
|
||||||
- kvm
|
- kvm
|
||||||
|
@ -139,20 +153,22 @@ options:
|
||||||
template_tag:
|
template_tag:
|
||||||
description:
|
description:
|
||||||
- The tag for this template.
|
- The tag for this template.
|
||||||
|
type: str
|
||||||
sshkey_enabled:
|
sshkey_enabled:
|
||||||
description:
|
description:
|
||||||
- True if the template supports the sshkey upload feature.
|
- True if the template supports the sshkey upload feature.
|
||||||
- Only considered if C(url) is used (API limitation).
|
- Only considered if I(url) is used (API limitation).
|
||||||
type: bool
|
type: bool
|
||||||
is_routing:
|
is_routing:
|
||||||
description:
|
description:
|
||||||
- Sets the template type to routing, i.e. if template is used to deploy routers.
|
- Sets the template type to routing, i.e. if template is used to deploy routers.
|
||||||
- Only considered if C(url) is used.
|
- Only considered if I(url) is used.
|
||||||
type: bool
|
type: bool
|
||||||
format:
|
format:
|
||||||
description:
|
description:
|
||||||
- The format for the template.
|
- The format for the template.
|
||||||
- Only considered if I(state=present).
|
- Only considered if I(state=present).
|
||||||
|
type: str
|
||||||
choices: [ QCOW2, RAW, VHD, OVA ]
|
choices: [ QCOW2, RAW, VHD, OVA ]
|
||||||
is_extractable:
|
is_extractable:
|
||||||
description:
|
description:
|
||||||
|
@ -161,17 +177,21 @@ options:
|
||||||
details:
|
details:
|
||||||
description:
|
description:
|
||||||
- Template details in key/value pairs.
|
- Template details in key/value pairs.
|
||||||
|
type: str
|
||||||
bits:
|
bits:
|
||||||
description:
|
description:
|
||||||
- 32 or 64 bits support.
|
- 32 or 64 bits support.
|
||||||
|
type: int
|
||||||
default: 64
|
default: 64
|
||||||
choices: [ 32, 64 ]
|
choices: [ 32, 64 ]
|
||||||
display_text:
|
display_text:
|
||||||
description:
|
description:
|
||||||
- Display text of the template.
|
- Display text of the template.
|
||||||
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the template.
|
- State of the template.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [ present, absent, extracted ]
|
choices: [ present, absent, extracted ]
|
||||||
poll_async:
|
poll_async:
|
||||||
|
@ -181,38 +201,38 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- List of tags. Tags are a list of dictionaries having keys C(key) and C(value).
|
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
|
||||||
- "To delete all tags, set a empty list e.g. C(tags: [])."
|
- "To delete all tags, set a empty list e.g. I(tags: [])."
|
||||||
|
type: list
|
||||||
aliases: [ tag ]
|
aliases: [ tag ]
|
||||||
version_added: "2.4"
|
version_added: '2.4'
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: register a systemvm template
|
- name: register a systemvm template
|
||||||
local_action:
|
cs_template:
|
||||||
module: cs_template
|
|
||||||
name: systemvm-vmware-4.5
|
name: systemvm-vmware-4.5
|
||||||
url: "http://packages.shapeblue.com/systemvmtemplate/4.5/systemvm64template-4.5-vmware.ova"
|
url: "http://packages.shapeblue.com/systemvmtemplate/4.5/systemvm64template-4.5-vmware.ova"
|
||||||
hypervisor: VMware
|
hypervisor: VMware
|
||||||
format: OVA
|
format: OVA
|
||||||
cross_zones: yes
|
cross_zones: yes
|
||||||
os_type: Debian GNU/Linux 7(64-bit)
|
os_type: Debian GNU/Linux 7(64-bit)
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Create a template from a stopped virtual machine's volume
|
- name: Create a template from a stopped virtual machine's volume
|
||||||
local_action:
|
cs_template:
|
||||||
module: cs_template
|
|
||||||
name: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
|
name: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
|
||||||
vm: debian-9-base-vm
|
vm: debian-9-base-vm
|
||||||
os_type: Debian GNU/Linux 9 (64-bit)
|
os_type: Debian GNU/Linux 9 (64-bit)
|
||||||
zone: tokio-ix
|
zone: tokio-ix
|
||||||
password_enabled: yes
|
password_enabled: yes
|
||||||
is_public: yes
|
is_public: yes
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Note: Use template_find_option(s) when a template name is not unique
|
# Note: Use template_find_option(s) when a template name is not unique
|
||||||
- name: Create a template from a stopped virtual machine's volume
|
- name: Create a template from a stopped virtual machine's volume
|
||||||
local_action:
|
cs_template:
|
||||||
module: cs_template
|
|
||||||
name: Debian 9 (64-bit)
|
name: Debian 9 (64-bit)
|
||||||
display_text: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
|
display_text: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
|
||||||
template_find_option: display_text
|
template_find_option: display_text
|
||||||
|
@ -221,23 +241,24 @@ EXAMPLES = '''
|
||||||
zone: tokio-ix
|
zone: tokio-ix
|
||||||
password_enabled: yes
|
password_enabled: yes
|
||||||
is_public: yes
|
is_public: yes
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: create a template from a virtual machine's root volume snapshot
|
- name: create a template from a virtual machine's root volume snapshot
|
||||||
local_action:
|
cs_template:
|
||||||
module: cs_template
|
|
||||||
name: Debian 9 (64-bit) Snapshot ROOT-233_2015061509114
|
name: Debian 9 (64-bit) Snapshot ROOT-233_2015061509114
|
||||||
snapshot: ROOT-233_2015061509114
|
snapshot: ROOT-233_2015061509114
|
||||||
os_type: Debian GNU/Linux 9 (64-bit)
|
os_type: Debian GNU/Linux 9 (64-bit)
|
||||||
zone: tokio-ix
|
zone: tokio-ix
|
||||||
password_enabled: yes
|
password_enabled: yes
|
||||||
is_public: yes
|
is_public: yes
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Remove a template
|
- name: Remove a template
|
||||||
local_action:
|
cs_template:
|
||||||
module: cs_template
|
|
||||||
name: systemvm-4.2
|
name: systemvm-4.2
|
||||||
cross_zones: yes
|
cross_zones: yes
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -350,7 +371,7 @@ url:
|
||||||
tags:
|
tags:
|
||||||
description: List of resource tags associated with the template.
|
description: List of resource tags associated with the template.
|
||||||
returned: if available
|
returned: if available
|
||||||
type: dict
|
type: list
|
||||||
sample: '[ { "key": "foo", "value": "bar" } ]'
|
sample: '[ { "key": "foo", "value": "bar" } ]'
|
||||||
zone:
|
zone:
|
||||||
description: Name of zone the template is registered in.
|
description: Name of zone the template is registered in.
|
||||||
|
|
|
@ -31,6 +31,11 @@ options:
|
||||||
description:
|
description:
|
||||||
- Account the volume is related to.
|
- Account the volume is related to.
|
||||||
type: str
|
type: str
|
||||||
|
device_id:
|
||||||
|
description:
|
||||||
|
- ID of the device on a VM the volume is attached to.
|
||||||
|
- Only considered if I(state) is C(attached).
|
||||||
|
type: int
|
||||||
custom_id:
|
custom_id:
|
||||||
description:
|
description:
|
||||||
- Custom id to the resource.
|
- Custom id to the resource.
|
||||||
|
@ -45,7 +50,6 @@ options:
|
||||||
description:
|
description:
|
||||||
- Whether to display the volume to the end user or not.
|
- Whether to display the volume to the end user or not.
|
||||||
- Allowed to Root Admins only.
|
- Allowed to Root Admins only.
|
||||||
default: yes
|
|
||||||
type: bool
|
type: bool
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -17,42 +17,48 @@ DOCUMENTATION = '''
|
||||||
module: cs_vpc
|
module: cs_vpc
|
||||||
short_description: "Manages VPCs on Apache CloudStack based clouds."
|
short_description: "Manages VPCs on Apache CloudStack based clouds."
|
||||||
description:
|
description:
|
||||||
- "Create, update and delete VPCs."
|
- Create, update and delete VPCs.
|
||||||
version_added: "2.3"
|
version_added: '2.3'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- "Name of the VPC."
|
- Name of the VPC.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
display_text:
|
display_text:
|
||||||
description:
|
description:
|
||||||
- "Display text of the VPC."
|
- Display text of the VPC.
|
||||||
- "If not set, C(name) will be used for creating."
|
- If not set, I(name) will be used for creating.
|
||||||
|
type: str
|
||||||
cidr:
|
cidr:
|
||||||
description:
|
description:
|
||||||
- "CIDR of the VPC, e.g. 10.1.0.0/16"
|
- CIDR of the VPC, e.g. 10.1.0.0/16
|
||||||
- "All VPC guest networks' CIDRs must be within this CIDR."
|
- All VPC guest networks' CIDRs must be within this CIDR.
|
||||||
- "Required on I(state=present)."
|
- Required on I(state=present).
|
||||||
|
type: str
|
||||||
network_domain:
|
network_domain:
|
||||||
description:
|
description:
|
||||||
- "Network domain for the VPC."
|
- Network domain for the VPC.
|
||||||
- "All networks inside the VPC will belong to this domain."
|
- All networks inside the VPC will belong to this domain.
|
||||||
- "Only considered while creating the VPC, can not be changed."
|
- Only considered while creating the VPC, can not be changed.
|
||||||
|
type: str
|
||||||
vpc_offering:
|
vpc_offering:
|
||||||
description:
|
description:
|
||||||
- "Name of the VPC offering."
|
- Name of the VPC offering.
|
||||||
- "If not set, default VPC offering is used."
|
- If not set, default VPC offering is used.
|
||||||
|
type: str
|
||||||
clean_up:
|
clean_up:
|
||||||
description:
|
description:
|
||||||
- "Whether to redeploy a VPC router or not when I(state=restarted)"
|
- Whether to redeploy a VPC router or not when I(state=restarted)
|
||||||
version_added: "2.5"
|
version_added: '2.5'
|
||||||
type: bool
|
type: bool
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- "State of the VPC."
|
- State of the VPC.
|
||||||
- "The state C(present) creates a started VPC."
|
- The state C(present) creates a started VPC.
|
||||||
- "The state C(stopped) is only considered while creating the VPC, added in version 2.6."
|
- The state C(stopped) is only considered while creating the VPC, added in version 2.6.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices:
|
choices:
|
||||||
- present
|
- present
|
||||||
|
@ -61,26 +67,30 @@ options:
|
||||||
- restarted
|
- restarted
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- "Domain the VPC is related to."
|
- Domain the VPC is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- "Account the VPC is related to."
|
- Account the VPC is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- "Name of the project the VPC is related to."
|
- Name of the project the VPC is related to.
|
||||||
|
type: str
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- "Name of the zone."
|
- Name of the zone.
|
||||||
- "If not set, default zone is used."
|
- If not set, default zone is used.
|
||||||
|
type: str
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- "List of tags. Tags are a list of dictionaries having keys C(key) and C(value)."
|
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
|
||||||
- "For deleting all tags, set an empty list e.g. I(tags: [])."
|
- "For deleting all tags, set an empty list e.g. I(tags: [])."
|
||||||
aliases:
|
type: list
|
||||||
- tag
|
aliases: [ tag ]
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- "Poll async jobs until job has finished."
|
- Poll async jobs until job has finished.
|
||||||
default: yes
|
default: yes
|
||||||
type: bool
|
type: bool
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
|
@ -88,32 +98,32 @@ extends_documentation_fragment: cloudstack
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Ensure a VPC is present but not started after creating
|
- name: Ensure a VPC is present but not started after creating
|
||||||
local_action:
|
cs_vpc:
|
||||||
module: cs_vpc
|
|
||||||
name: my_vpc
|
name: my_vpc
|
||||||
display_text: My example VPC
|
display_text: My example VPC
|
||||||
cidr: 10.10.0.0/16
|
cidr: 10.10.0.0/16
|
||||||
state: stopped
|
state: stopped
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Ensure a VPC is present and started after creating
|
- name: Ensure a VPC is present and started after creating
|
||||||
local_action:
|
cs_vpc:
|
||||||
module: cs_vpc
|
|
||||||
name: my_vpc
|
name: my_vpc
|
||||||
display_text: My example VPC
|
display_text: My example VPC
|
||||||
cidr: 10.10.0.0/16
|
cidr: 10.10.0.0/16
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Ensure a VPC is absent
|
- name: Ensure a VPC is absent
|
||||||
local_action:
|
cs_vpc:
|
||||||
module: cs_vpc
|
|
||||||
name: my_vpc
|
name: my_vpc
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Ensure a VPC is restarted with clean up
|
- name: Ensure a VPC is restarted with clean up
|
||||||
local_action:
|
cs_vpc:
|
||||||
module: cs_vpc
|
|
||||||
name: my_vpc
|
name: my_vpc
|
||||||
clean_up: yes
|
clean_up: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -191,7 +201,7 @@ state:
|
||||||
tags:
|
tags:
|
||||||
description: "List of resource tags associated with the VPC."
|
description: "List of resource tags associated with the VPC."
|
||||||
returned: success
|
returned: success
|
||||||
type: dict
|
type: list
|
||||||
sample: '[ { "key": "foo", "value": "bar" } ]'
|
sample: '[ { "key": "foo", "value": "bar" } ]'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -15,65 +15,66 @@ short_description: Manages vpc offerings on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, update, enable, disable and remove CloudStack VPC offerings.
|
- Create, update, enable, disable and remove CloudStack VPC offerings.
|
||||||
version_added: '2.5'
|
version_added: '2.5'
|
||||||
author: "David Passante (@dpassante)"
|
author: David Passante (@dpassante)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- The name of the vpc offering
|
- The name of the vpc offering
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the vpc offering.
|
- State of the vpc offering.
|
||||||
|
type: str
|
||||||
choices: [ enabled, present, disabled, absent ]
|
choices: [ enabled, present, disabled, absent ]
|
||||||
required: false
|
|
||||||
default: present
|
default: present
|
||||||
display_text:
|
display_text:
|
||||||
description:
|
description:
|
||||||
- Display text of the vpc offerings
|
- Display text of the vpc offerings
|
||||||
required: false
|
type: str
|
||||||
service_capabilities:
|
service_capabilities:
|
||||||
description:
|
description:
|
||||||
- Desired service capabilities as part of vpc offering.
|
- Desired service capabilities as part of vpc offering.
|
||||||
|
type: list
|
||||||
aliases: [ service_capability ]
|
aliases: [ service_capability ]
|
||||||
service_offering:
|
service_offering:
|
||||||
description:
|
description:
|
||||||
- The name or ID of the service offering for the VPC router appliance.
|
- The name or ID of the service offering for the VPC router appliance.
|
||||||
required: false
|
type: str
|
||||||
supported_services:
|
supported_services:
|
||||||
description:
|
description:
|
||||||
- Services supported by the vpc offering
|
- Services supported by the vpc offering
|
||||||
|
type: list
|
||||||
aliases: [ supported_service ]
|
aliases: [ supported_service ]
|
||||||
required: false
|
|
||||||
service_providers:
|
service_providers:
|
||||||
description:
|
description:
|
||||||
- provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network
|
- provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network
|
||||||
|
type: list
|
||||||
aliases: [ service_provider ]
|
aliases: [ service_provider ]
|
||||||
required: false
|
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- Poll async jobs until job has finished.
|
- Poll async jobs until job has finished.
|
||||||
default: true
|
default: yes
|
||||||
type: bool
|
type: bool
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Create a vpc offering and enable it
|
- name: Create a vpc offering and enable it
|
||||||
- local_action:
|
cs_vpc_offering:
|
||||||
module: cs_vpc_offering
|
name: my_vpc_offering
|
||||||
name: "my_vpc_offering"
|
display_text: vpc offering description
|
||||||
display_text: "vpc offering description"
|
|
||||||
state: enabled
|
state: enabled
|
||||||
supported_services: [ Dns, Dhcp ]
|
supported_services: [ Dns, Dhcp ]
|
||||||
service_providers:
|
service_providers:
|
||||||
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
||||||
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
|
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Create a vpc offering with redundant router
|
- name: Create a vpc offering with redundant router
|
||||||
- local_action:
|
cs_vpc_offering:
|
||||||
module: cs_vpc_offering
|
name: my_vpc_offering
|
||||||
name: "my_vpc_offering"
|
display_text: vpc offering description
|
||||||
display_text: "vpc offering description"
|
|
||||||
supported_services: [ Dns, Dhcp, SourceNat ]
|
supported_services: [ Dns, Dhcp, SourceNat ]
|
||||||
service_providers:
|
service_providers:
|
||||||
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
||||||
|
@ -81,12 +82,12 @@ EXAMPLES = '''
|
||||||
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
|
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
|
||||||
service_capabilities:
|
service_capabilities:
|
||||||
- {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true}
|
- {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true}
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Create a region level vpc offering with distributed router
|
- name: Create a region level vpc offering with distributed router
|
||||||
- local_action:
|
cs_vpc_offering:
|
||||||
module: cs_vpc_offering
|
name: my_vpc_offering
|
||||||
name: "my_vpc_offering"
|
display_text: vpc offering description
|
||||||
display_text: "vpc offering description"
|
|
||||||
state: present
|
state: present
|
||||||
supported_services: [ Dns, Dhcp, SourceNat ]
|
supported_services: [ Dns, Dhcp, SourceNat ]
|
||||||
service_providers:
|
service_providers:
|
||||||
|
@ -96,12 +97,13 @@ EXAMPLES = '''
|
||||||
service_capabilities:
|
service_capabilities:
|
||||||
- {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true}
|
- {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true}
|
||||||
- {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true}
|
- {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true}
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Remove a vpc offering
|
- name: Remove a vpc offering
|
||||||
- local_action:
|
cs_vpc_offering:
|
||||||
module: cs_vpc_offering
|
name: my_vpc_offering
|
||||||
name: "my_vpc_offering"
|
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -96,10 +96,7 @@ lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E335
|
||||||
lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py E335
|
lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py E335
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_cluster.py E326
|
lib/ansible/modules/cloud/cloudstack/cs_cluster.py E326
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_host.py E326
|
lib/ansible/modules/cloud/cloudstack/cs_host.py E326
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E322
|
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E326
|
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E326
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_volume.py E322
|
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_volume.py E324
|
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_vpn_connection.py E322
|
lib/ansible/modules/cloud/cloudstack/cs_vpn_connection.py E322
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_zone.py E322
|
lib/ansible/modules/cloud/cloudstack/cs_zone.py E322
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_zone.py E326
|
lib/ansible/modules/cloud/cloudstack/cs_zone.py E326
|
||||||
|
|
Loading…
Reference in a new issue