Skip to content

Latest commit

 

History

History
666 lines (341 loc) · 13.4 KB

virtual_image_info_module.rst

File metadata and controls

666 lines (341 loc) · 13.4 KB
orphan:

morpheus.core.virtual_image_info module -- Gather Virtual Image information

Note

This module is part of the morpheus.core collection (version 0.7.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install morpheus.core.

To use it in a playbook, specify: morpheus.core.virtual_image_info.

.. rst-class:: ansible-version-added

New in morpheus.core 0.6.0

  • Gathers information about Virtual Images.
.. tabularcolumns:: \X{1}{3}\X{2}{3}

Parameter Comments
.. rst-class:: ansible-option-title

detail

.. ansible-option-type-line::

  :ansible-option-type:`string`

.. rst-class:: ansible-option-title

filter_type

.. ansible-option-type-line::

  :ansible-option-type:`string`

.. rst-class:: ansible-option-title

image_type

.. ansible-option-type-line::

  :ansible-option-type:`string`

Filter by image type code, e.g. vmware, ami

.. rst-class:: ansible-option-title

labels

.. ansible-option-type-line::

  :ansible-option-type:`list` / :ansible-option-elements:`elements=string`

Filter by matching labels

.. rst-class:: ansible-option-title

match_all_labels

.. ansible-option-type-line::

  :ansible-option-type:`boolean`

.. rst-class:: ansible-option-title

name

.. ansible-option-type-line::

  :ansible-option-type:`string`

Return info for Virtual Image by Name

.. rst-class:: ansible-option-title

regex_name

.. ansible-option-type-line::

  :ansible-option-type:`boolean`

.. rst-class:: ansible-option-title

virtual_image_id

.. ansible-option-type-line::

  :ansible-option-type:`integer`

Return info for specic Virtual Image by Id

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Attribute Support Description
.. rst-class:: ansible-option-title

check_mode

Can run in check_mode and return changed status prediction without modifying target

.. rst-class:: ansible-option-title

diff_mode

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode

.. rst-class:: ansible-option-title

platform

Target OS/families that can be operated against

- name: Get Virtual Image by Id
  morpheus.core.virtual_image_info:
    virtual_image_id: 500

- name: Get Virtual Image by Name
  morpheus.core.virtual_image_info:
    name: redhat_image

- name: Get Virtual Images by Regex Match
  morpheus.core.virtual_image_info:
    name: ^.*$
    regex_name: true

- name: Get Synced VMware Virtual Images
  morpheus.core.virtual_image_info:
    filter_type: synced
    image_type: vmware

- name: Get User Virtual Images
  morpheus.core.virtual_image_info:
    filter_type: user

Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:

.. tabularcolumns:: \X{1}{3}\X{2}{3}

Key Description
.. rst-class:: ansible-option-title

virtual_images

.. ansible-option-type-line::

  :ansible-option-type:`list` / :ansible-option-elements:`elements=string`

List of Virtual Images

.. rst-class:: ansible-option-line

:ansible-option-returned-bold:`Returned:` always

.. rst-class:: ansible-option-line
.. rst-class:: ansible-option-sample

:ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`{"virtual\_images": [{"date\_created": "2023-01-01T00:00:00Z", "description": null, "id": 500, "image\_type": "vmdk", "install\_agent": false, "is\_cloud\_init": false, "is\_force\_customization": false, "labels": [], "locations": [], "min\_disk\_gb": null, "min\_ram\_gb": 4, "name": "My User Image", "os\_type": {"bit\_count": 64, "category": "suse", "code": "suse.11.64", "description": null, "id": 92, "name": "suse enterprise 11 64-bit", "os\_family": "suse", "os\_version": "11", "platform": "linux", "vendor": "suse"}, "raw\_size\_gb": null, "ssh\_username": null, "status": "queued", "vm\_tools\_installed": true, "volumes": []}]}`

Authors

  • James Riach (@McGlovin1337)

Collection links

.. ansible-links::

  - title: "Repository (Sources)"
    url: "https://www.github.com/gomorpheus/ansible-collection-morpheus-core"
    external: true