dellemc.powerstore.filesystem_snapshot (3.2.0) — module

Manage Filesystem Snapshots for PowerStore

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

Authors: Akash Shendge (@shenda1) <ansible.team@dell.com>

Install collection

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


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 3.2.0

Description

Supports the provisioning operations on a filesystem snapshot such as create, modify, delete and get the details of a filesystem snapshot.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create filesystem snapshot
  dellemc.powerstore.filesystem_snapshot:
      array_ip: "{{array_ip}}"
      validate_certs: "{{validate_certs}}"
      user: "{{user}}"
      password: "{{password}}"
      snapshot_name: "sample_filesystem_snapshot"
      nas_server: "ansible_nas_server"
      filesystem: "sample_filesystem"
      desired_retention: 20
      retention_unit: "days"
      state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details of filesystem snapshot
  dellemc.powerstore.filesystem_snapshot:
      array_ip: "{{array_ip}}"
      validate_certs: "{{validate_certs}}"
      user: "{{user}}"
      password: "{{password}}"
      snapshot_id: "{{fs_snapshot_id}}"
      state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify the filesystem snapshot
  dellemc.powerstore.filesystem_snapshot:
      array_ip: "{{array_ip}}"
      validate_certs: "{{validate_certs}}"
      user: "{{user}}"
      password: "{{password}}"
      snapshot_name: "sample_filesystem_snapshot"
      nas_server: "ansible_nas_server"
      description: "modify description"
      expiration_timestamp: ""
      state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete filesystem snapshot
  dellemc.powerstore.filesystem_snapshot:
      array_ip: "{{array_ip}}"
      validate_certs: "{{validate_certs}}"
      user: "{{user}}"
      password: "{{password}}"
      snapshot_id: "{{fs_snapshot_id}}"
      state: "absent"

Inputs

    
port:
    description:
    - Port number for the PowerStore array.
    - If not passed, it will take 443 as default.
    type: int

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

state:
    choices:
    - absent
    - present
    description:
    - Define whether the filesystem snapshot should exist or not.
    required: true
    type: str

timeout:
    default: 120
    description:
    - Time after which the connection will get terminated.
    - It is to be mentioned in seconds.
    type: int

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

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

filesystem:
    description:
    - The ID/Name of the filesystem for which snapshot will be taken.
    - If filesystem name is specified, then I(nas_server) is required to uniquely identify
      the filesystem.
    - Mandatory for create operation.
    type: str

nas_server:
    description:
    - The NAS server, this could be the name or ID of the NAS server.
    type: str

access_type:
    choices:
    - SNAPSHOT
    - PROTOCOL
    description:
    - Specifies whether the snapshot directory or protocol access is granted to the filesystem
      snapshot.
    - For create operation, if I(access_type) is not specified, snapshot will be created
      with C(SNAPSHOT) access type.
    type: str

description:
    description:
    - The description for the filesystem snapshot.
    type: str

snapshot_id:
    description:
    - The ID of the Snapshot.
    type: str

snapshot_name:
    description:
    - The name of the filesystem snapshot.
    - Mandatory for create operation.
    - Specify either snapshot name or ID (but not both) for any operation.
    type: str

retention_unit:
    choices:
    - hours
    - days
    default: hours
    description:
    - The unit for retention.
    type: str

validate_certs:
    aliases:
    - verifycert
    default: true
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - C(true) - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - C(false) - indicates that the SSL certificate should not be verified.
    type: bool

desired_retention:
    description:
    - The retention value for the Snapshot.
    - If the I(desired_retention)/I(expiration_timestamp) is not mentioned during creation,
      snapshot will be created with unlimited retention.
    - Maximum supported desired retention is 31 days.
    type: int

expiration_timestamp:
    description:
    - The expiration timestamp of the snapshot. This should be provided in UTC format,
      e.g 2020-07-24T10:54:54Z.
    - To remove the expiration timestamp, specify it as an empty string.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
create_fs_snap:
  description: Whether or not the resource has created.
  returned: always
  sample: 'false'
  type: bool
delete_fs_snap:
  description: Whether or not the resource has deleted.
  returned: always
  sample: 'false'
  type: bool
filesystem_snap_details:
  contains:
    access_type:
      description: Displays the type of access allowed to the snapshot.
      type: str
    creation_timestamp:
      description: The date and time the snapshot was created.
      type: str
    description:
      description: Description of the filesystem snapshot.
      type: str
    expiration_timestamp:
      description: The date and time the snapshot is due to be automatically deleted
        by the system.
      type: str
    id:
      description: Unique identifier of the filesystem snapshot instance.
      type: str
    name:
      description: The name of the snapshot.
      type: str
    nas_server:
      contains:
        id:
          description: ID of the NAS server.
          type: str
        name:
          description: Name of the NAS server
          type: str
      description: Details of NAS server on which snapshot is present.
      type: dict
    parent_id:
      description: ID of the filesystem on which snapshot is taken.
      type: str
    parent_name:
      description: Name of the filesystem on which snapshot is taken.
      type: str
  description: Details of the snapshot.
  returned: When snapshot exists.
  sample:
    access_policy: null
    access_policy_l10n: null
    access_type: Snapshot
    access_type_l10n: Snapshot
    creation_timestamp: '2022-01-16T21:58:02+00:00'
    creator_type: User
    creator_type_l10n: User
    default_hard_limit: null
    default_soft_limit: null
    description: null
    expiration_timestamp: '2022-01-17T00:58:00+00:00'
    filesystem_type: Snapshot
    filesystem_type_l10n: Snapshot
    folder_rename_policy: null
    folder_rename_policy_l10n: null
    grace_period: null
    id: 61e49f3f-9b57-e69b-1038-aa02b52a030f
    is_async_MTime_enabled: false
    is_modified: false
    is_quota_enabled: null
    is_smb_no_notify_enabled: null
    is_smb_notify_on_access_enabled: null
    is_smb_notify_on_write_enabled: null
    is_smb_op_locks_enabled: null
    is_smb_sync_writes_enabled: null
    last_refresh_timestamp: null
    last_writable_timestamp: null
    locking_policy: null
    locking_policy_l10n: null
    name: sample-filesystem-snapshot
    nas_server:
      id: 6026056b-5405-0e36-7697-c285b9fa42b7
      name: ansible_nas_server_2
    parent_id: 61e4947b-8992-3db7-2859-aa02b52a0308
    parent_name: sample-filesystem
    protection_policy: null
    size_total: '214748364800'
    size_used: '1621098496'
    smb_notify_on_change_dir_depth: 0
  type: dict
modify_fs_snap:
  description: Whether or not the resource has modified.
  returned: always
  sample: 'false'
  type: bool