mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: streamline modules doc (#52509)
* cloudstack: streamline modules doc (first 5) * Remove the "local_action" style from the examples
This commit is contained in:
parent
924f5b5467
commit
5abeb9659b
6 changed files with 173 additions and 187 deletions
|
@ -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'],
|
||||||
|
@ -30,80 +16,93 @@ short_description: Manages accounts on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, disable, lock, enable and remove accounts.
|
- Create, disable, lock, enable and remove accounts.
|
||||||
version_added: '2.0'
|
version_added: '2.0'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of account.
|
- Name of account.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Username of the user to be created if account did not exist.
|
- Username of the user to be created if account did not exist.
|
||||||
- Required on I(state=present).
|
- Required on I(state=present).
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password of the user to be created if account did not exist.
|
- Password of the user to be created if account did not exist.
|
||||||
- Required on I(state=present) if I(ldap_domain) is not set.
|
- Required on I(state=present) if I(ldap_domain) is not set.
|
||||||
|
type: str
|
||||||
first_name:
|
first_name:
|
||||||
description:
|
description:
|
||||||
- First name of the user to be created if account did not exist.
|
- First name of the user to be created if account did not exist.
|
||||||
- Required on I(state=present) if I(ldap_domain) is not set.
|
- Required on I(state=present) if I(ldap_domain) is not set.
|
||||||
|
type: str
|
||||||
last_name:
|
last_name:
|
||||||
description:
|
description:
|
||||||
- Last name of the user to be created if account did not exist.
|
- Last name of the user to be created if account did not exist.
|
||||||
- Required on I(state=present) if I(ldap_domain) is not set.
|
- Required on I(state=present) if I(ldap_domain) is not set.
|
||||||
|
type: str
|
||||||
email:
|
email:
|
||||||
description:
|
description:
|
||||||
- Email of the user to be created if account did not exist.
|
- Email of the user to be created if account did not exist.
|
||||||
- Required on I(state=present) if I(ldap_domain) is not set.
|
- Required on I(state=present) if I(ldap_domain) is not set.
|
||||||
|
type: str
|
||||||
timezone:
|
timezone:
|
||||||
description:
|
description:
|
||||||
- Timezone of the user to be created if account did not exist.
|
- Timezone of the user to be created if account did not exist.
|
||||||
|
type: str
|
||||||
network_domain:
|
network_domain:
|
||||||
description:
|
description:
|
||||||
- Network domain of the account.
|
- Network domain of the account.
|
||||||
|
type: str
|
||||||
account_type:
|
account_type:
|
||||||
description:
|
description:
|
||||||
- Type of the account.
|
- Type of the account.
|
||||||
default: 'user'
|
type: str
|
||||||
choices: [ 'user', 'root_admin', 'domain_admin' ]
|
choices: [ user, root_admin, domain_admin ]
|
||||||
|
default: user
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the account is related to.
|
- Domain the account is related to.
|
||||||
default: 'ROOT'
|
type: str
|
||||||
|
default: ROOT
|
||||||
role:
|
role:
|
||||||
description:
|
description:
|
||||||
- Creates the account under the specified role name or id.
|
- Creates the account under the specified role name or id.
|
||||||
|
type: str
|
||||||
version_added: 2.8
|
version_added: 2.8
|
||||||
ldap_domain:
|
ldap_domain:
|
||||||
description:
|
description:
|
||||||
- Name of the LDAP group or OU to bind.
|
- Name of the LDAP group or OU to bind.
|
||||||
- If set, account will be linked to LDAP.
|
- If set, account will be linked to LDAP.
|
||||||
|
type: str
|
||||||
version_added: 2.8
|
version_added: 2.8
|
||||||
ldap_type:
|
ldap_type:
|
||||||
description:
|
description:
|
||||||
- Type of the ldap name. GROUP or OU, defaults to GROUP.
|
- Type of the ldap name. GROUP or OU, defaults to GROUP.
|
||||||
default: 'GROUP'
|
type: str
|
||||||
choices: [ 'GROUP', 'OU' ]
|
choices: [ GROUP, OU ]
|
||||||
|
default: GROUP
|
||||||
version_added: 2.8
|
version_added: 2.8
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the account.
|
- State of the account.
|
||||||
- C(unlocked) is an alias for C(enabled).
|
- C(unlocked) is an alias for C(enabled).
|
||||||
default: 'present'
|
type: str
|
||||||
choices: [ 'present', 'absent', 'enabled', 'disabled', 'locked', 'unlocked' ]
|
choices: [ present, absent, enabled, disabled, locked, unlocked ]
|
||||||
|
default: present
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- Poll async jobs until job has finished.
|
- Poll async jobs until job has finished.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# create an account in domain 'CUSTOMERS'
|
- name: create an account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
username: customer_xy
|
username: customer_xy
|
||||||
password: S3Cur3
|
password: S3Cur3
|
||||||
|
@ -112,50 +111,51 @@ EXAMPLES = '''
|
||||||
email: john.doe@example.com
|
email: john.doe@example.com
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
role: Domain Admin
|
role: Domain Admin
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Lock an existing account in domain 'CUSTOMERS'
|
- name: Lock an existing account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
state: locked
|
state: locked
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Disable an existing account in domain 'CUSTOMERS'
|
- name: Disable an existing account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
state: disabled
|
state: disabled
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Enable an existing account in domain 'CUSTOMERS'
|
- name: Enable an existing account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
state: enabled
|
state: enabled
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Remove an account in domain 'CUSTOMERS'
|
- name: Remove an account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Create a single user LDAP account in domain 'CUSTOMERS'
|
- name: Create a single user LDAP account in domain 'CUSTOMERS'
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: customer_xy
|
name: customer_xy
|
||||||
username: customer_xy
|
username: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
ldap_domain: cn=customer_xy,cn=team_xy,ou=People,dc=domain,dc=local
|
ldap_domain: cn=customer_xy,cn=team_xy,ou=People,dc=domain,dc=local
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Create a LDAP account in domain 'CUSTOMERS' and bind it to a LDAP group
|
- name: Create a LDAP account in domain 'CUSTOMERS' and bind it to a LDAP group
|
||||||
- local_action:
|
cs_account:
|
||||||
module: cs_account
|
|
||||||
name: team_xy
|
name: team_xy
|
||||||
username: customer_xy
|
username: customer_xy
|
||||||
domain: CUSTOMERS
|
domain: CUSTOMERS
|
||||||
ldap_domain: cn=team_xy,ou=People,dc=domain,dc=local
|
ldap_domain: cn=team_xy,ou=People,dc=domain,dc=local
|
||||||
|
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'],
|
||||||
|
@ -30,53 +16,60 @@ short_description: Manages affinity groups on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create and remove affinity groups.
|
- Create and remove affinity groups.
|
||||||
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 affinity group.
|
- Name of the affinity group.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
affinity_type:
|
affinity_type:
|
||||||
description:
|
description:
|
||||||
- Type of the affinity group. If not specified, first found affinity type is used.
|
- Type of the affinity group. If not specified, first found affinity type is used.
|
||||||
|
type: str
|
||||||
aliases: [ affinty_type ]
|
aliases: [ affinty_type ]
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Description of the affinity group.
|
- Description of the affinity group.
|
||||||
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the affinity group.
|
- State of the affinity group.
|
||||||
default: 'present'
|
type: str
|
||||||
choices: [ 'present', 'absent' ]
|
choices: [ present, absent ]
|
||||||
|
default: present
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the affinity group is related to.
|
- Domain the affinity group is related to.
|
||||||
|
type: str
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Account the affinity group is related to.
|
- Account the affinity group is related to.
|
||||||
|
type: str
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
- Name of the project the affinity group is related to.
|
- Name of the project the affinity group is related to.
|
||||||
|
type: str
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- Poll async jobs until job has finished.
|
- Poll async jobs until job has finished.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Create a affinity group
|
- name: Create a affinity group
|
||||||
- local_action:
|
cs_affinitygroup:
|
||||||
module: cs_affinitygroup
|
|
||||||
name: haproxy
|
name: haproxy
|
||||||
affinity_type: host anti-affinity
|
affinity_type: host anti-affinity
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Remove a affinity group
|
- name: Remove a affinity group
|
||||||
- local_action:
|
cs_affinitygroup:
|
||||||
module: cs_affinitygroup
|
|
||||||
name: haproxy
|
name: haproxy
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -2,21 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# (c) 2016, René Moser <mail@renemoser.net>
|
# (c) 2016, 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'],
|
||||||
|
@ -29,112 +15,131 @@ module: cs_cluster
|
||||||
short_description: Manages host clusters on Apache CloudStack based clouds.
|
short_description: Manages host clusters on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, update and remove clusters.
|
- Create, update and remove clusters.
|
||||||
version_added: "2.1"
|
version_added: '2.1'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- name of the cluster.
|
- name of the cluster.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- Name of the zone in which the cluster belongs to.
|
- Name of the zone in which the cluster belongs to.
|
||||||
- If not set, default zone is used.
|
- If not set, default zone is used.
|
||||||
|
type: str
|
||||||
pod:
|
pod:
|
||||||
description:
|
description:
|
||||||
- Name of the pod in which the cluster belongs to.
|
- Name of the pod in which the cluster belongs to.
|
||||||
|
type: str
|
||||||
cluster_type:
|
cluster_type:
|
||||||
description:
|
description:
|
||||||
- Type of the cluster.
|
- Type of the cluster.
|
||||||
- Required if C(state=present)
|
- Required if I(state=present)
|
||||||
choices: [ 'CloudManaged', 'ExternalManaged' ]
|
type: str
|
||||||
|
choices: [ CloudManaged, ExternalManaged ]
|
||||||
hypervisor:
|
hypervisor:
|
||||||
description:
|
description:
|
||||||
- Name the hypervisor to be used.
|
- Name the hypervisor to be used.
|
||||||
- Required if C(state=present).
|
- Required if I(state=present).
|
||||||
choices: [ 'KVM', 'VMware', 'BareMetal', 'XenServer', 'LXC', 'HyperV', 'UCS', 'OVM' ]
|
type: str
|
||||||
|
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM ]
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- URL for the cluster
|
- URL for the cluster
|
||||||
|
type: str
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Username for the cluster.
|
- Username for the cluster.
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password for the cluster.
|
- Password for the cluster.
|
||||||
|
type: str
|
||||||
guest_vswitch_name:
|
guest_vswitch_name:
|
||||||
description:
|
description:
|
||||||
- Name of virtual switch used for guest traffic in the cluster.
|
- Name of virtual switch used for guest traffic in the cluster.
|
||||||
- This would override zone wide traffic label setting.
|
- This would override zone wide traffic label setting.
|
||||||
|
type: str
|
||||||
guest_vswitch_type:
|
guest_vswitch_type:
|
||||||
description:
|
description:
|
||||||
- Type of virtual switch used for guest traffic in the cluster.
|
- Type of virtual switch used for guest traffic in the cluster.
|
||||||
- Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)
|
- Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)
|
||||||
choices: [ 'vmwaresvs', 'vmwaredvs' ]
|
type: str
|
||||||
|
choices: [ vmwaresvs, vmwaredvs ]
|
||||||
public_vswitch_name:
|
public_vswitch_name:
|
||||||
description:
|
description:
|
||||||
- Name of virtual switch used for public traffic in the cluster.
|
- Name of virtual switch used for public traffic in the cluster.
|
||||||
- This would override zone wide traffic label setting.
|
- This would override zone wide traffic label setting.
|
||||||
|
type: str
|
||||||
public_vswitch_type:
|
public_vswitch_type:
|
||||||
description:
|
description:
|
||||||
- Type of virtual switch used for public traffic in the cluster.
|
- Type of virtual switch used for public traffic in the cluster.
|
||||||
- Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)
|
- Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)
|
||||||
choices: [ 'vmwaresvs', 'vmwaredvs' ]
|
type: str
|
||||||
|
choices: [ vmwaresvs, vmwaredvs ]
|
||||||
vms_ip_address:
|
vms_ip_address:
|
||||||
description:
|
description:
|
||||||
- IP address of the VSM associated with this cluster.
|
- IP address of the VSM associated with this cluster.
|
||||||
|
type: str
|
||||||
vms_username:
|
vms_username:
|
||||||
description:
|
description:
|
||||||
- Username for the VSM associated with this cluster.
|
- Username for the VSM associated with this cluster.
|
||||||
|
type: str
|
||||||
vms_password:
|
vms_password:
|
||||||
description:
|
description:
|
||||||
- Password for the VSM associated with this cluster.
|
- Password for the VSM associated with this cluster.
|
||||||
|
type: str
|
||||||
ovm3_cluster:
|
ovm3_cluster:
|
||||||
description:
|
description:
|
||||||
- Ovm3 native OCFS2 clustering enabled for cluster.
|
- Ovm3 native OCFS2 clustering enabled for cluster.
|
||||||
|
type: str
|
||||||
ovm3_pool:
|
ovm3_pool:
|
||||||
description:
|
description:
|
||||||
- Ovm3 native pooling enabled for cluster.
|
- Ovm3 native pooling enabled for cluster.
|
||||||
|
type: str
|
||||||
ovm3_vip:
|
ovm3_vip:
|
||||||
description:
|
description:
|
||||||
- Ovm3 vip to use for pool (and cluster).
|
- Ovm3 vip to use for pool (and cluster).
|
||||||
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the cluster.
|
- State of the cluster.
|
||||||
default: 'present'
|
type: str
|
||||||
choices: [ 'present', 'absent', 'disabled', 'enabled' ]
|
choices: [ present, absent, disabled, enabled ]
|
||||||
|
default: present
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Ensure a cluster is present
|
- name: Ensure a cluster is present
|
||||||
- local_action:
|
cs_cluster:
|
||||||
module: cs_cluster
|
|
||||||
name: kvm-cluster-01
|
name: kvm-cluster-01
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
hypervisor: KVM
|
hypervisor: KVM
|
||||||
cluster_type: CloudManaged
|
cluster_type: CloudManaged
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure a cluster is disabled
|
- name: Ensure a cluster is disabled
|
||||||
- local_action:
|
cs_cluster:
|
||||||
module: cs_cluster
|
|
||||||
name: kvm-cluster-01
|
name: kvm-cluster-01
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
state: disabled
|
state: disabled
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure a cluster is enabled
|
- name: Ensure a cluster is enabled
|
||||||
- local_action:
|
cs_cluster:
|
||||||
module: cs_cluster
|
|
||||||
name: kvm-cluster-01
|
name: kvm-cluster-01
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
state: enabled
|
state: enabled
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure a cluster is absent
|
- name: Ensure a cluster is absent
|
||||||
- local_action:
|
cs_cluster:
|
||||||
module: cs_cluster
|
|
||||||
name: kvm-cluster-01
|
name: kvm-cluster-01
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -2,21 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# (c) 2016, René Moser <mail@renemoser.net>
|
# (c) 2016, 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'],
|
||||||
|
@ -29,65 +15,72 @@ module: cs_configuration
|
||||||
short_description: Manages configuration on Apache CloudStack based clouds.
|
short_description: Manages configuration on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Manages global, zone, account, storage and cluster configurations.
|
- Manages global, zone, account, storage and cluster configurations.
|
||||||
version_added: "2.1"
|
version_added: '2.1'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the configuration.
|
- Name of the configuration.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
value:
|
value:
|
||||||
description:
|
description:
|
||||||
- Value of the configuration.
|
- Value of the configuration.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
account:
|
account:
|
||||||
description:
|
description:
|
||||||
- Ensure the value for corresponding account.
|
- Ensure the value for corresponding account.
|
||||||
|
type: str
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the account is related to.
|
- Domain the account is related to.
|
||||||
- Only considered if C(account) is used.
|
- Only considered if I(account) is used.
|
||||||
|
type: str
|
||||||
default: ROOT
|
default: ROOT
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- Ensure the value for corresponding zone.
|
- Ensure the value for corresponding zone.
|
||||||
|
type: str
|
||||||
storage:
|
storage:
|
||||||
description:
|
description:
|
||||||
- Ensure the value for corresponding storage pool.
|
- Ensure the value for corresponding storage pool.
|
||||||
|
type: str
|
||||||
cluster:
|
cluster:
|
||||||
description:
|
description:
|
||||||
- Ensure the value for corresponding cluster.
|
- Ensure the value for corresponding cluster.
|
||||||
|
type: str
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Ensure global configuration
|
- name: Ensure global configuration
|
||||||
- local_action:
|
cs_configuration:
|
||||||
module: cs_configuration
|
|
||||||
name: router.reboot.when.outofband.migrated
|
name: router.reboot.when.outofband.migrated
|
||||||
value: false
|
value: false
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure zone configuration
|
- name: Ensure zone configuration
|
||||||
- local_action:
|
cs_configuration:
|
||||||
module: cs_configuration
|
|
||||||
name: router.reboot.when.outofband.migrated
|
name: router.reboot.when.outofband.migrated
|
||||||
zone: ch-gva-01
|
zone: ch-gva-01
|
||||||
value: true
|
value: true
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure storage configuration
|
- name: Ensure storage configuration
|
||||||
- local_action:
|
cs_configuration:
|
||||||
module: cs_configuration
|
|
||||||
name: storage.overprovisioning.factor
|
name: storage.overprovisioning.factor
|
||||||
storage: storage01
|
storage: storage01
|
||||||
value: 2.0
|
value: 2.0
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Ensure account configuration
|
- name: Ensure account configuration
|
||||||
- local_action:
|
cs_configuration:
|
||||||
module: cs_configuration
|
|
||||||
name: allow.public.user.templates
|
name: allow.public.user.templates
|
||||||
value: false
|
value: false
|
||||||
account: acme inc
|
account: acme inc
|
||||||
domain: customers
|
domain: customers
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -19,78 +19,85 @@ description:
|
||||||
- Create and delete disk offerings for guest VMs.
|
- Create and delete disk offerings for guest VMs.
|
||||||
- Update display_text or display_offering of existing disk offering.
|
- Update display_text or display_offering of existing disk offering.
|
||||||
short_description: Manages disk offerings on Apache CloudStack based clouds.
|
short_description: Manages disk offerings on Apache CloudStack based clouds.
|
||||||
version_added: "2.7"
|
version_added: '2.7'
|
||||||
author:
|
author:
|
||||||
- "David Passante (@dpassante)"
|
- David Passante (@dpassante)
|
||||||
- "René Moser (@resmo)"
|
- René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
disk_size:
|
disk_size:
|
||||||
description:
|
description:
|
||||||
- Size of the disk offering in GB (1GB = 1,073,741,824 bytes).
|
- Size of the disk offering in GB (1GB = 1,073,741,824 bytes).
|
||||||
|
type: int
|
||||||
bytes_read_rate:
|
bytes_read_rate:
|
||||||
description:
|
description:
|
||||||
- Bytes read rate of the disk offering.
|
- Bytes read rate of the disk offering.
|
||||||
|
type: int
|
||||||
bytes_write_rate:
|
bytes_write_rate:
|
||||||
description:
|
description:
|
||||||
- Bytes write rate of the disk offering.
|
- Bytes write rate of the disk offering.
|
||||||
|
type: int
|
||||||
display_text:
|
display_text:
|
||||||
description:
|
description:
|
||||||
- Display text of the disk offering.
|
- Display text of the disk offering.
|
||||||
- If not set, C(name) will be used as C(display_text) while creating.
|
- If not set, C(name) will be used as C(display_text) while creating.
|
||||||
|
type: str
|
||||||
domain:
|
domain:
|
||||||
description:
|
description:
|
||||||
- Domain the disk offering is related to.
|
- Domain the disk offering is related to.
|
||||||
- Public for all domains and subdomains if not set.
|
- Public for all domains and subdomains if not set.
|
||||||
|
type: str
|
||||||
hypervisor_snapshot_reserve:
|
hypervisor_snapshot_reserve:
|
||||||
description:
|
description:
|
||||||
- Hypervisor snapshot reserve space as a percent of a volume.
|
- Hypervisor snapshot reserve space as a percent of a volume.
|
||||||
- Only for managed storage using Xen or VMware.
|
- Only for managed storage using Xen or VMware.
|
||||||
|
type: int
|
||||||
customized:
|
customized:
|
||||||
description:
|
description:
|
||||||
- Whether disk offering iops is custom or not.
|
- Whether disk offering iops is custom or not.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: no
|
||||||
iops_read_rate:
|
iops_read_rate:
|
||||||
description:
|
description:
|
||||||
- IO requests read rate of the disk offering.
|
- IO requests read rate of the disk offering.
|
||||||
|
type: int
|
||||||
iops_write_rate:
|
iops_write_rate:
|
||||||
description:
|
description:
|
||||||
- IO requests write rate of the disk offering.
|
- IO requests write rate of the disk offering.
|
||||||
|
type: int
|
||||||
iops_max:
|
iops_max:
|
||||||
description:
|
description:
|
||||||
- Max. iops of the disk offering.
|
- Max. iops of the disk offering.
|
||||||
|
type: int
|
||||||
iops_min:
|
iops_min:
|
||||||
description:
|
description:
|
||||||
- Min. iops of the disk offering.
|
- Min. iops of the disk offering.
|
||||||
|
type: int
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the disk offering.
|
- Name of the disk offering.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
provisioning_type:
|
provisioning_type:
|
||||||
description:
|
description:
|
||||||
- Provisioning type used to create volumes.
|
- Provisioning type used to create volumes.
|
||||||
choices:
|
type: str
|
||||||
- thin
|
choices: [ thin, sparse, fat ]
|
||||||
- sparse
|
|
||||||
- fat
|
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the disk offering.
|
- State of the disk offering.
|
||||||
choices:
|
type: str
|
||||||
- present
|
choices: [ present, absent ]
|
||||||
- absent
|
|
||||||
default: present
|
default: present
|
||||||
storage_type:
|
storage_type:
|
||||||
description:
|
description:
|
||||||
- The storage type of the disk offering.
|
- The storage type of the disk offering.
|
||||||
choices:
|
type: str
|
||||||
- local
|
choices: [ local, shared ]
|
||||||
- shared
|
|
||||||
storage_tags:
|
storage_tags:
|
||||||
description:
|
description:
|
||||||
- The storage tags for this disk offering.
|
- The storage tags for this disk offering.
|
||||||
aliases:
|
type: list
|
||||||
- storage_tag
|
aliases: [ storage_tag ]
|
||||||
display_offering:
|
display_offering:
|
||||||
description:
|
description:
|
||||||
- An optional field, whether to display the offering to the end user or not.
|
- An optional field, whether to display the offering to the end user or not.
|
||||||
|
@ -100,27 +107,27 @@ extends_documentation_fragment: cloudstack
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Create a disk offering with local storage
|
- name: Create a disk offering with local storage
|
||||||
local_action:
|
cs_disk_offering:
|
||||||
module: cs_disk_offering
|
|
||||||
name: small
|
name: small
|
||||||
display_text: Small 10GB
|
display_text: Small 10GB
|
||||||
disk_size: 10
|
disk_size: 10
|
||||||
storage_type: local
|
storage_type: local
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Create or update a disk offering with shared storage
|
- name: Create or update a disk offering with shared storage
|
||||||
local_action:
|
cs_disk_offering:
|
||||||
module: cs_disk_offering
|
|
||||||
name: small
|
name: small
|
||||||
display_text: Small 10GB
|
display_text: Small 10GB
|
||||||
disk_size: 10
|
disk_size: 10
|
||||||
storage_type: shared
|
storage_type: shared
|
||||||
storage_tags: SAN01
|
storage_tags: SAN01
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Remove a disk offering
|
- name: Remove a disk offering
|
||||||
local_action:
|
cs_disk_offering:
|
||||||
module: cs_disk_offering
|
|
||||||
name: small
|
name: small
|
||||||
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'],
|
||||||
|
@ -30,54 +16,56 @@ short_description: Manages domains on Apache CloudStack based clouds.
|
||||||
description:
|
description:
|
||||||
- Create, update and remove domains.
|
- Create, update and remove domains.
|
||||||
version_added: '2.0'
|
version_added: '2.0'
|
||||||
author: "René Moser (@resmo)"
|
author: René Moser (@resmo)
|
||||||
options:
|
options:
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
- Path of the domain.
|
- Path of the domain.
|
||||||
- Prefix C(ROOT/) or C(/ROOT/) in path is optional.
|
- Prefix C(ROOT/) or C(/ROOT/) in path is optional.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
network_domain:
|
network_domain:
|
||||||
description:
|
description:
|
||||||
- Network domain for networks in the domain.
|
- Network domain for networks in the domain.
|
||||||
|
type: str
|
||||||
clean_up:
|
clean_up:
|
||||||
description:
|
description:
|
||||||
- Clean up all domain resources like child domains and accounts.
|
- Clean up all domain resources like child domains and accounts.
|
||||||
- Considered on C(state=absent).
|
- Considered on I(state=absent).
|
||||||
default: false
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: no
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the domain.
|
- State of the domain.
|
||||||
required: false
|
type: str
|
||||||
default: 'present'
|
choices: [ present, absent ]
|
||||||
choices: [ 'present', 'absent' ]
|
default: present
|
||||||
poll_async:
|
poll_async:
|
||||||
description:
|
description:
|
||||||
- Poll async jobs until job has finished.
|
- Poll async jobs until job has finished.
|
||||||
default: true
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: yes
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Create a domain
|
- name: Create a domain
|
||||||
local_action:
|
cs_domain:
|
||||||
module: cs_domain
|
|
||||||
path: ROOT/customers
|
path: ROOT/customers
|
||||||
network_domain: customers.example.com
|
network_domain: customers.example.com
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Create another subdomain
|
- name: Create another subdomain
|
||||||
local_action:
|
cs_domain:
|
||||||
module: cs_domain
|
|
||||||
path: ROOT/customers/xy
|
path: ROOT/customers/xy
|
||||||
network_domain: xy.customers.example.com
|
network_domain: xy.customers.example.com
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Remove a domain
|
- name: Remove a domain
|
||||||
local_action:
|
cs_domain:
|
||||||
module: cs_domain
|
|
||||||
path: ROOT/customers/xy
|
path: ROOT/customers/xy
|
||||||
state: absent
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
Loading…
Reference in a new issue