Skip to content

Latest commit

 

History

History
716 lines (373 loc) · 14.7 KB

instance_snapshot_module.rst

File metadata and controls

716 lines (373 loc) · 14.7 KB
orphan:

morpheus.core.instance_snapshot module -- Manage Instance Snapshots

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.

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

New in morpheus.core 0.5.0

  • Manage Snapshots of Morpheus Instances.
.. tabularcolumns:: \X{1}{3}\X{2}{3}

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

id

.. ansible-option-type-line::

  :ansible-option-type:`integer`

Specify the id of an instance.

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

match_name

.. ansible-option-type-line::

  :ansible-option-type:`string`

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

name

.. ansible-option-type-line::

  :ansible-option-type:`string`

Filter instances by name.

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

regex_name

.. ansible-option-type-line::

  :ansible-option-type:`boolean`

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

snapshot_age

.. ansible-option-type-line::

  :ansible-option-type:`string`

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

snapshot_description

.. ansible-option-type-line::

  :ansible-option-type:`string`

Specify description for snapshot.

Used with :ansopt:`morpheus.core.instance\_snapshot#module:state=present`

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

snapshot_id

.. ansible-option-type-line::

  :ansible-option-type:`integer`

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

snapshot_name

.. ansible-option-type-line::

  :ansible-option-type:`string`

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

state

.. ansible-option-type-line::

  :ansible-option-type:`string`

.. 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: Snapshot All Instances
  morpheus.core.instance_snapshot:
    name: ^.*$
    match_name: all
    regex_name: true
    snapshot_name: Ansible Snapshot
    snapshot_description: Snapshot Created via Ansible
    state: present

- name: Remove All Snapshots for Specific Instance
  morpheus.core.instance_snapshot:
    id: 200
    state: remove_all

- name: Revert Instance to Oldest Snapshot matching Name
  morpheus.core.instance_snapshot:
    name: WebServer001
    snapshot_name: Ansible Snapshot
    snapshot_age: oldest
    state: revert

- name: Remove Specific Snapshot by Id
  morpheus.core.instance_snapshot:
    snapshot_id: 50
    state: absent

- name: Remove the Latest Snapshot matching Name for all Instances
  morpheus.core.instance_snapshot:
    name: ^.*$
    match_name: all
    regex_name: true
    snapshot_name: Ansible Snapshot
    state: absent

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

snapshot_results

.. ansible-option-type-line::

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

Authors

  • James Riach (@McGlovin1337)

Collection links

.. ansible-links::

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