community.general.clc_server_snapshot (8.5.0) — module

Create, Delete and Restore server snapshots in CenturyLink Cloud

Authors: CLC Runner (@clc-runner)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples

- name: Create server snapshot
  community.general.clc_server_snapshot:
    server_ids:
        - UC1TEST-SVR01
        - UC1TEST-SVR02
    expiration_days: 10
    wait: true
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Restore server snapshot
  community.general.clc_server_snapshot:
    server_ids:
        - UC1TEST-SVR01
        - UC1TEST-SVR02
    wait: true
    state: restore
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete server snapshot
  community.general.clc_server_snapshot:
    server_ids:
        - UC1TEST-SVR01
        - UC1TEST-SVR02
    wait: true
    state: absent

Inputs

    
wait:
    default: 'True'
    description:
    - Whether to wait for the provisioning tasks to finish before returning.
    required: false
    type: str

state:
    choices:
    - present
    - absent
    - restore
    default: present
    description:
    - The state to insure that the provided resources are in.
    required: false
    type: str

server_ids:
    description:
    - The list of CLC server Ids.
    elements: str
    required: true
    type: list

expiration_days:
    default: 7
    description:
    - The number of days to keep the server snapshot before it expires.
    required: false
    type: int

Outputs

server_ids:
  description: The list of server ids that are changed
  returned: success
  sample:
  - UC1TEST-SVR01
  - UC1TEST-SVR02
  type: list