dellemc.powerstore.dellemc_powerstore_snapshotrule (1.3.0) — module

SnapshotRule operations on a PowerStore storage system.

| "added in version" 1.0.0 of dellemc.powerstore"

Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 1.3.0

Description

Performs all snapshot rule operations on PowerStore Storage System. This modules supports get details of an existing snapshot rule, create new Snapshot Rule with Interval, create new Snapshot Rule with specific time and days_of_week with all supported parameters. Modify Snapshot Rule with supported parameters. Delete a specific Snapshot Rule.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Get details of an existing snapshot rule by name
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get details of an existing snapshot rule by id
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    snapshotrule_id: "{{snapshotrule_id}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new snapshot rule by interval
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    interval: "{{interval}}"
    days_of_week:
          - Monday
    desired_retention: "{{desired_retention}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Create new snapshot rule by time_of_day and days_of_week
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    desired_retention: "{{desired_retention}}"
    days_of_week:
      - Monday
      - Wednesday
      - Friday
    time_of_day: "{{time_of_day}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify existing snapshot rule to time_of_day and days_of_week
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    days_of_week:
      - Monday
      - Wednesday
      - Friday
      - Sunday
    time_of_day: "{{time_of_day}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify existing snapshot rule to interval
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    interval: "{{interval}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete an existing snapshot rule by name
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{name}}"
    state: "absent"

Inputs

    
name:
    description:
    - String variable. Indicates the name of the Snapshot rule.
    required: false
    type: str

user:
    description:
    - The username of the PowerStore host.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description:
    - String variable indicates the state of Snapshot rule.
    - For "Delete" operation only, it should be set to "absent".
    - For all Create, Modify or Get details operation it should be set to "present".
    required: true
    type: str

array_ip:
    description:
    - IP or FQDN of the PowerStore management system.
    required: true
    type: str

interval:
    choices:
    - Five_Minutes
    - Fifteen_Minutes
    - Thirty_Minutes
    - One_Hour
    - Two_Hours
    - Three_Hours
    - Four_Hours
    - Six_Hours
    - Eight_Hours
    - Twelve_Hours
    - One_Day
    description:
    - String variable. Indicates the interval between Snapshots.
    - When creating a Snapshot rule, specify either "interval" or "time_of_day", but not
      both.
    required: false
    type: str

new_name:
    description:
    - String variable. Indicates the new name of the Snapshot rule.
    - Used for renaming operation
    required: false
    type: str

password:
    description:
    - The password of the PowerStore host.
    required: true
    type: str

verifycert:
    choices:
    - true
    - false
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - True - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

time_of_day:
    description:
    - String variable. Indicates the time of the day to take a daily Snapshot, with the
      format "hh:mm" in 24 hour time format
    - When creating a Snapshot rule, specify either "interval"or "time_of_day" but not
      both.
    required: false
    type: str

days_of_week:
    choices:
    - Monday
    - Tuesday
    - Wednesday
    - Thursday
    - Friday
    - Saturday
    - Sunday
    description:
    - List of strings to specify days of the week on which the Snapshot rule. should be
      applied. Must be applied for Snapshot rules where the 'time_of_day' parameter is
      set. Optional for the Snapshot rule created with an interval. When 'days_of_week'
      is not specified for a new Snapshot rule, the rule is applied on every day of the
      week.
    elements: str
    required: false
    type: list

delete_snaps:
    description:
    - Boolean variable to specify whether all Snapshots previously created by this rule
      should also be deleted when this rule is removed.
    - True specifies to delete all previously created Snapshots by this rule while deleting
      this rule.
    - False specifies to retain all previously created Snapshots while deleting this rule
    type: bool

snapshotrule_id:
    description:
    - String variable. Indicates the ID of the Snapshot rule.
    required: false
    type: str

desired_retention:
    description:
    - Integer variable. Indicates the desired Snapshot retention period.
    - It is required when creating a new Snapshot rule.
    required: false
    type: int

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  type: bool
snapshotrule_details:
  contains:
    days_of_week:
      description: List of string to specify days of the week on which the rule should
        be applied.
      type: list
    desired_retention:
      description: Desired snapshot retention period.
      type: int
    id:
      description: The system generated ID given to the snapshot rule.
      type: str
    interval:
      description: The interval between snapshots.
      type: str
    name:
      description: Name of the snapshot rule.
      type: str
    policies:
      contains:
        id:
          description: The protection policy ID in which the snapshot rule is selected.
          type: str
        name:
          description: Name of the protection policy in which the snapshot rule is
            selected.
          type: str
      description: The protection policies details of the snapshot rule.
      type: complex
    time_of_day:
      description: The time of the day to take a daily snapshot.
      type: str
  description: Details of the snapshot rule.
  returned: When snapshot rule exists
  type: complex