dellemc.unity.filesystem_snapshot (2.0.0) — module

Manage filesystem snapshot on the Unity storage system

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

Authors: Rajshree Khare (@kharer5) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.unity:==2.0.0


Add to requirements.yml

  collections:
    - name: dellemc.unity
      version: 2.0.0

Description

Managing Filesystem Snapshot on the Unity storage system includes create filesystem snapshot, get filesystem snapshot, modify filesystem snapshot and delete filesystem snapshot.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Filesystem Snapshot
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    filesystem_name: "ansible_test_FS"
    nas_server_name: "lglad069"
    description: "Created using playbook"
    auto_delete: true
    fs_access_type: "Protocol"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Filesystem Snapshot with expiry time
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap_1"
    filesystem_name: "ansible_test_FS_1"
    nas_server_name: "lglad069"
    description: "Created using playbook"
    expiry_time: "04/15/2021 2:30"
    fs_access_type: "Protocol"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get Filesystem Snapshot Details using Name
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get Filesystem Snapshot Details using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update Filesystem Snapshot attributes
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    description: "Description updated"
    auto_delete: false
    expiry_time: "04/15/2021 5:30"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update Filesystem Snapshot attributes using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    expiry_time: "04/18/2021 8:30"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete Filesystem Snapshot using Name
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    state: "absent"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete Filesystem Snapshot using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    state: "absent"

Inputs

    
port:
    default: 443
    description:
    - Port number through which communication happens with Unity management server.
    type: int

state:
    choices:
    - absent
    - present
    description:
    - The state option is used to mention the existence of the filesystem snapshot.
    required: true
    type: str

password:
    description:
    - The password of the Unity management server.
    required: true
    type: str

username:
    description:
    - The username of the Unity management server.
    required: true
    type: str

auto_delete:
    description:
    - This option specifies whether or not the filesystem snapshot will be automatically
      deleted.
    - If set to C(true), the filesystem snapshot will expire based on the pool auto deletion
      policy.
    - If set to C(false), the filesystem snapshot will not be auto deleted based on the
      pool auto deletion policy.
    - Option I(auto_delete) can not be set to C(true), if I(expiry_time) is specified.
    - If during creation neither I(auto_delete) nor I(expiry_time) is mentioned then the
      filesystem snapshot will be created keeping I(auto_delete) as C(true).
    - Once the I(expiry_time) is set, then the filesystem snapshot cannot be assigned
      to the auto delete policy.
    type: bool

description:
    description:
    - The additional information about the filesystem snapshot can be provided using this
      option.
    - The description can be removed by passing an empty string.
    type: str

expiry_time:
    description:
    - This option is for specifying the date and time after which the filesystem snapshot
      will expire.
    - The time is to be mentioned in UTC timezone.
    - The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits.
    type: str

snapshot_id:
    description:
    - During creation snapshot_id is auto generated.
    - For all other operations either I(snapshot_id) or I(snapshot_name) is required.
    type: str

filesystem_id:
    description:
    - The ID of the Filesystem for which snapshot is created.
    - For creation of filesystem snapshot either I(filesystem_id) or I(filesystem_name)
      is required.
    - Not required for other operations.
    type: str

nas_server_id:
    description:
    - The ID of the NAS server in which the Filesystem is created.
    - For creation of filesystem snapshot either I(filesystem_id) or I(filesystem_name)
      is required.
    - Not required for other operations.
    type: str

snapshot_name:
    description:
    - The name of the filesystem snapshot.
    - Mandatory parameter for creating a filesystem snapshot.
    - For all other operations either I(snapshot_name) or I(snapshot_id) is required.
    type: str

unispherehost:
    description:
    - IP or FQDN of the Unity management server.
    required: true
    type: str

fs_access_type:
    choices:
    - Checkpoint
    - Protocol
    description:
    - Access type of the filesystem snapshot.
    - Required only during creation of filesystem snapshot.
    - If not given, snapshot's access type will be C(Checkpoint).
    type: str

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

filesystem_name:
    description:
    - The name of the Filesystem for which snapshot is created.
    - For creation of filesystem snapshot either I(filesystem_name) or I(filesystem_id)
      is required.
    - Not required for other operations.
    type: str

nas_server_name:
    description:
    - The name of the NAS server in which the Filesystem is created.
    - For creation of filesystem snapshot either I(nas_server_name) or I(nas_server_id)
      is required.
    - Not required for other operations.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: true
  type: bool
filesystem_snapshot_details:
  contains:
    access_type:
      description: Access type of filesystem snapshot.
      type: str
    attached_wwn:
      description: Attached WWN details.
      type: str
    creation_time:
      description: Creation time of filesystem snapshot.
      type: str
    creator_schedule:
      description: Creator schedule of filesystem snapshot.
      type: str
    creator_type:
      description: Creator type for filesystem snapshot.
      type: str
    creator_user:
      description: Creator user for filesystem snapshot.
      type: str
    description:
      description: Description of the filesystem snapshot.
      type: str
    expiration_time:
      description: Date and time after which the filesystem snapshot will expire.
      type: str
    filesystem_id:
      description: Id of the filesystem for which the snapshot exists.
      type: str
    filesystem_name:
      description: Name of the filesystem for which the snapshot exists.
      type: str
    id:
      description: Unique identifier of the filesystem snapshot instance.
      type: str
    is_auto_delete:
      description: Is the filesystem snapshot is auto deleted or not.
      type: bool
    name:
      description: The name of the filesystem snapshot.
      type: str
    nas_server_id:
      description: Id of the NAS server on which filesystem exists.
      type: str
    nas_server_name:
      description: Name of the NAS server on which filesystem exists.
      type: str
    size:
      description: Size of the filesystem snapshot.
      type: int
  description: Details of the filesystem snapshot.
  returned: When filesystem snapshot exists
  sample:
    access_type: FilesystemSnapAccessTypeEnum.CHECKPOINT
    attached_wwn: null
    creation_time: '2022-10-21 04:42:53.951000+00:00'
    creator_schedule: null
    creator_type: SnapCreatorTypeEnum.USER_CUSTOM
    creator_user:
      id: user_admin
    description: Created using playbook
    existed: true
    expiration_time: null
    filesystem_id: fs_137
    filesystem_name: test
    hash: 8739894572587
    host_access: null
    id: '171798721695'
    io_limit_policy: null
    is_auto_delete: true
    is_modifiable: false
    is_modified: false
    is_read_only: true
    is_system_snap: false
    last_writable_time: null
    lun: null
    name: test_FS_snap_1
    nas_server_id: nas_1
    nas_server_name: lglad072
    parent_snap: null
    size: 107374182400
    snap_group: null
    state: SnapStateEnum.READY
  type: dict