On this page
one_image_facts - Gather facts about OpenNebula images
New in version 2.6.
Synopsis
- Gather facts about OpenNebula images
 
Requirements
The below requirements are needed on the host that executes this module.
- python-oca
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| api_password | 
        
        Password of the user to login into OpenNebula RPC server. If not set
        
       
        then the value of the  ONE_PASSWORD environment variable is used.
        | 
     |
| api_url | 
        
        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  ONE_URL environment variable is used.
        | 
     |
| api_username | 
        
        Name of the user to login into the OpenNebula RPC server. If not set
        
       
        then the value of the  ONE_USERNAME environment variable is used.
        | 
     |
| ids | 
        
        A list of images ids whose facts you want to gather.
        
       aliases: id  | 
     |
| name | 
        
        A  
       name of the image whose facts will be gathered.
       
        If the  
       name begins with '~' the name will be used as regex pattern
       
        which restricts the list of images (whose facts will be returned) whose names match specified regex.
        
       
        Also, if the  
       name begins with '~*' case-insensitive matching will be performed.
       
        See examples for more details.
         | 
     
Examples
# Gather facts about all images
- one_image_facts:
  register: result
# Print all images facts
- debug:
    msg: result
# Gather facts about an image using ID
- one_image_facts:
    ids:
      - 123
# Gather facts about an image using the name
- one_image_facts:
    name: 'foo-image'
  register: foo_image
# Gather facts about all IMAGEs whose name matches regex 'app-image-.*'
- one_image_facts:
    name: '~app-image-.*'
  register: app_images
# Gather facts about all IMAGEs whose name matches regex 'foo-image-.*' ignoring cases
- one_image_facts:
    name: '~*foo-image-.*'
  register: foo_images
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | |
|---|---|---|---|
| images  
        complex
         | 
      success | 
        
        A list of images info
          | 
     |
| id  
        int
         | 
      
        
        image id
         Sample:
        
       
        153
         | 
     ||
| name  
        string
         | 
      
        
        image name
         Sample:
        
       
        app1
         | 
     ||
| group_id  
        int
         | 
      
        
        image's group id
         Sample:
        
       
        1
         | 
     ||
| group_name  
        string
         | 
      
        
        image's group name
         Sample:
        
       
        one-users
         | 
     ||
| owner_id  
        int
         | 
      
        
        image's owner id
         Sample:
        
       
        143
         | 
     ||
| owner_name  
        string
         | 
      
        
        image's owner name
         Sample:
        
       
        ansible-test
         | 
     ||
| state  
        string
         | 
      
        
        state of image instance
         Sample:
        
       
        READY
         | 
     ||
| used  
        bool
         | 
      
        
        is image in use
         Sample:
        
       
        True
         | 
     ||
| running_vms  
        int
         | 
      
        
        count of running vms that use this image
         Sample:
        
       
        7
         | 
     ||
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
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
- Milan Ilic (@ilicmilan)
 
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/one_image_facts_module.html