morpheus / morpheus.core / 0.6.0 / module / instance Basic Management of Morpheus Instances | "added in version" 0.5.0 of morpheus.core" Authors: James Riachmorpheus.core.instance (0.6.0) — module
Install with ansible-galaxy collection install morpheus.core:==0.6.0
collections: - name: morpheus.core version: 0.6.0
This module provides basic management of Morpheus Instances, such as setting running state, backup, deletion and lock status.
- name: Restart a specific instance morpheus.core.instance: id: 200 state: restarted
- name: Stop all instances matching regex name pattern morpheus.core.instance: name: ^PROD.*$ regex_name: true match_name: all state: stopped
- name: Suspend the first instance that matches name morpheus.core.instance: name: PRODWEBSVR001 match_name: first state: suspended
- name: Remove instance but keep backups morpheus.core.instance: name: PRODWEBSVR002 match_name: first state: absent remove_options: keep_backups: true
- name: Backup all instances morpheus.core.instance: name: ^.*$ regex_name: true match_name: all state: backup
id: description: - Specify the id of an instance. type: int name: description: - Filter instances by name. type: string state: choices: - running - started - stopped - restarted - suspended - locked - unlocked - backup - absent - eject description: - Set the State of the Instance. - C(eject) - Ejects ISO media from the instance. required: true type: string match_name: choices: - none - first - last - all default: none description: - Define instance selection method when specifying I(name) should more than one instance match. type: string regex_name: default: false description: - Treat the name parameter as a regular expression. type: bool remove_options: description: - When I(state=absent) specify additional removal options. suboptions: force: default: false description: - Force removal of instance. type: bool keep_backups: default: false description: - Keep instances backups. type: bool preserve_volumes: default: false description: - Preserve the instances volumes. type: bool release_floating_ips: default: false description: - Release instances floating IP Addresses. type: bool type: dict
instance_state: description: - State of the instance(s) following the requested action. returned: always sample: instance_state: - id: 200 locked: true name: PRODWEBSVR001 status: running