community / community.general / 0.1.1 / module / cs_iso Manages ISO images on Apache CloudStack based clouds. Authors: René Moser (@resmo) stableinterface | supported by communitycommunity.general.cs_iso (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Register and remove ISO images.
- name: Register an ISO if ISO name does not already exist cs_iso: name: Debian 7 64-bit url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso os_type: Debian GNU/Linux 7(64-bit) delegate_to: localhost
- name: Register an ISO with given name if ISO md5 checksum does not already exist cs_iso: name: Debian 7 64-bit url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso os_type: Debian GNU/Linux 7(64-bit) checksum: 0b31bccccb048d20b551f70830bb7ad0 delegate_to: localhost
- name: Remove an ISO by name cs_iso: name: Debian 7 64-bit state: absent delegate_to: localhost
- name: Remove an ISO by checksum cs_iso: name: Debian 7 64-bit checksum: 0b31bccccb048d20b551f70830bb7ad0 state: absent delegate_to: localhost
url: description: - URL where the ISO can be downloaded from. Required if I(state) is present. type: str name: description: - Name of the ISO. required: true type: str tags: aliases: - tag description: - List of tags. Tags are a list of dictionaries having keys I(key) and I(value). - 'To delete all tags, set a empty list e.g. I(tags: []).' type: list zone: description: - Name of the zone you wish the ISO to be registered or deleted from. - If not specified, first zone found will be used. type: str state: choices: - present - absent default: present description: - State of the ISO. type: str domain: description: - Domain the ISO is related to. type: str account: description: - Account the ISO is related to. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. 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. - As the last option, the value is taken from the ini config file, also see the notes. type: str os_type: description: - Name of the OS that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed. Required if I(state) is present. type: str project: description: - Name of the project the ISO to be registered in. type: str bootable: description: - Register the ISO to be bootable. Only used if I(state) is present. type: bool checksum: description: - The MD5 checksum value of this ISO. If set, we search by checksum instead of name. type: str is_ready: default: false description: - This flag is used for searching existing ISOs. If set to C(yes), it will only list ISO ready for deployment e.g. successfully downloaded and installed. Recommended to set it to C(no). type: bool is_public: description: - Register the ISO to be publicly available to all users. Only used if I(state) is present. type: bool api_region: default: cloudstack description: - Name of the ini section in the C(cloustack.ini) file. - If not given, the C(CLOUDSTACK_REGION) env variable is considered. type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str iso_filter: choices: - featured - self - selfexecutable - sharedexecutable - executable - community default: self description: - Name of the filter used to search for the ISO. type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is 10 seconds if not specified. type: int cross_zones: default: false description: - Whether the ISO should be synced or removed across zones. - Mutually exclusive with I(zone). type: bool is_featured: description: - Register the ISO to be featured. Only used if I(state) is present. type: bool display_text: description: - Display text of the ISO. - If not specified, I(name) will be used. type: str api_http_method: choices: - get - post description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is C(get) if not specified. type: str is_dynamically_scalable: description: - Register the ISO having XS/VMware tools installed inorder to support dynamic scaling of VM cpu/memory. Only used if I(state) is present. type: bool
account: description: Account the ISO is related to. returned: success sample: example account type: str bootable: description: True if the ISO is bootable. returned: success sample: true type: bool version_added: '2.4' version_added_collection: community.general checksum: description: MD5 checksum of the ISO. returned: success sample: 0b31bccccb048d20b551f70830bb7ad0 type: str created: description: Date of registering. returned: success sample: 2015-03-29T14:57:06+0200 type: str cross_zones: description: true if the ISO is managed across all zones, false otherwise. returned: success sample: false type: bool version_added: '2.4' version_added_collection: community.general display_text: description: Text to be displayed of the ISO. returned: success sample: Debian 7.7 64-bit minimal 2015-03-19 type: str domain: description: Domain the ISO is related to. returned: success sample: example domain type: str format: description: Format of the ISO. returned: success sample: ISO type: str version_added: '2.4' version_added_collection: community.general id: description: UUID of the ISO. returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: str is_featured: description: True if the ISO is featured. returned: success sample: true type: bool version_added: '2.4' version_added_collection: community.general is_public: description: True if the ISO is public. returned: success sample: true type: bool version_added: '2.4' version_added_collection: community.general is_ready: description: True if the ISO is ready to be deployed from. returned: success sample: true type: bool name: description: Name of the ISO. returned: success sample: Debian 7 64-bit type: str os_type: description: Typo of the OS. returned: success sample: CentOS 6.5 (64-bit) type: str version_added: '2.4' version_added_collection: community.general project: description: Project the ISO is related to. returned: success sample: example project type: str status: description: Status of the ISO. returned: success sample: Successfully Installed type: str tags: description: List of resource tags associated with the ISO. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: dict version_added: '2.4' version_added_collection: community.general zone: description: Name of zone the ISO is registered in. returned: success sample: zuerich type: str