orphan: |
---|
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.instance_snapshot_info
.
.. rst-class:: ansible-version-added
New in morpheus.core 0.5.0
- Gather Snapshot information for instances.
.. tabularcolumns:: \X{1}{3}\X{2}{3}
Parameter | Comments |
---|---|
Filter instances by environment. |
|
Specify the id of an instance. |
|
Filter instances by matching labels. |
|
If labels have been specified, filter instances by those that match all specified labels. .. rst-class:: ansible-option-line |
|
Define instance selection method when specifying name should more than one instance match. .. rst-class:: ansible-option-line |
|
Filter instances by name. |
|
Treat the name parameter as a regular expression. .. rst-class:: ansible-option-line |
|
Filter instances by matching tags. |
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}
Attribute | Support | Description |
---|---|---|
:ansible-attribute-support-label:`Support: \ ` :ansible-attribute-support-na:`N/A` Not Required, Module does not make changes. |
Can run in check_mode and return changed status prediction without modifying target |
|
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
||
Target OS/families that can be operated against |
- name: Get Snapshots for specific instance
morpheus.core.instance_snapshot_info:
id: 200
- name: Get Snapshots for instances matching regex pattern
morpheus.core.instance_snapshot_info:
name: ^PRODWEB.*$
regex_name: true
- name: Get Snapshots for instances with assigned labels
morpheus.core.instance_snapshot_info:
labels:
- PROD
- WEB
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 |
---|---|
List of Instances and their snapshots .. 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:`{"instance\_snapshots": [{"instance\_id": 200, "instance\_name": "PRODWEBSVR001", "snapshot\_count": 1, "snapshots": [{"currently\_active": true, "datastore": null, "date\_created": "2023-07-29T15:33:05Z", "description": "Pre-maintenance Snapshot", "external\_id": "snapshot-100000", "id": 1, "name": "PRODWEBSVR001-2023-07-29T15:32:51.774Z", "parent\_snapshot": null, "snapshot\_created": "2023-07-29T15:33:36Z", "snapshot\_type": "vm", "state": null, "status": "complete", "zone": {"id": 5, "name": "Web Cloud"}}]}]}` |
- James Riach (@McGlovin1337)
.. ansible-links:: - title: "Repository (Sources)" url: "https://www.github.com/gomorpheus/ansible-collection-morpheus-core" external: true