W3cubDocs

/Ansible 2.9

ucs_disk_group_policy – Configures disk group policies on Cisco UCS Manager

New in version 2.8.

Synopsis

  • Configures disk group policies on Cisco UCS Manager.
  • Examples can be used with the UCS Platform Emulator.

Requirements

The below requirements are needed on the host that executes this module.

  • ucsmsdk

Parameters

Parameter Choices/Defaults Comments
configuration_mode
-
    Choices:
  • automatic
  • manual
Disk group configuration mode. Choose one of the following:
automatic - Automatically configures the disks in the disk group.
manual - Enables you to manually configure the disks in the disk group.
description
-
The user-defined description of the storage profile. Enter up to 256 characters. "You can use any characters or spaces except the following:" "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."

aliases: descr
drive_type
-
    Choices:
  • unspecified
  • HDD
  • SSD
Specify the drive type to use in the drive group.
This can be one of the following:
unspecified — Selects the first available drive type, and applies that to all drives in the group.
HDD — Hard disk drive
SSD — Solid state drive
Option only applies when configuration mode is automatic.
hostname
string / required
IP address or hostname of Cisco UCS Manager.
manual_disks
-
List of manually configured disks.
Options are only used when you choose manual configuration_mode.
name
- / required
The name of the local LUN.
role
-
The role of the disk. This can be one of the following:
normal - Normal
ded-hot-spare - Dedicated Hot Spare
glob-hot-spare - Glob Hot Spare
slot_num
-
The slot number of the specific disk.
span_id
-
Default:
"unspecified"
The Span ID of the specific disk.
state
-
    Choices:
  • present
  • absent
If present, will verify disk slot is configured within policy. If absent, will verify disk slot is absent from policy.
min_drive_size
-
Default:
"unspecified"
Specify the minimum drive size or unspecified to allow all drive sizes.
This can be from 0 to 10240 GB.
Option only applies when configuration mode is automatic.
name
- / required
The name of the disk group policy. This name can be between 1 and 16 alphanumeric characters.
You cannot use spaces or any special characters other than - (hyphen), "_" (underscore), : (colon), and . (period).
You cannot change this name after the policy is created.
num_ded_hot_spares
-
Default:
"unspecified"
Specify the number of hot spares for the disk group.
This can be from 0 to 24.
Option only applies when configuration mode is automatic.
num_drives
-
Default:
1
Specify the number of drives for the disk group.
This can be from 0 to 24.
Option only applies when configuration mode is automatic.
num_glob_hot_spares
-
Default:
"unspecified"
Specify the number of global hot spares for the disk group.
This can be from 0 to 24.
Option only applies when configuration mode is automatic.
org_dn
-
Default:
"org-root"
The distinguished name (dn) of the organization where the resource is assigned.
password
string / required
Password for Cisco UCS Manager authentication.
port
integer
Port number to be used during connection (by default uses 443 for https and 80 for http connection).
proxy
string
If use_proxy is no, specfies proxy to be used for connection. e.g. 'http://proxy.xy.z:8080'
raid_level
-
    Choices:
  • stripe
  • mirror
  • mirror-stripe
  • stripe-parity
  • stripe-dual-parity
  • stripe-parity-stripe
  • stripe-dual-parity-stripe
The RAID level for the disk group policy. This can be one of the following:
stripe - UCS Manager shows RAID 0 Striped
mirror - RAID 1 Mirrored
mirror-stripe - RAID 10 Mirrored and Striped
stripe-parity - RAID 5 Striped Parity
stripe-dual-parity - RAID 6 Striped Dual Parity
stripe-parity-stripe - RAID 50 Striped Parity and Striped
stripe-dual-parity-stripe - RAID 60 Striped Dual Parity and Striped
state
-
    Choices:
  • present
  • absent
Desired state of the disk group policy.
If present, will verify that the disk group policy is present and will create if needed.
If absent, will verify that the disk group policy is absent and will delete if needed.
use_proxy
boolean
    Choices:
  • no
  • yes
If no, will not use the proxy as defined by system environment variable.
use_remaining_disks
-
    Choices:
  • yes
  • no
Specifies whether you can use all the remaining disks in the disk group or not.
Option only applies when configuration mode is automatic.
use_ssl
boolean
    Choices:
  • no
  • yes
If no, an HTTP connection will be used instead of the default HTTPS connection.
username
string
Default:
"admin"
Username for Cisco UCS Manager authentication.
virtual_drive
-
Configuration of virtual drive options.
access_policy
-
    Choices:
  • blocked
  • hidden
  • platform-default
  • read-only
  • read-write
  • transport-ready
Configure access policy to virtual drive.
drive_cache
-
    Choices:
  • disable
  • enable
  • no-change
  • platform-default
Configure drive caching.
io_policy
-
    Choices:
  • cached
  • direct
  • platform-default
Direct or Cached IO path.
read_policy
-
    Choices:
  • normal
  • platform-default
  • read-ahead
Read access policy to virtual drive.
strip_size
-
    Choices:
  • present
  • absent
Default:
"platform-default"
Virtual drive strip size.
write_cache_policy
-
    Choices:
  • always-write-back
  • platform-default
  • write-back-good-bbu
  • write-through
Write back cache policy.

Examples

- name: Configure Disk Group Policy
  ucs_disk_group_policy:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-DG
    raid_level: mirror
    configuration_mode: manual
    manual_disks:
    - slot_num: '1'
      role: normal
    - slot_num: '2'
      role: normal

- name: Remove Disk Group Policy
  ucs_disk_group_policy:
    name: DEE-DG
    hostname: 172.16.143.150
    username: admin
    password: password
    state: absent

- name: Remove Disk from Policy
  ucs_disk_group_policy:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-DG
    description: Testing Ansible
    raid_level: stripe
    configuration_mode: manual
    manual_disks:
    - slot_num: '1'
      role: normal
    - slot_num: '2'
      role: normal
      state: absent
    virtual_drive:
      access_policy: platform-default
      io_policy: direct
      strip_size: 64KB

Status

Authors

  • Sindhu Sudhir (@sisudhir)
  • David Soper (@dsoper2)
  • CiscoUcs (@CiscoUcs)
  • Brett Johnson (@sdbrett)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/ucs_disk_group_policy_module.html