community / community.general / 1.3.14 / module / one_image Manages OpenNebula images Authors: Milan Ilic (@ilicmilan)community.general.one_image (1.3.14) — module
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
Manages OpenNebula images
- name: Fetch the IMAGE by id community.general.one_image: id: 45 register: result
- name: Print the IMAGE properties ansible.builtin.debug: msg: result
- name: Rename existing IMAGE community.general.one_image: id: 34 state: renamed new_name: bar-image
- name: Disable the IMAGE by id community.general.one_image: id: 37 enabled: no
- name: Enable the IMAGE by name community.general.one_image: name: bar-image enabled: yes
- name: Clone the IMAGE by name community.general.one_image: name: bar-image state: cloned new_name: bar-image-clone register: result
- name: Delete the IMAGE by id community.general.one_image: id: '{{ result.id }}' state: absent
id: description: - A C(id) of the image you would like to manage. type: int name: description: - A C(name) of the image you would like to manage. type: str 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) 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 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'. 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
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