community.general.one_image_info module – Gather information on OpenNebula images
Note
This module is part of the community.general collection (version 6.6.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.one_image_info
.
Synopsis
Gather information on OpenNebula images.
This module was called
one_image_facts
before Ansible 2.9. The usage did not change.
Requirements
The below requirements are needed on the host that executes this module.
pyone
Parameters
Parameter |
Comments |
---|---|
Password of the user to login into OpenNebula RPC server. If not set then the value of the |
|
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 |
|
Name of the user to login into the OpenNebula RPC server. If not set then the value of the |
|
A list of images ids whose facts you want to gather. |
|
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. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Gather facts about all images
community.general.one_image_info:
register: result
- name: Print all images facts
ansible.builtin.debug:
msg: result
- name: Gather facts about an image using ID
community.general.one_image_info:
ids:
- 123
- name: Gather facts about an image using the name
community.general.one_image_info:
name: 'foo-image'
register: foo_image
- name: Gather facts about all IMAGEs whose name matches regex 'app-image-.*'
community.general.one_image_info:
name: '~app-image-.*'
register: app_images
- name: Gather facts about all IMAGEs whose name matches regex 'foo-image-.*' ignoring cases
community.general.one_image_info:
name: '~*foo-image-.*'
register: foo_images
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A list of images info Returned: success |
|
image’s group id Returned: success Sample: |
|
image’s group name Returned: success Sample: |
|
image id Returned: success Sample: |
|
image name Returned: success Sample: |
|
image’s owner id Returned: success Sample: |
|
image’s owner name Returned: success Sample: |
|
count of running vms that use this image Returned: success Sample: |
|
state of image instance Returned: success Sample: |
|
is image in use Returned: success Sample: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication