cisco.ucs.ucs_storage_profile 模块 – 在 Cisco UCS Manager 上配置存储配置文件

注意

此模块是 cisco.ucs 集合(版本 1.14.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了这个集合。 它不包含在 ansible-core 中。 要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install cisco.ucs。 您需要其他要求才能使用此模块,请参阅要求了解详细信息。

要在 playbook 中使用它,请指定: cisco.ucs.ucs_storage_profile

概要

  • 在 Cisco UCS Manager 上配置存储配置文件。

要求

在执行此模块的主机上需要以下要求。

  • ucsmsdk

参数

参数

注释

description

别名: descr

字符串

用户定义的存储配置文件描述。

输入最多 256 个字符。

您可以使用任何字符或空格,但以下字符除外

` (重音符), \ (反斜杠), ^ (脱字符号), ” (双引号), = (等号), > (大于号), < (小于号) 或 ‘ (单引号)。

hostname

字符串 / 必填

Cisco UCS Manager 的 IP 地址或主机名。

模块可以与 UCS 平台仿真器 https://cs.co/ucspe 一起使用

local_luns

列表 / elements=dictionary

存储配置文件使用的本地 LUN 列表。

auto_deploy

字符串

本地 LUN 是否应自动部署。

选择

  • "auto-deploy" ← (默认)

  • "no-auto-deploy"

disk_policy_name

字符串

要应用于此本地 LUN 的磁盘组配置策略。

expand_to_avail

字符串

指定此 LUN 可以扩展以使用整个可用磁盘组。

对于每个服务配置文件,只有一个 LUN 可以使用此选项。

已部署的 LUN 不支持“扩展到可用”选项。

选择

  • "no" ← (默认)

  • "yes"

fractional_size

字符串

此 LUN 的分数大小(以 MB 为单位)。

默认值: "0"

name

字符串 / 必填

本地 LUN 的名称。

size

字符串

此 LUN 的大小(以 GB 为单位)。

大小范围为 1 到 10240 GB。

默认值: "1"

state

字符串

如果为 present,将验证配置文件中是否存在本地 LUN。 如果为 absent,将验证配置文件中是否不存在本地 LUN。

选择

  • "absent"

  • "present" ← (默认)

name

字符串 / 必填

存储配置文件的名称。

此名称可以是 1 到 16 个字母数字字符。

您不能使用空格或除 -(连字符)、“_”(下划线)、:(冒号)和 .(句点)以外的任何特殊字符。

配置文件创建后,您无法更改此名称。

org_dn

字符串

分配资源的组织的专有名称 (dn)。

默认值: "org-root"

password

字符串 / 必填

用于 Cisco UCS Manager 身份验证的密码。

port

整数

连接期间要使用的端口号(默认情况下,https 使用 443,http 连接使用 80)。

proxy

字符串

如果 use_proxy 为 no,则指定用于连接的代理。例如, 'http://proxy.xy.z:8080'

state

字符串

如果为 present,将验证存储配置文件是否存在,如果需要将创建该配置文件。

如果为 absent,将验证存储配置文件是否不存在,如果需要将删除该配置文件。

选择

  • "absent"

  • "present" ← (默认)

use_proxy

布尔值

如果为 no,将不会使用系统环境变量定义的代理。

选择

  • false

  • true ← (默认)

use_ssl

布尔值

如果为 no,将使用 HTTP 连接而不是默认的 HTTPS 连接。

选择

  • false

  • true ← (默认)

username

字符串

用于 Cisco UCS Manager 身份验证的用户名。

默认值: "admin"

示例

- name: Configure Storage Profile
  cisco.ucs.ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    local_luns:
    - name: Boot-LUN
      size: '60'
      disk_policy_name: DEE-DG
    - name: Data-LUN
      size: '200'
      disk_policy_name: DEE-DG

- name: Remove Storage Profile
  cisco.ucs.ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    state: absent

- name: Remove Local LUN from Storage Profile
  cisco.ucs.ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    local_luns:
    - name: Data-LUN
      state: absent

作者

  • Sindhu Sudhir (@sisudhir)

  • David Soper (@dsoper2)

  • John McDonough (@movinalot)

  • CiscoUcs (@CiscoUcs)