On this page
cs_iso - Manages ISO images on Apache CloudStack based clouds.
New in version 2.0.
Synopsis
- Register and remove ISO images.
 
Requirements
The below requirements are needed on the host that executes this module.
- python >= 2.6
 - cs >= 0.6.10
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| account | 
        
        Account the ISO is related to.
         | 
     |
| api_http_method | 
       
  | 
      
        
        HTTP method used to query the API endpoint.
        
       
        If not given, the  
       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  get if not specified.
        | 
     
| api_key | 
        
        API key of the CloudStack API.
        
       
        If not given, the  
       CLOUDSTACK_KEY env variable is considered.
       
        As the last option, the value is taken from the ini config file, also see the notes.
         | 
     |
| api_region | Default: 
        "cloudstack"
         | 
      
        
        Name of the ini section in the  
       cloustack.ini file.
       
        If not given, the  CLOUDSTACK_REGION env variable is considered.
        | 
     
| api_secret | 
        
        Secret key of the CloudStack API.
        
       
        If not set, the  
       CLOUDSTACK_SECRET env variable is considered.
       
        As the last option, the value is taken from the ini config file, also see the notes.
         | 
     |
| api_timeout | 
        
        HTTP timeout in seconds.
        
       
        If not given, the  
       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.
         | 
     |
| api_url | 
        
        URL of the CloudStack API e.g. https://cloud.example.com/client/api.
        
       
        If not given, the  
       CLOUDSTACK_ENDPOINT env variable is considered.
       
        As the last option, the value is taken from the ini config file, also see the notes.
         | 
     |
| bootable | 
        
        Register the ISO to be bootable. Only used if  state is present.
        | 
     |
| checksum | 
        
        The MD5 checksum value of this ISO. If set, we search by checksum instead of name.
         | 
     |
| cross_zones  
        bool
         
        (added in 2.4)
         | 
      
       
  | 
      
        
        Whether the ISO should be synced or removed across zones.
        
       
        Mutually exclusive with  zone.
        | 
     
| display_text  
        (added in 2.4)
         | 
      
        
        Display text of the ISO.
        
       
        If not specified,  name will be used.
        | 
     |
| domain | 
        
        Domain the ISO is related to.
         | 
     |
| is_dynamically_scalable | 
        
        Register the ISO having XS/VMWare tools installed inorder to support dynamic scaling of VM cpu/memory. Only used if  state is present.
        | 
     |
| is_featured | 
        
        Register the ISO to be featured. Only used if  state is present.
        | 
     |
| is_public | 
        
        Register the ISO to be publicly available to all users. Only used if  state is present.
        | 
     |
| is_ready  
        bool
         | 
      
       
  | 
      
        
        This flag is used for searching existing ISOs. If set to  yes, it will only list ISO ready for deployment e.g. successfully downloaded and installed. Recommended to set it to no.
        | 
     
| iso_filter | 
       
  | 
      
        
        Name of the filter used to search for the ISO.
         | 
     
| name  
        required
         | 
      
        
        Name of the ISO.
         | 
     |
| os_type | 
        
        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  state is present.
        | 
     |
| poll_async  
        bool
         
        (added in 2.3)
         | 
      
       
  | 
      
        
        Poll async jobs until job has finished.
         | 
     
| project | 
        
        Name of the project the ISO to be registered in.
         | 
     |
| state | 
       
  | 
      
        
        State of the ISO.
         | 
     
| tags  
        (added in 2.4)
         | 
      
        
        List of tags. Tags are a list of dictionaries having keys  
       key and value.
       
        To delete all tags, set a empty list e.g.  
       tags: [].
       aliases: tag  | 
     |
| url | 
        
        URL where the ISO can be downloaded from. Required if  state is present.
        | 
     |
| zone | 
        
        Name of the zone you wish the ISO to be registered or deleted from.
        
       
        If not specified, first zone found will be used.
         | 
     
Notes
Note
- Ansible uses the 
cslibrary’s configuration method if credentials are not provided by the argumentsapi_url,api_key,api_secret. Configuration is read from several locations, in the following order. TheCLOUDSTACK_ENDPOINT,CLOUDSTACK_KEY,CLOUDSTACK_SECRETandCLOUDSTACK_METHOD.CLOUDSTACK_TIMEOUTenvironment variables. ACLOUDSTACK_CONFIGenvironment variable pointing to an.inifile. Acloudstack.inifile in the current working directory. A.cloudstack.inifile in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections incloudstack.ini. Use the argumentapi_regionto select the section name, default section iscloudstack. See https://github.com/exoscale/cs for more information. - A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
 - This module supports check mode.
 
Examples
# Register an ISO if ISO name does not already exist.
- local_action:
    module: 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)
# Register an ISO with given name if ISO md5 checksum does not already exist.
- local_action:
    module: 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
# Remove an ISO by name
- local_action:
    module: cs_iso
    name: Debian 7 64-bit
    state: absent
# Remove an ISO by checksum
- local_action:
    module: cs_iso
    name: Debian 7 64-bit
    checksum: 0b31bccccb048d20b551f70830bb7ad0
    state: absent
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| account  
        string
         | 
      success | 
        
        Account the ISO is related to.
         Sample:
        
       
        example account
         | 
     
| bootable  
        boolean
         
        (added in 2.4)
         | 
      success | 
        
        True if the ISO is bootable.
         Sample:
        
       
        True
         | 
     
| checksum  
        string
         | 
      success | 
        
        MD5 checksum of the ISO.
         Sample:
        
       
        0b31bccccb048d20b551f70830bb7ad0
         | 
     
| created  
        string
         | 
      success | 
        
        Date of registering.
         Sample:
        
       
        2015-03-29T14:57:06+0200
         | 
     
| cross_zones  
        boolean
         
        (added in 2.4)
         | 
      success | 
        
        true if the ISO is managed across all zones, false otherwise.
          | 
     
| display_text  
        string
         | 
      success | 
        
        Text to be displayed of the ISO.
         Sample:
        
       
        Debian 7.7 64-bit minimal 2015-03-19
         | 
     
| domain  
        string
         | 
      success | 
        
        Domain the ISO is related to.
         Sample:
        
       
        example domain
         | 
     
| format  
        string
         
        (added in 2.4)
         | 
      success | 
        
        Format of the ISO.
         Sample:
        
       
        ISO
         | 
     
| id  
        string
         | 
      success | 
        
        UUID of the ISO.
         Sample:
        
       
        a6f7a5fc-43f8-11e5-a151-feff819cdc9f
         | 
     
| is_featured  
        boolean
         
        (added in 2.4)
         | 
      success | 
        
        True if the ISO is featured.
         Sample:
        
       
        True
         | 
     
| is_public  
        boolean
         
        (added in 2.4)
         | 
      success | 
        
        True if the ISO is public.
         Sample:
        
       
        True
         | 
     
| is_ready  
        boolean
         | 
      success | 
        
        True if the ISO is ready to be deployed from.
         Sample:
        
       
        True
         | 
     
| name  
        string
         | 
      success | 
        
        Name of the ISO.
         Sample:
        
       
        Debian 7 64-bit
         | 
     
| os_type  
        string
         
        (added in 2.4)
         | 
      success | 
        
        Typo of the OS.
         Sample:
        
       
        CentOS 6.5 (64-bit)
         | 
     
| project  
        string
         | 
      success | 
        
        Project the ISO is related to.
         Sample:
        
       
        example project
         | 
     
| status  
        string
         | 
      success | 
        
        Status of the ISO.
         Sample:
        
       
        Successfully Installed
         | 
     
| tags  
        dict
         
        (added in 2.4)
         | 
      success | 
        
        List of resource tags associated with the ISO.
         Sample:
        
       
        [ { "key": "foo", "value": "bar" } ]
         | 
     
| zone  
        string
         | 
      success | 
        
        Name of zone the ISO is registered in.
         Sample:
        
       
        zuerich
         | 
     
Status
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
Maintenance
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author
- René Moser (@resmo)
 
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/2.6/modules/cs_iso_module.html