W3cubDocs

/Ansible 2.10

cisco.ucs.ucs_disk_group_policy – Configures disk group policies on Cisco UCS Manager

Note

This plugin is part of the cisco.ucs collection.

To install it use: ansible-galaxy collection install cisco.ucs.

To use it in a playbook, specify: cisco.ucs.ucs_disk_group_policy.

New in version 2.8: of cisco.ucs

Synopsis

  • Configures disk group policies on Cisco UCS Manager.

Requirements

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

  • ucsmsdk

Parameters

Parameter Choices/Defaults Comments
configuration_mode
string
    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
string
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
string
    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.
Modules can be used with the UCS Platform Emulator https://cs.co/ucspe
manual_disks
string
List of manually configured disks.
Options are only used when you choose manual configuration_mode.
name
string / required
The name of the local LUN.
role
string
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
string
The slot number of the specific disk.
span_id
string
Default:
"unspecified"
The Span ID of the specific disk.
state
string
    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
string
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
string / 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
string
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
string
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
string
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
string
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
string
    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
string
    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
string
    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
string
Configuration of virtual drive options.
access_policy
string
    Choices:
  • blocked
  • hidden
  • platform-default
  • read-only
  • read-write
  • transport-ready
Configure access policy to virtual drive.
drive_cache
string
    Choices:
  • disable
  • enable
  • no-change
  • platform-default
Configure drive caching.
io_policy
string
    Choices:
  • cached
  • direct
  • platform-default
Direct or Cached IO path.
read_policy
string
    Choices:
  • normal
  • platform-default
  • read-ahead
Read access policy to virtual drive.
strip_size
string
    Choices:
  • present
  • absent
Default:
"platform-default"
Virtual drive strip size.
write_cache_policy
string
    Choices:
  • always-write-back
  • platform-default
  • write-back-good-bbu
  • write-through
Write back cache policy.

Examples

- name: Configure Disk Group Policy
  cisco.ucs.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
  cisco.ucs.ucs_disk_group_policy:
    name: DEE-DG
    hostname: 172.16.143.150
    username: admin
    password: password
    state: absent

- name: Remove Disk from Policy
  cisco.ucs.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

Authors

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

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