ansible / ansible.builtin / v2.9.27 / module / one_image Manages OpenNebula images | "added in version" 2.6 of ansible.builtin" Authors: Milan Ilic (@ilicmilan) preview | supported by communityansible.builtin.one_image (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Manages OpenNebula images
# Fetch the IMAGE by id - one_image: id: 45 register: result
# Print the IMAGE properties - debug: msg: result
# Rename existing IMAGE - one_image: id: 34 state: renamed new_name: bar-image
# Disable the IMAGE by id - one_image: id: 37 enabled: no
# Enable the IMAGE by name - one_image: name: bar-image enabled: yes
# Clone the IMAGE by name - one_image: name: bar-image state: cloned new_name: bar-image-clone register: result
# Delete the IMAGE by id - one_image: id: '{{ result.id }}' state: absent
id: description: - A C(id) of the image you would like to manage. name: description: - A C(name) of the image you would like to manage. state: choices: - present - absent - cloned - renamed default: present description: - C(present) - state that is used to manage the image - C(absent) - delete the image - C(cloned) - clone the image - C(renamed) - rename the image to the C(new_name) 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. enabled: description: - Whether the image should be enabled or disabled. type: bool new_name: description: - A name that will be assigned to the existing or new image. - In the case of cloning, by default C(new_name) will take the name of the origin image with the prefix 'Copy of'. 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. 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.
group_id: description: image's group id returned: success sample: 1 type: int group_name: description: image's group name returned: success sample: one-users type: str id: description: image id returned: success sample: 153 type: int name: description: image name returned: success sample: app1 type: str owner_id: description: image's owner id returned: success sample: 143 type: int owner_name: description: image's owner name returned: success sample: ansible-test type: str running_vms: description: count of running vms that use this image returned: success sample: 7 type: int state: description: state of image instance returned: success sample: READY type: str used: description: is image in use returned: success sample: true type: bool