Skip to content

Latest commit

 

History

History
4495 lines (4295 loc) · 272 KB

readme.md

File metadata and controls

4495 lines (4295 loc) · 272 KB

source

: hpe3par_cpg.py

hpe3par_cpg - Manage HPE Alletra MP,9000 and Primera and 3PAR CPG

Synopsis

  • Create and delete CPG on HPE Alletra MP, 9000 and Primera and 3PAR.

Parameters

Parameter
Choices/Defaults
Comments
cpg_name
required
Name of the CPG.
disk_type
    Choices:
  • FC
  • NL
  • SSD
Specifies that physical disks must have the specified device type.
domain
Specifies the name of the domain in which the object will reside.
growth_increment
Default:
-1.0
Specifies the growth increment the amount of logical disk storage created on each auto-grow operation.
growth_increment_unit
    Choices:
  • MiB
  • GiB ←
  • TiB
Unit of growth increment.
growth_limit
Default:
-1.0
Specifies that the autogrow operation is limited to the specified storage amount that sets the growth limit.
growth_limit_unit
    Choices:
  • MiB
  • GiB ←
  • TiB
Unit of growth limit.
growth_warning
Default:
-1.0
Specifies that the threshold of used logical disk space when exceeded results in a warning alert.
growth_warning_unit
    Choices:
  • MiB
  • GiB ←
  • TiB
Unit of growth warning.
high_availability
    Choices:
  • PORT
  • CAGE
  • MAG
Specifies that the layout must support the failure of one port pair, one cage, or one magazine.
raid_type
    Choices:
  • R0
  • R1
  • R5
  • R6
Specifies the RAID type for the logical disk.
set_size
Default:
-1
Specifies the set size in the number of chunklets.
state
required
    Choices:
  • present
  • absent
Whether the specified CPG should exist or not.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
sdgs

Specifies the growth increment, the amount of logical disk storage created on each auto-grow operation.
sdgw

Specifies that the threshold of used logical disk space, when exceeded, results in a warning alert.
sdgs_unit
    Choices:
  • MiB ←
  • GiB
  • TiB
"Unit of sdgs."
sdgw_unit
    Choices:
  • MiB ←
  • GiB
  • TiB
"Unit of sdgs."

Examples --------
- name: Create CPG "{{ cpg_name }}"
  hpe3par_cpg:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    cpg_name="{{ cpg_name }}"
    domain="{{ domain }}"
    growth_increment="{{ growth_increment }}"
    growth_increment_unit="{{ growth_increment_unit }}"
    growth_limit="{{ growth_limit }}"
    growth_limit_unit="{{ growth_limit_unit }}"
    growth_warning="{{ growth_warning }}"
    growth_warning_unit="{{ growth_warning_unit }}"
    raid_type="{{ raid_type }}"
    set_size="{{ set_size }}"
    high_availability="{{ high_availability }}"
    disk_type="{{ disk_type }}"

- name: Delete CPG "{{ cpg_name }}"
  hpe3par_cpg:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    cpg_name="{{ cpg_name }}"

- name: Create CPG ansible_auto_CreateCPG-001
    hpe3par_cpg:
      storage_system_ip="{{ storage_system_ip }}"
      storage_system_username="{{ storage_system_username }}"
      storage_system_password="{{ storage_system_password }}"
      state=present_arcus
      cpg_name=ansible_auto_CreateCPG-001
      sdgs=8
      sdgw=52

Author

source

: hpe3par_flash_cache.py

hpe3par_flash_cache - Manage 3PAR Flash Cache

Synopsis

  • On 3PAR - Create Flash Cache - Delete Flash Cache
  • On HPE Alletra MP , 9000 and Primera - Create Flash Cache - Delete Flash Cache functions are unsuppported.

Parameters

Parameter
Choices/Defaults
Comments
mode
Simulator 1 Real 2 (default)
size_in_gib
required
Specifies the node pair size of the Flash Cache on the system.
state
required
    Choices:
  • present
  • absent
Whether the specified Flash Cache should exist or not.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.

Examples --------
- name: Create Flash Cache
  hpe3par_flash_cache:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    size_in_gib="{{ size_in_gib }}"

- name: Delete Flash Cache
  hpe3par_flash_cache:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent

Author

source

: hpe3par_host.py

hpe3par_host - Manage HPE Alletra MP, 9000 and Primera and 3PAR Host

Synopsis

  • On HPE Alletra MP, 9000 and PRIMERA and 3PAR - Create Host - Delete Host - Add Initiator Chap - Remove Initiator Chap - Add Target Chap - Remove Target Chap - Add FC Path to Host - Remove FC Path from Host - Add ISCSI Path to Host - Remove ISCSI Path from Host

Parameters

Parameter
Choices/Defaults
Comments
chap_name
The chap name. Required with actions add_initiator_chap, add_target_chap
chap_secret
The chap secret for the host or the target Required with actions add_initiator_chap, add_target_chap
chap_secret_hex
    Choices:
  • no
  • yes
If true, then chapSecret is treated as Hex.
force_path_removal
    Choices:
  • no
  • yes
If true, remove WWN(s) or iSCSs even if there are VLUNs that are exported to the host.
host_domain
Create the host in the specified domain, or in the default domain, if unspecified
host_fc_wwns
Set one or more WWNs for the host. Required with action add_fc_path_to_host, remove_fc_path_from_host
host_iscsi_names
Set one or more iSCSI names for the host. Required with action add_iscsi_path_to_host, remove_iscsi_path_from_host
host_name
required
Name of the Host.
host_new_name
required
New name of the Host.
host_persona
    Choices:
  • GENERIC
  • GENERIC_ALUA
  • GENERIC_LEGACY
  • HPUX_LEGACY
  • AIX_LEGACY
  • EGENERA
  • ONTAP_LEGACY
  • VMWARE
  • OPENVMS
  • HPUX
  • WINDOWS_SERVER
ID of the persona to assign to the host. Uses the default persona unless you specify the host persona.
state
required
    Choices:
  • present
  • absent
  • modify
  • add_initiator_chap
  • remove_initiator_chap
  • add_target_chap
  • remove_target_chap
  • add_fc_path_to_host
  • remove_fc_path_from_host
  • add_iscsi_path_to_host
  • remove_iscsi_path_from_host
Whether the specified Host should exist or not. State also provides actions to add and remove initiator and target chap, add fc/iscsi path to host.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.

Examples --------
- name: Create Host "{{ host_name }}"
  hpe3par_host:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    host_name="{{ host_name }}"

- name: Modify Host "{{ host_name }}"
  hpe3par_host:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=modify
    host_name="{{ host_name }}"
    host_new_name="{{ host_new_name }}"

- name: Delete Host "{{ new_name }}"
  hpe3par_host:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    host_name="{{ host_new_name }}"

Author

source

: hpe3par_hostset.py

hpe3par_hostset - Manage HPE Alletra MP, 9000 and Primera and 3PAR Host Set

Synopsis

  • On HPE Alletra MP, 9000 and PRIMERA and 3PAR - Create Host Set - Add Hosts to Host Set - Remove Hosts from Host Set

Parameters

Parameter
Choices/Defaults
Comments
domain
The domain in which the VV set or host set will be created.
hostset_name
required
Name of the host set to be created.
setmembers
The host to be added to the set. Required with action add_hosts, remove_hosts
state
required
    Choices:
  • present
  • absent
  • add_hosts
  • remove_hosts
Whether the specified Host Set should exist or not. State also provides actions to add or remove hosts from host set
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.

Examples --------
- name: Create hostset "{{ hostsetset_name }}"
  hpe3par_hostset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    hostset_name="{{ hostset_name }}"
    setmembers="{{ add_host_setmembers }}"

- name: Add hosts to Hostset "{{ hostsetset_name }}"
  hpe3par_hostset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=add_hosts
    hostset_name="{{ hostset_name }}"
    setmembers="{{ add_host_setmembers2 }}"

- name: Remove hosts from Hostset "{{ hostsetset_name }}"
  hpe3par_hostset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=remove_hosts
    hostset_name="{{ hostset_name }}"
    setmembers="{{ remove_host_setmembers }}"

- name: Delete Hostset "{{ hostset_name }}"
  hpe3par_hostset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    hostset_name="{{ hostset_name }}"

Author

source

: hpe3par_offline_clone.py

hpe3par_offline_clone - Manage HPE Alletra MP, 9000 and Primera and 3PAR Offline Clone

Synopsis

  • On HPE Alletra MP, 9000 and PRIMERA and 3PAR - Create Offline Clone - Delete Clone - Resync Clone - Stop Cloning

Parameters

Parameter
Choices/Defaults
Comments
base_volume_name
Specifies the source volume. Required with action present, absent, stop
clone_name
required
Specifies the destination volume.
dest_cpg
Specifies the destination CPG for an online copy.
priority
    Choices:
  • HIGH
  • MEDIUM ←
  • LOW
Priority of action.
save_snapshot
    Choices:
  • no
  • yes
Enables (true) or disables (false) saving the the snapshot of the source volume after completing the copy of the volume.
skip_zero
    Choices:
  • no
  • yes
Enables (true) or disables (false) copying only allocated portions of the source VV from a thin provisioned source.
state
required
    Choices:
  • present
  • absent
  • resync
  • stop
Whether the specified Clone should exist or not. State also provides actions to resync and stop clone
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.

Examples --------
- name: Create Clone {{ clone_name }}
  hpe3par_offline_clone:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    clone_name={{ clone_name }}
    base_volume_name="{{ volume_name }}"
    dest_cpg="{{ cpg }}"
    priority="MEDIUM"

- name: Stop Clone {{ clone_name }}
  hpe3par_offline_clone:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=stop
    clone_name={{ clone_name }}
    base_volume_name="{{ volume_name }}"

- name: Delete clone {{ clone_name }}
  hpe3par_offline_clone:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    clone_name={{ clone_name }}
    base_volume_name="{{ volume_name }}"

Author

source

: hpe3par_online_clone.py

hpe3par_online_clone - Manage HPE Alletra MP, 9000 and Primera and 3PAR Online Clone

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Create Online Clone - Delete Clone - Resync Clone

Parameters

Parameter
Choices/Defaults
Comments
base_volume_name
Specifies the source volume. Required with action present, absent, stop
clone_name
required
Specifies the destination volume.
compression
    Choices:
  • no
  • yes
Enables (true) or disables (false) compression of the created volume. Only tpvv or tdvv are compressed.
dest_cpg
Specifies the destination CPG for an online copy.
snap_cpg
Specifies the snapshot CPG for an online copy.
state
required
    Choices:
  • present
  • absent
  • resync
Whether the specified Clone should exist or not. State also provides actions to resync clone
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
reduce
    Choices:
  • no
  • yes
Indicates that the VV the online copy creates should be a virtual volume using both the dedup and compression technologies.
tpvv
    Choices:
  • no
  • yes
Enables (true) or disables (false) whether the online copy is a TPVV.

Examples --------
- name: Create Clone clone_volume_ansible
  hpe3par_online_clone:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    clone_name="clone_volume_ansible"
    base_volume_name="{{ volume_name }}"
    dest_cpg="{{ cpg }}"
    tpvv=False
    reduce=False
    snap_cpg="{{ cpg }}"

- name: sleep for 100 seconds and continue with play
  wait_for:
    timeout=100

- name: Delete clone "clone_volume_ansible"
  hpe3par_online_clone:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    clone_name="clone_volume_ansible"
    base_volume_name="{{ volume_name }}"

Author

source

: hpe3par_qos.py

hpe3par_qos - Manage HPE Alletra MP, 9000 and Primera and 3PAR QoS Rules

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Create QoS Rule - Delete QoS Rule - Modify QoS Rule

Parameters

Parameter
Choices/Defaults
Comments
bwmax_limit_kb
Default:
-1
Bandwidth rate maximum limit in kilobytes per second.
bwmax_limit_op
    Choices:
  • ZERO
  • NOLIMIT
When set to 1, the bandwidth maximum limit is 0. When set to 2, the bandwidth maximum limit is none (NoLimit).
bwmin_goal_kb
Default:
-1
Bandwidth rate minimum goal in kilobytes per second.
bwmin_goal_op
    Choices:
  • ZERO
  • NOLIMIT
When set to 1, the bandwidth minimum goal is 0. When set to 2, the bandwidth minimum goal is none (NoLimit).
default_latency
    Choices:
  • no ←
  • yes
If true, set latencyGoal to the default value. If false and the latencyGoal value is positive, then set the value. Default is false.
enable
    Choices:
  • no ←
  • yes
If true, enable the QoS rule for the target object. If false, disable the QoS rule for the target object.
iomax_limit
Default:
-1
I/O-per-second maximum limit.
iomax_limit_op
    Choices:
  • ZERO
  • NOLIMIT
When set to 1, the I/O maximum limit is 0. When set to 2, the I/O maximum limit is none (NoLimit).
iomin_goal
Default:
-1
I/O-per-second minimum goal.
iomin_goal_op
    Choices:
  • ZERO
  • NOLIMIT
When set to 1, the I/O minimum goal is 0. When set to 2, the I/O minimum goal is none (NoLimit).
latency_goal
Latency goal in milliseconds. Do not use with latencyGoaluSecs.
latency_goal_usecs
Latency goal in microseconds. Do not use with latencyGoal.
priority
    Choices:
  • LOW ←
  • NORMAL
  • HIGH
QoS priority.
qos_target_name
required
The name of the target object on which the new QoS rules will be created.
state
required
    Choices:
  • present
  • absent
  • modify
Whether the specified QoS Rule should exist or not. State also provides actions to modify QoS Rule
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
type
    Choices:
  • vvset
  • sys
Type of QoS target.

Examples --------
- name: Create QoS
  hpe3par_qos:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    qos_target_name="{{ qos_target_name }}"
    priority='NORMAL'
    bwmin_goal_kb="{{ bwmin_goal_kb }}"
    bwmax_limit_kb="{{ bwmax_limit_kb }}"
    iomin_goal_op="{{ iomin_goal_op }}"
    default_latency="{{ default_latency }}"
    enable="{{ enable }}"
    bwmin_goal_op="{{ bwmin_goal_op }}"
    bwmax_limit_op="{{ bwmax_limit_op }}"
    latency_goal_usecs="{{ latency_goal_usecs }}"
    type="{{ type }}"
    iomax_limit_op="{{ iomax_limit_op }}"

- name: Modify QoS
  hpe3par_qos:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=modify
    qos_target_name="{{ qos_target_name }}"
    priority="{{ priority }}"
    bwmin_goal_kb="{{ bwmin_goal_kb }}"
    bwmax_limit_kb="{{ bwmax_limit_kb }}"
    iomin_goal_op="{{ iomin_goal_op }}"
    default_latency="{{ default_latency }}"
    enable="{{ enable }}"
    bwmin_goal_op="{{ bwmin_goal_op }}"
    bwmax_limit_op="{{ bwmax_limit_op }}"
    latency_goal_usecs="{{ latency_goal_usecs }}"
    type="{{ type }}"
    iomax_limit_op="{{ iomax_limit_op }}"

- name: Delete QoS
  hpe3par_qos:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    qos_target_name="{{ qos_target_name }}"
    type="{{ type }}"

Author

source

: hpe3par_snapshot.py

hpe3par_snapshot - Manage HPE Alletra MP, 9000 and Primera and 3PAR Snapshots

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Create Snapshot - Delete Snapshot - Modify Snapshot - Create Schedule - Modify Schedule - Suspend Schedule - Resume Schedule - Delete Schedule

Parameters

Parameter
Choices/Defaults
Comments
allow_remote_copy_parent
    Choices:
  • no
  • yes
Allows the promote operation to proceed even if the RW parent volume is currently in a Remote Copy volume group, if that group has not been started. If the Remote Copy group has been started, this command fails.
base_volume_name
Specifies the source volume. Required with action present
expiration_hours
Default:
no
Specifies the relative time from the current time that the volume expires. Value is a positive integer and in the range of 1 to 43,800 hours, or 1825 days.
expiration_time
Specifies the relative time from the current time that the volume expires. Value is a positive integer and in the range of 1 to 43,800 hours, or 1825 days.
expiration_unit
    Choices:
  • Hours ←
  • Days
Unit of Expiration Time.
new_name
New name of the volume.
new_schedule_name
New Name of the schedule.
priority
    Choices:
  • HIGH
  • MEDIUM
  • LOW
Does not apply to online promote operation or to stop promote operation.
read_only
    Choices:
  • no
  • yes
Specifies that the copied volume is read-only. false(default) The volume is read/write.
retention_hours
Default:
no
Specifies the relative time from the current time that the volume expires. Value is a positive integer and in the range of 1 to 43,800 hours, or 1825 days.
retention_time
Specifies the relative time from the current time that the volume will expire. Value is a positive integer and in the range of 1 to 43,800 hours, or 1825 days.
retention_unit
    Choices:
  • Hours ←
  • Days
Unit of Retention Time.
rm_exp_time
    Choices:
  • no
  • yes
Enables (false) or disables (true) resetting the expiration time. If false, and expiration time value is a positive number, then set.
snapshot_name
required
Specifies a snapshot volume name.
schedule_name
required
Specifies name of the schedule.
task_freq
Frequency as special string for the schedule to be created.
state
required
    Choices:
  • present
  • absent
  • modify
  • restore_offline
  • restore_online
  • create_schedule
  • modify_schedule
  • suspend_schedule
  • resume_schedule
  • delete_schedule
Whether the specified Snapshot should exist or not. State also provides actions to modify and restore snapshots.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.

Examples --------
- name: Create Volume snasphot my_ansible_snapshot
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: present
    snapshot_name: snap-volume
    base_volume_name: test_volume
    read_only: False
    
- name: Restore offline Volume snasphot my_ansible_snapshot
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: restore_offline
    snapshot_name: snap-volume
    priority: MEDIUM
    
- name: Restore offline Volume snasphot my_ansible_snapshot
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: restore_online
    snapshot_name: snap-volume
    
- name: Modify/rename snasphot my_ansible_snapshot to my_ansible_snapshot_renamed
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: modify
    snapshot_name: snap-volume
    new_name: snapshot-volume
    
- name: Delete snasphot my_ansible_snapshot_renamed
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: absent
    snapshot_name: snap-volume
    
- name: Create schedule my_ansible_sc
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: create_schedule
    schedule_name: my_ansible_sc
    base_volume_name: test_volume
    
- name: Modify schedule my_ansible_sc
  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: create_schedule
    schedule_name: my_ansible_sc
    new_schedule_name: test_ansible_sc
- name: Delete schedule my_ansible_sc

  hpe3par_snapshot:
    storage_system_ip: 10.10.10.1
    storage_system_username: username
    storage_system_password: password
    state: delete_schedule
    schedule_name: my_ansible_sc   

Author

source

: hpe3par_vlun.py

hpe3par_vlun - Manage HPE Alletra MP, 9000 and Primera and 3PAR VLUN

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Export volume to host - Export volumeset to host - Export volume to hostset - Export volumeset to hostset - Unexport volume from host - Unexport volumeset from host - Unexport volume from hostset - Unexport volumeset from hostset

Parameters

Parameter
Choices/Defaults
Comments
autolun
    Choices:
  • no ←
  • yes
States whether the lun number should be autosigned.
card_port
Port number on the FC card.
host_name
Name of the host to which the volume or VV set is to be exported.
host_set_name
Name of the host set to which the volume or VV set is to be exported. Required with action export_volume_to_hostset, unexport_volume_from_hostset, export_volumeset_to_hostset, unexport_volumeset_from_hostset
lunid
LUN ID.
node_val
System node.
slot
PCI bus slot in the node.
state
required
    Choices:
  • export_volume_to_host
  • unexport_volume_from_host
  • export_volumeset_to_host
  • unexport_volumeset_from_host
  • export_volume_to_hostset
  • unexport_volume_from_hostset
  • export_volumeset_to_hostset
  • unexport_volumeset_from_hostset
Whether the specified export should exist or not.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
volume_name
required
Name of the volume to export.
volume_set_name
Name of the VV set to export. Required with action export_volumeset_to_host, unexport_volumeset_from_host, export_volumeset_to_hostset, unexport_volumeset_from_hostset

Examples --------
- name: Create VLUN
  hpe3par_vlun:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=export_volume_to_host
    volume_name="{{ volume_name }}"
    host_name="{{ host_name }}"
    lunid="{{ lunid }}"
    autolun="{{ autolun }}"

- name: Create VLUN
  hpe3par_vlun:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=export_volume_to_hostset
    volume_name="{{ vlun_volume_name }}"
    host_set_name="{{ hostset_name }}"
    lunid="{{ lunid }}"
    autolun="{{ autolun }}"

- name: Create VLUN
  hpe3par_vlun:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=export_volumeset_to_host
    volume_set_name="{{ volumeset_name }}"
    host_name="{{ vlun_host_name }}"
    lunid="{{ lunid }}"
    autolun="{{ autolun }}"

- name: Create VLUN
  hpe3par_vlun:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=export_volumeset_to_hostset
    volume_set_name="{{ volumeset_name }}"
    host_set_name="{{ hostset_name }}"
    lunid="{{ lunid }}"
    autolun="{{ autolun }}"

- name: Delete VLUN
  hpe3par_vlun:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=unexport_volume_from_host
    volume_name="{{ volume_name }}"
    host_name="{{ host_name }}"
    lunid="{{ lunid }}"

Author

source

: hpe3par_volume.py

hpe3par_volume - Manage HPE Alletra MP, 9000 and Primera and 3PAR Volume

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Create Volume - Delete Volume - Modify Volume - Grow Volume - Grow Volume to certain size - Change Snap CPG - Change User CPG - Convert Provisioning TypeError - Set Snap CPG

Parameters

Parameter Choices/Defaults Comments
compression
bool
    Choices:
  • no ←
  • yes
Specifes whether the compression is on or off.
cpg
Specifies the name of the CPG from which the volume user space will be allocated. Required with action present, change_user_cpg
expiration_hours Default:
0
Remaining time, in hours, before the volume expires.
keep_vv
Name of the new volume where the original logical disks are saved.
new_name
Specifies the new name for the volume.
retention_hours Default:
0
Sets the number of hours to retain the volume.
rm_exp_time
bool
    Choices:
  • no ←
  • yes
Enables false or disables true resetting the expiration time. If false, and expiration time value is a positive. number, then set.
rm_ss_spc_alloc_limit
bool
    Choices:
  • no ←
  • yes
Enables false or disables true removing the snapshot space allocation limit. If false, and limit value is 0, setting ignored.If false, and limit value is a positive number, then set.
rm_ss_spc_alloc_warning
bool
    Choices:
  • no ←
  • yes
Enables false or disables true removing the snapshot space allocation warning. If false, and warning value is a positive number, then set.
rm_usr_spc_alloc_limit
bool
    Choices:
  • no ←
  • yes
Enables false or disables true the allocation limit. If false, and limit value is a positive number, then set.
rm_usr_spc_alloc_warning
bool
    Choices:
  • no ←
  • yes
Enables false or disables true removing the user space allocation warning. If false, and warning value is a positive number, then set.
size
Specifies the size of the volume. Required with action present, grow, grow_to_size
size_unit
    Choices:
  • MiB ←
  • GiB
  • TiB
Specifies the unit of the volume size. Required with action present, grow, grow_to_size
snap_cpg
Specifies the name of the CPG from which the snapshot space will be allocated. Required with action change_snap_cpg
ss_spc_alloc_limit_pct Default:
0
Prevents the snapshot space of the virtual volume from growing beyond the indicated percentage of the virtual volume size.
ss_spc_alloc_warning_pct Default:
0
Generates a warning alert when the reserved snapshot space of the virtual volume exceeds the indicated percentage of the virtual volume size.
state
required
    Choices:
  • present
  • absent
  • modify
  • grow
  • grow_to_size
  • change_snap_cpg
  • change_user_cpg
  • convert_type
  • set_snap_cpg
Whether the specified Volume should exist or not. State also provides actions to modify volume properties.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
type
    Choices:
  • thin ←
  • thin_dedupe
  • full
Specifies the type of the volume. Required with action convert_type. Full provisioning is not supported on Primera array
usr_spc_alloc_limit_pct Default:
0
Prevents the user space of the TPVV from growing beyond the indicated percentage of the virtual volume size. After reaching this limit, any new writes to the virtual volume will fail.
usr_spc_alloc_warning_pct Default:
0
Generates a warning alert when the user data space of the TPVV exceeds the specified percentage of the virtual volume size.
volume_name
required
Name of the Virtual Volume.
wait_for_task_to_end
bool
    Choices:
  • no ←
  • yes
Setting to true makes the resource to wait until a task asynchronous operation, for ex convert type ends.

Examples --------
- name: Create Volume "{{ volume_name }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    volume_name="{{ volume_name }}"
    cpg="{{ cpg }}"
    size="{{ size }}"
    snap_cpg="{{ snap_cpg }}"

- name: Change provisioning type of Volume "{{ volume_name }}" to "{{ type }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=convert_type
    volume_name="{{ volume_name }}"
    type="{{ type }}"
    cpg="{{ cpg }}"
    wait_for_task_to_end="{{ wait_for_task_to_end }}"

- name: Set Snap CPG of Volume "{{ volume_name }}" to "{{ snap_cpg }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=set_snap_cpg
    volume_name="{{ volume_name }}"
    snap_cpg="{{ snap_cpg }}"

- name: Change snap CPG of Volume "{{ volume_name }}" to "{{ snap_cpg }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=change_snap_cpg
    volume_name="{{ volume_name }}"
    snap_cpg="{{ snap_cpg }}"
    wait_for_task_to_end="{{ wait_for_task_to_end }}"

- name: Grow Volume "{{ volume_name }} by "{{ size }}" {{ size_unit }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=grow
    volume_name="{{ volume_name }}"
    size="{{ size }}"
    size_unit="{{ size_unit }}"

- name: Grow Volume "{{ volume_name }} to "{{ size }}" {{ size_unit }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=grow_to_size
    volume_name="{{ volume_name }}"
    size="{{ size }}"
    size_unit="{{ size_unit }}"

- name: Rename Volume "{{ volume_name }} to {{ new_name }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=modify
    volume_name="{{ volume_name }}"
    new_name="{{ new_name }}"

- name: Delete Volume "{{ volume_name }}"
  hpe3par_volume:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    volume_name="{{ new_name }}"

Author

source

: hpe3par_volumeset.py

hpe3par_volumeset - Manage HPE Alletra MP, 9000 and Primera and 3PAR Volume Set

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR Create Volume Set - Add Volumes to Volume Set - Remove Volumes from Volume Set

Parameters

Parameter
Choices/Defaults
Comments
domain
The domain in which the VV set or host set will be created.
setmembers
The virtual volume to be added to the set. Required with action add_volumes, remove_volumes
state
required
    Choices:
  • present
  • absent
  • add_volumes
  • remove_volumes
Whether the specified Volume Set should exist or not. State also provides actions to add or remove volumes from volume set
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
volumeset_name
required
Name of the volume set to be created.

Examples --------
- name: Create volume set "{{ volumeset_name }}"
  hpe3par_volumeset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=present
    volumeset_name="{{ volumeset_name }}"
    setmembers="{{ add_vol_setmembers }}"

- name: Add volumes to Volumeset "{{ volumeset_name }}"
  hpe3par_volumeset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=add_volumes
    volumeset_name="{{ volumeset_name }}"
    setmembers="{{ add_vol_setmembers2 }}"

- name: Remove volumes from Volumeset "{{ volumeset_name }}"
  hpe3par_volumeset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=remove_volumes
    volumeset_name="{{ volumeset_name }}"
    setmembers="{{ remove_vol_setmembers }}"

- name: Delete Volumeset "{{ volumeset_name }}"
  hpe3par_volumeset:
    storage_system_ip="{{ storage_system_ip }}"
    storage_system_username="{{ storage_system_username }}"
    storage_system_password="{{ storage_system_password }}"
    state=absent
    volumeset_name="{{ volumeset_name }}"

Author

source

: hpe3par_remote_copy.py

hpe3par_remote_copy - Manage HPE Alletra MP, 9000 and Primera and 3PAR Remote Copy

Synopsis

  • On HPE Alletra MP, 9000 and Primera and 3PAR - Create Remote Copy Group - Modify Remote Copy Group - Add Volumes to Remote Copy Group - Remove Volumes from Remote Copy Group -Synchronize Remote Copy Group - Delete Remote Copy Group - Admit Remote Copy Link - Dismiss Remote Copy Link - Start Remote Copy Group - Stop Remote Copy Group - Admit Remote Copy Target - Dismiss Remote Copy Target - Start Remote Copy Service - Remote Copy Status

Parameters

Parameter Choices/Defaults Comments
admit_volume_targets
Specify at least one pair of target_name and sec_volume_name. Attributes are target_name, sec_volume_name. Used with state[s] - add_volume
different_secondary_wwn
bool
    Choices:
  • no ←
  • yes
Setting differentSecondaryWWN to true, ensures that the system uses a different WWN on the secondary volume. Defaults to false. Use with volumeAutoCreation only. Used with state[s] - add_volume
domain
Specifies the domain in which to create the Remote Copy group. Used with state[s] - present
full_sync
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) forcing a full synchronization of the Remote Copy group, even if the volumes are already synchronized. Applies only to volume groups in synchronous mode, and can be used to resynchronize volumes that have become inconsistent. Used with state[s] - synchronize
keep_snap
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) retention of the local volume resynchronization snapshot. Used with state[s] - absent, remove_volume
local_remote_volume_pair_list
Is a list of dictionaries, where each dictionary contains source and target volumes pairs i.e. [{'sourceVolumeName':'secondary_vv1', 'targetVolumeName':'secondary_vv2'}, ..]. Used with state[s] - admit_target
local_snap_cpg
Specifies the local snap CPG used for auto-created volumes. Used with state[s] - present, modify
local_user_cpg
Specifies the local user CPG used for auto-created volumes. Used with state[s] - present, modify
modify_targets
Specifies the attributes of the target of the Remote Copy group. Attributes are target_name, remote_user_cpg, remote_snap_cpg, sync_period, rm_sync_period, target_mode, snap_frequency, rm_snap_frequency, policies. Used with state[s] - modify
no_resync_snapshot
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) saving the resynchronization snapshot. Applicable only to Remote Copy groups in asychronous periodic mode. Used with state[s] - synchronize
no_snapshot
bool
    Choices:
  • no ←
  • yes
If true, this option turns off creation of snapshots in synchronous and periodic modes, and deletes the current synchronization snapshots. Used with state[s] - stop
remote_copy_group_name
Specifies the name of the Remote Copy group to create. Used with state[s] - present, absent, modify, add_volume, remove_volume, start, stop, synchronize, admit_target, dismiss_target, remote_copy_status
remote_copy_targets
Specifies the attributes of the target of the Remote Copy group. Attributes are target_name, target_mode, user_cpg, snap_cpg. Used with state[s] - present
remove_secondary_volume
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) deletion of the remote volume on the secondary array from the system. Defaults to false. Do not use with keepSnap. Used with state[s] - remove_volume
skip_initial_sync
bool
    Choices:
  • no ←
  • yes
If skipInitialSync is set to true, the volume should skip the initial sync. This is for the admission of volumes that have been presynced with the target volume. This cannot be set to true if the snapshot name is specified. Used with state[s] - add_volume, start
snapshot_name
The optional read-only snapshotName is a starting snapshot when the group is started without performing a full resynchronization. Instead, for synchronized groups, the volume synchronizes deltas between this snapshotName and the base volume. For periodic groups, the volume synchronizes deltas between this snapshotName and a snapshot of the base. Used with state[s] - add_volume
source_port
node:slot:port Specifies the node, slot, and port of the Ethernet port on the local system Ethernet port on the local system. Used with state[s] - admit_link, dismiss_link
starting_snapshots
When used, you must specify all the volumes inthe group. While specifying the pair, the starting snapshot is optional. When not used, the system performs a full resynchronization of the volume. Used with state[s] - start
state
required
    Choices:
  • present
  • absent
  • modify
  • add_volume
  • remove_volume
  • start
  • stop
  • synchronize
  • admit_link
  • dismiss_link
  • admit_target
  • dismiss_target
  • start_rcopy
  • remote_copy_status
Whether the specified Remote Copy Group should exist or not. State also provides actions to modify Remote copy Group ,add/remove volumes, start/stop/synchronize remote copy group, Add/remove remote copy link, start remote copy services, admit/dismiss target.
storage_system_ip
required
The storage system IP address.
storage_system_password
required
The storage system password.
storage_system_username
required
The storage system user name.
target_mode
    Choices:
  • sync
  • periodic
  • async
Specifies the mode of the target as either synchronous (sync), asynchronous periodic (periodic), or asynchronous streaming (async). Used with state[s] - admit_target
target_name
Specifies the target name associated with the Remote Copy group to be created. Used with state[s] - start, stop, synchronize, admit_link, dismiss_link, admit_target, dismiss_target
target_port_wwn_or_ip
IP/WWN address of the peer port on the target system. Used with state[s] - admit_link, dismiss_link
unset_snap_cpg
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) setting the localSnapCPG and remoteSnapCPG of the Remote Copy group. Used with state[s] - modify
unset_user_cpg
bool
    Choices:
  • no ←
  • yes
Enables (true) or disables (false) setting the localUserCPG and remoteUserCPG of the Remote Copy group. Used with state[s] - modify
volume_auto_creation
bool
    Choices:
  • no ←
  • yes
If volumeAutoCreation is set to true, the secondary volumes should be created automatically on the target using the CPG. associated with the Remote Copy group on that target. This cannot be set to true if the snapshot name is specified. Used with state[s] - add_volume
volume_name
Specifies the name of the existing virtual volume to be admitted to an existing Remote Copy group. Used with state[s] - add_volume, remove_volume

Examples --------
- hosts: localhost
  tasks:
  - name: Load Storage System Vars
    include_vars: 'properties/storage_system_properties.yml'

  - name: Create volume on source
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_1
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1

  - name: Create volume on source
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_2
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1     

  - name: Create volume on target
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_1
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1     

  - name: Create volume on target
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_2
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1           

  - name: Create volume on target2
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_1
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1

  - name: Create volume on target2
    hpe3par_volume:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      volume_name: demo_volume_2
      size: 1024
      size_unit: MiB
      cpg: FC_r1
      snap_cpg: FC_r1

  - name: Create Remote Copy Group test_rcg
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: present
      remote_copy_group_name: test_rcg
      remote_copy_targets:
      - target_name: target_array_name
        target_mode: sync

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: add_volume
      remote_copy_group_name: test_rcg
      volume_name: demo_volume_1
      admit_volume_targets:
      - target_name: target_array_name
        sec_volume_name: demo_volume_1

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: add_volume
      remote_copy_group_name: test_rcg
      volume_name: demo_volume_2
      admit_volume_targets:
      - target_name: target_array_name
        sec_volume_name: demo_volume_2

  - name: admit Remote Copy target
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: admit_target
      remote_copy_group_name: test_rcg
      target_name: target_array_name
      local_remote_volume_pair_list:
      - sourceVolumeName: source_volume_1
        targetVolumeName: target_volume_1
      - sourceVolumeName: source_volume_2
        targetVolumeName: target_volume_2
      target_mode: periodic

  - name: remote copy group status
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: remote_copy_status
      remote_copy_group_name: test_rcg
    register: result

  - debug:
      msg: "{{ result.output.remote_copy_sync_status}}"


  - name: dismiss Remote Copy target
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: dismiss_target
      remote_copy_group_name: test_rcg
      target_name: target_array_name

  - name: Modify Remote Copy Group test_rcg
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: modify
      remote_copy_group_name: test_rcg
      local_user_cpg: "FC_r1"
      local_snap_cpg: "FC_r6"
      unset_user_cpg: false
      unset_snap_cpg: false
      modify_targets:
      - target_name: target_array_name
        remote_user_cpg: "FC_r1"
        remote_snap_cpg: "FC_r6"

  - name: Start remote copy
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: test_rcg
      state: start

  - name: Stop remote copy
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: test_rcg
      state: stop

  - name: Remove volume from remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: remove_volume
      remote_copy_group_name: test_rcg
      volume_name: demo_volume_1

  - name: Remove volume from remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: remove_volume
      remote_copy_group_name: test_rcg
      volume_name: demo_volume_2

  - name: Remove Remote Copy Group test_rcg
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: absent 
      remote_copy_group_name: test_rcg

  - name: dismiss remote copy link
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: dismiss_link
      target_name: target_array_name
      source_port: 0:3:1
      target_port_wwn_or_ip: 10.10.10.10

  - name: dismiss remote copy link
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: dismiss_link
      target_name: target_array_name
      source_port: "1:3:1"
      target_port_wwn_or_ip: 10.10.10.10

  - name: Admit remote copy link
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: admit_link
      target_name: target_array_name
      source_port: 0:3:1
      target_port_wwn_or_ip: 10.10.10.10

  - name: Admit remote copy link
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: admit_link
      target_name: target_array_name
      source_port: "1:3:1"
      target_port_wwn_or_ip: 10.10.10.10

  - name: start remote copy service
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: start_rcopy

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-004"
      state: add_volume
      volume_name: "Ansible_volume_01"
      admit_volume_targets:
      - target_name: "target_array_name"
        sec_volume_name: "Target_volume"
      snapshot_name:
      volume_auto_creation: true
      skip_initial_sync: true
      different_secondary_wwn: true

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: add_volume
      volume_name: "Ansible_volume_rcg_01"
      admit_volume_targets:
      - target_name: "target_array_name"
        sec_volume_name: "Target_volume"
      snapshot_name: "Ansible_volume_SS_snap_01"
      volume_auto_creation: "false"
      skip_initial_sync: "false"
      different_secondary_wwn:

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: add_volume
      volume_name: "Ansible_volume_rcg_01"
      admit_volume_targets:
      - target_name: "target_array_name"
        sec_volume_name: "Target_volume"
      snapshot_name:
      volume_auto_creation: "true"
      skip_initial_sync: "false"
      different_secondary_wwn:

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: add_volume
      volume_name: "Ansible_volume_rcg_01"
      admit_volume_targets:
      - target_name: "target_array_name"
        sec_volume_name: "Target_volume"
      snapshot_name: "Ansible_volume_SS_snap_01"
      volume_auto_creation: "false"
      skip_initial_sync: "false"
      different_secondary_wwn:

  - name: Add volume to remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: add_volume
      volume_name: "Ansible_volume_rcg_01"
      admit_volume_targets:
      - target_name: "target_array_name"
        sec_volume_name: "Target_volume"
      snapshot_name:
      volume_auto_creation: "true"
      skip_initial_sync: true
      different_secondary_wwn:

  - name: Synchronize remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: synchronize
      no_resync_snapshot: "false"
      target_name: "target_array_name"
      full_sync: "false"

  - name: Synchronize remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-003"
      state: synchronize
      no_resync_snapshot: "true"
      target_name: "target_array_name"
      full_sync: "true"

  - name: Remove remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: absent
      remote_copy_group_name: "ansible_CreateRCG-004"
      keepSnap: "false"
      remove_secondary_volume:

  - name: Remove volume from remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      state: remove_volume
      volume_name: "Ansible_volume_rcg_01"
      keep_snap: "true"
      remove_secondary_volume: "false"

  - name: Stop remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-003"
      state: stop
      no_snapshot: "true"
      target_name: "target_array_name"

  - name: Remove volume from remote copy group
    hpe3par_remote_copy:
      storage_system_ip: 10.10.10.1
      storage_system_password: password
      storage_system_username: username
      remote_copy_group_name: "ansible_CreateRCG-002"
      state: remove_volume
      volume_name: "Ansible_volume_rcg_01"
      keep_snap: "false"
      remove_secondary_volume: "true"

Author