one_image_facts – Gather facts about OpenNebula images
one_image_facts – Gather facts about OpenNebula images
New in version 2.6.
Synopsis
- Gather facts about OpenNebula images
Requirements
The below requirements are needed on the host that executes this module.
- python-oca
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
api_password - |
Password of the user to login into OpenNebula RPC server. If not set then the value of the | |
api_url - |
URL of the OpenNebula RPC server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the | |
api_username - |
Name of the user to login into the OpenNebula RPC server. If not set then the value of the | |
ids - |
A list of images ids whose facts you want to gather.
| |
name - |
A If the which restricts the list of images (whose facts will be returned) whose names match specified regex. Also, if the See examples for more details. |
Examples
# Gather facts about all images
- one_image_facts:
register: result
# Print all images facts
- debug:
msg: result
# Gather facts about an image using ID
- one_image_facts:
ids:
- 123
# Gather facts about an image using the name
- one_image_facts:
name: 'foo-image'
register: foo_image
# Gather facts about all IMAGEs whose name matches regex 'app-image-.*'
- one_image_facts:
name: '~app-image-.*'
register: app_images
# Gather facts about all IMAGEs whose name matches regex 'foo-image-.*' ignoring cases
- one_image_facts:
name: '~*foo-image-.*'
register: foo_images
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
images complex |
success |
A list of images info
| |
group_id integer |
image's group id
Sample: 1 | ||
group_name string |
image's group name
Sample: one-users | ||
id integer |
image id
Sample: 153 | ||
name string |
image name
Sample: app1 | ||
owner_id integer |
image's owner id
Sample: 143 | ||
owner_name string |
image's owner name
Sample: ansible-test | ||
running_vms integer |
count of running vms that use this image
Sample: 7 | ||
state string |
state of image instance
Sample: READY | ||
used boolean |
is image in use
Sample: True |
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Milan Ilic (@ilicmilan)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/one_image_facts_module.html