ansible / ansible.builtin / v2.9.18 / module / cs_image_store Manages CloudStack Image Stores. | "added in version" 2.8 of ansible.builtin" Authors: Patryk Cichy (@PatTheSilent) preview | supported by communityansible.builtin.cs_image_store (v2.9.18) — module
pip
Install with pip install ansible==2.9.18
Deploy, remove, recreate CloudStack Image Stores.
- name: Add a Image Store (NFS) cs_image_store: zone: zone-01 name: nfs-01 provider: NFS url: nfs://192.168.21.16/exports/secondary delegate_to: localhost
# Change the NFS share URL and force a Image Store recreation - name: Change the NFS url cs_image_store: zone: zone-01 name: nfs-01 provider: NFS force_recreate: yes url: nfs://192.168.21.10/shares/secondary delegate_to: localhost
- name: delete the image store cs_image_store: name: nfs-01 zone: zone-01 state: absent delegate_to: localhost
url: description: - The URL for the Image Store. - Required when I(state=present). type: str name: description: - The ID of the Image Store. Required when deleting a Image Store. required: true type: str zone: description: - The Zone name for the Image Store. required: true type: str state: choices: - present - absent default: present description: - Stage of the Image Store type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str provider: description: - The image store provider name. Required when creating a new Image Store type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int force_recreate: default: false description: - Set to C(yes) if you're changing an existing Image Store. - This will force the recreation of the Image Store. - Recreation might fail if there are snapshots present on the Image Store. Delete them before running the recreation. type: bool api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
id: description: the ID of the image store returned: success sample: feb11a84-a093-45eb-b84d-7f680313c40b type: str name: description: the name of the image store returned: success sample: nfs-01 type: str protocol: description: the protocol of the image store returned: success sample: nfs type: str provider_name: description: the provider name of the image store returned: success sample: NFS type: str scope: description: the scope of the image store returned: success sample: ZONE type: str url: description: the url of the image store returned: success sample: nfs://192.168.21.16/exports/secondary type: str zone: description: the Zone name of the image store returned: success sample: zone-01 type: str