mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-15 04:39:12 -07:00
cloudstack: streamline modules doc (part 2) (#52730)
* cloudstack: streamline modules doc (part 2) * Parameter types added * Copyright format fixes * Doc style fixes * Examples format fixes * minor fixes * fix missing quoting of "version_added"
This commit is contained in:
parent
88e8330e3e
commit
644362d0be
8 changed files with 206 additions and 187 deletions
|
@ -3,21 +3,7 @@
|
|||
#
|
||||
# (c) 2017, Marc-Aurèle Brothier @marcaurele
|
||||
# (c) 2017, René Moser <mail@renemoser.net>
|
||||
#
|
||||
# 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/>.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||
'status': ['preview'],
|
||||
|
@ -30,72 +16,81 @@ module: cs_instance_nic
|
|||
short_description: Manages NICs of an instance on Apache CloudStack based clouds.
|
||||
description:
|
||||
- Add and remove nic to and from network
|
||||
version_added: "2.4"
|
||||
version_added: '2.4'
|
||||
author:
|
||||
- "Marc-Aurèle Brothier (@marcaurele)"
|
||||
- "René Moser (@resmo)"
|
||||
- Marc-Aurèle Brothier (@marcaurele)
|
||||
- René Moser (@resmo)
|
||||
options:
|
||||
vm:
|
||||
description:
|
||||
- Name of instance.
|
||||
required: true
|
||||
aliases: ['name']
|
||||
type: str
|
||||
aliases: [ name ]
|
||||
network:
|
||||
description:
|
||||
- Name of the network.
|
||||
type: str
|
||||
required: true
|
||||
ip_address:
|
||||
description:
|
||||
- IP address to be used for the nic.
|
||||
type: str
|
||||
vpc:
|
||||
description:
|
||||
- Name of the VPC the C(vm) is related to.
|
||||
- Name of the VPC the I(vm) is related to.
|
||||
type: str
|
||||
domain:
|
||||
description:
|
||||
- Domain the instance is related to.
|
||||
type: str
|
||||
account:
|
||||
description:
|
||||
- Account the instance is related to.
|
||||
type: str
|
||||
project:
|
||||
description:
|
||||
- Name of the project the instance is deployed in.
|
||||
type: str
|
||||
zone:
|
||||
description:
|
||||
- Name of the zone in which the instance is deployed in.
|
||||
- If not set, default zone is used.
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- State of the nic.
|
||||
default: "present"
|
||||
choices: [ 'present', 'absent' ]
|
||||
type: str
|
||||
default: present
|
||||
choices: [ present, absent ]
|
||||
poll_async:
|
||||
description:
|
||||
- Poll async jobs until job has finished.
|
||||
type: bool
|
||||
default: 'yes'
|
||||
default: yes
|
||||
extends_documentation_fragment: cloudstack
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Add a nic on another network
|
||||
- local_action:
|
||||
module: cs_instance_nic
|
||||
- name: Add a nic on another network
|
||||
cs_instance_nic:
|
||||
vm: privnet
|
||||
network: privNetForBasicZone
|
||||
delegate_to: localhost
|
||||
|
||||
# Ensure IP address on a nic
|
||||
- local_action:
|
||||
module: cs_instance_nic
|
||||
- name: Ensure IP address on a nic
|
||||
cs_instance_nic:
|
||||
vm: privnet
|
||||
ip_address: 10.10.11.32
|
||||
network: privNetForBasicZone
|
||||
delegate_to: localhost
|
||||
|
||||
# Remove a secondary nic
|
||||
- local_action:
|
||||
module: cs_instance_nic
|
||||
- name: Remove a secondary nic
|
||||
cs_instance_nic:
|
||||
vm: privnet
|
||||
state: absent
|
||||
network: privNetForBasicZone
|
||||
delegate_to: localhost
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue