New in version 2.6.
one_image_facts
before Ansible 2.9. The usage did not change.Aliases: one_image_facts
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
api_password - | Password of the user to login into OpenNebula RPC server. If not set then the value of the ONE_PASSWORD environment variable is used. | |
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 ONE_URL environment variable is used. | |
api_username - | Name of the user to login into the OpenNebula RPC server. If not set then the value of the ONE_USERNAME environment variable is used. | |
ids - | A list of images ids whose facts you want to gather. aliases: id | |
name - | A name of the image whose facts will be gathered.If the name begins with '~' the name will be used as regex patternwhich restricts the list of images (whose facts will be returned) whose names match specified regex. Also, if the name begins with '~*' case-insensitive matching will be performed.See examples for more details. |
# Gather facts about all images - one_image_info: register: result # Print all images facts - debug: msg: result # Gather facts about an image using ID - one_image_info: ids: - 123 # Gather facts about an image using the name - one_image_info: name: 'foo-image' register: foo_image # Gather facts about all IMAGEs whose name matches regex 'app-image-.*' - one_image_info: name: '~app-image-.*' register: app_images # Gather facts about all IMAGEs whose name matches regex 'foo-image-.*' ignoring cases - one_image_info: name: '~*foo-image-.*' register: foo_images
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 |
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/one_image_info_module.html