mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: cs_host: add host_tag alias (#28417)
This commit is contained in:
parent
ea51567697
commit
b3a57a4014
1 changed files with 10 additions and 28 deletions
|
@ -42,67 +42,49 @@ options:
|
||||||
- Url of the host used to create a host.
|
- Url of the host used to create a host.
|
||||||
- If not provided, C(http://) and param C(name) is used as url.
|
- If not provided, C(http://) and param C(name) is used as url.
|
||||||
- Only considered if C(state=present) and host does not yet exist.
|
- Only considered if C(state=present) and host does not yet exist.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Username for the host.
|
- Username for the host.
|
||||||
- Required if C(state=present) and host does not yet exist.
|
- Required if C(state=present) and host does not yet exist.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password for the host.
|
- Password for the host.
|
||||||
- Required if C(state=present) and host does not yet exist.
|
- Required if C(state=present) and host does not yet exist.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
pod:
|
pod:
|
||||||
description:
|
description:
|
||||||
- Name of the pod.
|
- Name of the pod.
|
||||||
- Required if C(state=present) and host does not yet exist.
|
- Required if C(state=present) and host does not yet exist.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
cluster:
|
cluster:
|
||||||
description:
|
description:
|
||||||
- Name of the cluster.
|
- Name of the cluster.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
hypervisor:
|
hypervisor:
|
||||||
description:
|
description:
|
||||||
- Name of the cluster.
|
- Name of the cluster.
|
||||||
- Required if C(state=present) and host does not yet exist.
|
- Required if C(state=present) and host does not yet exist.
|
||||||
choices: [ 'KVM', 'VMware', 'BareMetal', 'XenServer', 'LXC', 'HyperV', 'UCS', 'OVM', 'Simulator' ]
|
choices: [ 'KVM', 'VMware', 'BareMetal', 'XenServer', 'LXC', 'HyperV', 'UCS', 'OVM', 'Simulator' ]
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
allocation_state:
|
allocation_state:
|
||||||
description:
|
description:
|
||||||
- Allocation state of the host.
|
- Allocation state of the host.
|
||||||
choices: [ 'enabled', 'disabled' ]
|
choices: [ 'enabled', 'disabled' ]
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
host_tags:
|
host_tags:
|
||||||
description:
|
description:
|
||||||
- Tags of the host.
|
- Tags of the host.
|
||||||
required: false
|
aliases: [ host_tag ]
|
||||||
default: null
|
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State of the host.
|
- State of the host.
|
||||||
required: false
|
|
||||||
default: 'present'
|
default: 'present'
|
||||||
choices: [ 'present', 'absent' ]
|
choices: [ 'present', 'absent' ]
|
||||||
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.
|
||||||
required: false
|
|
||||||
default: null
|
|
||||||
extends_documentation_fragment: cloudstack
|
extends_documentation_fragment: cloudstack
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Ensure a host is present but disabled
|
- name: Ensure a host is present but disabled
|
||||||
- local_action:
|
local_action:
|
||||||
module: cs_host
|
module: cs_host
|
||||||
name: ix-pod01-esx01.example.com
|
name: ix-pod01-esx01.example.com
|
||||||
cluster: vcenter.example.com/ch-zrh-ix/pod01-cluster01
|
cluster: vcenter.example.com/ch-zrh-ix/pod01-cluster01
|
||||||
|
@ -114,22 +96,22 @@ EXAMPLES = '''
|
||||||
- perf
|
- perf
|
||||||
- gpu
|
- gpu
|
||||||
|
|
||||||
# Ensure an existing host is disabled
|
- name: Ensure an existing host is disabled
|
||||||
- local_action:
|
local_action:
|
||||||
module: cs_host
|
module: cs_host
|
||||||
name: ix-pod01-esx01.example.com
|
name: ix-pod01-esx01.example.com
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
allocation_state: disabled
|
allocation_state: disabled
|
||||||
|
|
||||||
# Ensure an existing host is disabled
|
- name: Ensure an existing host is disabled
|
||||||
- local_action:
|
local_action:
|
||||||
module: cs_host
|
module: cs_host
|
||||||
name: ix-pod01-esx01.example.com
|
name: ix-pod01-esx01.example.com
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
allocation_state: enabled
|
allocation_state: enabled
|
||||||
|
|
||||||
# Ensure a host is absent
|
- name: Ensure a host is absent
|
||||||
- local_action:
|
local_action:
|
||||||
module: cs_host
|
module: cs_host
|
||||||
name: ix-pod01-esx01.example.com
|
name: ix-pod01-esx01.example.com
|
||||||
zone: ch-zrh-ix-01
|
zone: ch-zrh-ix-01
|
||||||
|
@ -616,7 +598,7 @@ def main():
|
||||||
allocation_state=dict(choices=['enabled', 'disabled', 'maintenance']),
|
allocation_state=dict(choices=['enabled', 'disabled', 'maintenance']),
|
||||||
pod=dict(),
|
pod=dict(),
|
||||||
cluster=dict(),
|
cluster=dict(),
|
||||||
host_tags=dict(type='list'),
|
host_tags=dict(type='list', aliases=['host_tag']),
|
||||||
zone=dict(),
|
zone=dict(),
|
||||||
state=dict(choices=['present', 'absent'], default='present'),
|
state=dict(choices=['present', 'absent'], default='present'),
|
||||||
))
|
))
|
||||||
|
|
Loading…
Add table
Reference in a new issue