community / community.general / 2.5.9 / module / one_image_info Gather information on OpenNebula images Authors: Milan Ilic (@ilicmilan), Jan Meerkamp (@meerkampdvv)community.general.one_image_info (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Gather information on OpenNebula images.
This module was called C(one_image_facts) before Ansible 2.9. The usage did not change.
- 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
ids: aliases: - id description: - A list of images ids whose facts you want to gather. elements: str type: list name: description: - A C(name) of the image whose facts will be gathered. - If the C(name) begins with '~' the C(name) will be used as regex pattern - which restricts the list of images (whose facts will be returned) whose names match specified regex. - Also, if the C(name) begins with '~*' case-insensitive matching will be performed. - See examples for more details. type: str api_url: description: - 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 C(ONE_URL) environment variable is used. type: str api_password: description: - Password of the user to login into OpenNebula RPC server. If not set - then the value of the C(ONE_PASSWORD) environment variable is used. type: str api_username: description: - Name of the user to login into the OpenNebula RPC server. If not set - then the value of the C(ONE_USERNAME) environment variable is used. type: str
images: contains: group_id: description: image's group id sample: 1 type: int group_name: description: image's group name sample: one-users type: str id: description: image id sample: 153 type: int name: description: image name sample: app1 type: str owner_id: description: image's owner id sample: 143 type: int owner_name: description: image's owner name sample: ansible-test type: str running_vms: description: count of running vms that use this image sample: 7 type: int state: description: state of image instance sample: READY type: str used: description: is image in use sample: true type: bool description: A list of images info returned: success type: complex