- Docs »
- one_host - Manages OpenNebula Hosts
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
one_host - Manages OpenNebula Hosts
The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
api_password
|
|
The password or token for XMLRPC authentication. If not specified then the value of the ONE_PASSWORD environment variable, if any, is used.
aliases: api_token
|
api_url
|
|
The ENDPOINT URL of the XMLRPC server. If not specified then the value of the ONE_URL environment variable, if any, is used.
aliases: api_endpoint
|
api_username
|
|
The name of the user for XMLRPC authentication. If not specified then the value of the ONE_USERNAME environment variable, if any, is used.
|
cluster_id
|
Default:
0
|
The cluster ID.
|
cluster_name
|
|
The cluster specified by name.
|
im_mad_name
|
Default:
"kvm"
|
The name of the information manager, this values are taken from the oned.conf with the tag name IM_MAD (name)
|
labels
|
|
The labels for this host.
|
name
required |
|
Hostname of the machine to manage.
|
state
|
Choices:
- absent
present ←
- enabled
- disabled
- offline
|
Takes the host to the desired lifecycle state.
If absent the host will be deleted from the cluster.
If present the host will be created in the cluster (includes enabled , disabled and offline states).
If enabled the host is fully operational.
disabled , e.g. to perform maintenance operations.
offline , host is totally offline.
|
template
|
|
The template or attribute changes to merge into the host template.
aliases: attributes
|
validate_certs
bool |
|
Whether to validate the SSL certificates or not. This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used.
|
vmm_mad_name
|
Default:
"kvm"
|
The name of the virtual machine manager mad name, this values are taken from the oned.conf with the tag name VM_MAD (name)
|
wait_timeout
|
Default:
300
|
time to wait for the desired state to be reached before timeout, in seconds.
|
- name: Create a new host in OpenNebula
one_host:
name: host1
cluster_id: 1
api_url: http://127.0.0.1:2633/RPC2
- name: Create a host and adjust its template
one_host:
name: host2
cluster_name: default
template:
LABELS:
- gold
- ssd
RESERVED_CPU: -100
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
- Rafael del Valle (@rvalle)
Hint
If you notice any issues in this documentation you can edit this document to improve it.