Note
This module is part of the hitachivantara.vspone_block collection (version 3.5.1).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install hitachivantara.vspone_block. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_snapshot.
New in hitachivantara.vspone_block 3.0.0
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
connection_info dictionary / required | Information required to establish a connection to the storage system. |
|
address string / required |
IP address or hostname of the storage system. |
|
api_token string |
This field is used to pass the value of the lock token to operate on locked resources. |
|
connection_type string |
Type of connection to the storage system. Choices:
|
|
password string |
Password for authentication. This is a required field if api_token is not provided. |
|
username string |
Username for authentication. This is a required field if api_token is not provided. |
spec dictionary / required | Specification for the snapshot task. |
|
allocate_new_consistency_group boolean |
Specify whether to allocate a consistency group. Choices:
|
|
auto_split boolean |
Specify whether to automatically split the pair. Choices:
|
|
can_cascade boolean |
Specify whether the pair can be cascaded. Default is True when capacity savings is not Choices:
|
|
clones_automation boolean |
Specify whether the pair is to be cloned after the pair is created. You can specify this item when true is specified for the is_clone attribute. Choices:
|
|
copy_speed string |
Specify the copy speed at which the created pair is to be cloned. You can specify this item when true is specified for both the is_clone attribute and the clones_automation attribute. Choices:
|
|
is_clone boolean |
Specify whether to create a pair that has the clone attribute specified. If you specify true for this attribute, do not specify the auto_split attribute. When creating a Thin Image Advanced pair, you cannot specify true. Choices:
|
|
is_data_reduction_force_copy boolean |
Specify whether to forcibly create a pair for a volume for which the capacity saving function is enabled. Default is True when capacity savings is not Choices:
|
|
mirror_unit_id integer |
ID of the mirror unit. |
|
operation_type string |
Specify the operation type for garbage data deletion. This can be set when the should_delete_tree attribute is set to true. Choices:
|
|
pool_id integer |
ID of the pool where the snapshot will be allocated. |
|
primary_volume_id integer / required |
ID of the primary volume. |
|
retention_period integer |
Specify the retention period for the snapshot in hours. This can be set when the snapshot status is PSUS. This attribute can be used when the storage system is VSP One B20. You can specify this attribute only if the auto_split attribute is set to true for new pair. |
|
secondary_volume_id integer |
Secondary volume id. |
|
should_delete_tree boolean |
Specify whether to delete garbage data of all Thin Image pairs in a snapshot tree. Choices:
|
|
snapshot_group_name string |
Name of the snapshot group. |
state string | The level of the snapshot task. Choices are Choices:
|
storage_system_info dictionary | Information about the storage system. This field is an optional field. |
|
serial string |
The serial number of the storage system. |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: none | Determines if the module should run in check mode. |
Note
consistency_group_id and enable_quick_mode were removed in version 3.4.0. These were deprecated due to internal API simplification and are no longer supported.gateway was removed starting from version 3.4.0. Please use an earlier version if you require this connection type.- name: Create a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
- name: Create a thin image advance cascade
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
can_cascade: true
is_data_reduction_force_copy: true
- name: Create a thin image clone pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
is_clone: true
- name: Clone a thin image clone pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: clone
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
- name: Delete a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: absent
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Split a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Resync a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: resync
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Restore a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: restore
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
- name: Set the retention period for a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
retention_period: 500
- name: Set the retention period for a snapshot with auto split.
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
retention_period: 500
pool_id: 1
snapshot_group_name: "snap_group"
- name: Create and clone snapshot pair with copy speed and clones automation
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
pool_id: 5
snapshot_group_name: "snapshot-group-name-1"
is_clone: true
copy_speed: "FAST"
clones_automation: true
- name: Create floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: -1
pool_id: 5
snapshot_group_name: "snapshot-group-name-1"
mirror_unit_id: 4
- name: Assign floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: 200
mirror_unit_id: 1
- name: Unassign floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: -1
mirror_unit_id: 1
- name: Deleting garbage data of all Thin Image pairs in a snapshot tree
hitachivantara.vspone_block.vsp.hv_snapshot:
connection_info:
address: storage1.company.com
username: "username"
password: "password"
state: "defragment"
spec:
primary_volume_id: 100
operation_type: "start"
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
snapshots list / elements=dictionary | A list of snapshots gathered from the storage system. Returned: always |
|
can_cascade boolean |
Indicates if the snapshot can be cascaded. Returned: success Sample: |
|
concordance_rate integer |
Concordance rate of the snapshot operation. Returned: success Sample: |
|
copy_pace_track_size string |
Copy pace track size. Returned: success Sample: |
|
copy_rate integer |
Copy rate of the snapshot. Returned: success Sample: |
|
is_consistency_group boolean |
Indicates if the snapshot is part of a consistency group. Returned: success Sample: |
|
mirror_unit_id integer |
ID of the mirror unit. Returned: success Sample: |
|
pool_id integer |
ID of the pool where the snapshot is allocated. Returned: success Sample: |
|
primary_hex_volume_id string |
Hexadecimal ID of the primary volume. Returned: success Sample: |
|
primary_or_secondary string |
Indicates if the volume is primary or secondary. Returned: success Sample: |
|
primary_volume_id integer |
ID of the primary volume. Returned: success Sample: |
|
progress_rate integer |
Progress rate of the snapshot operation. Returned: success Sample: |
|
retention_period_in_hours integer |
Retention period of the snapshot. Returned: success Sample: |
|
secondary_hex_volume_id string |
Hexadecimal ID of the secondary volume. Returned: success Sample: |
|
secondary_volume_id integer |
ID of the secondary volume. Returned: success Sample: |
|
snapshot_group_name string |
Name of the snapshot group. Returned: success Sample: |
|
snapshot_id string |
ID of the snapshot. Returned: success Sample: |
|
status string |
Status of the snapshot. Returned: success Sample: |
|
storage_serial_number integer |
Serial number of the storage system. Returned: success Sample: |
|
svol_access_mode string |
Access mode of the secondary volume. Returned: success Sample: |
|
type string |
Type of the snapshot. Returned: success Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/hitachivantara/vspone_block/vsp.hv_snapshot_module.html