netapp_eseries.santricity.netapp_e_host 模块 – NetApp E 系列管理 eseries 主机

注意

此模块是 netapp_eseries.santricity 集合 (版本 1.4.1) 的一部分。

如果您使用的是 ansible 软件包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install netapp_eseries.santricity

要在 playbook 中使用它,请指定: netapp_eseries.santricity.netapp_e_host

netapp_eseries.santricity 2.2.0 中的新增功能

概要

  • 在 NetApp E 系列存储阵列上创建、更新和删除主机

参数

参数

注释

api_password

字符串 / 必需

用于向 SANtricity Web Services Proxy 或嵌入式 Web Services API 进行身份验证的密码。

api_url

字符串 / 必需

SANtricity Web Services Proxy 或嵌入式 Web Services API 的 URL。示例 https://prod-1.wahoo.acme.com/devmgr/v2

api_username

字符串 / 必需

用于向 SANtricity Web Services Proxy 或嵌入式 Web Services API 进行身份验证的用户名。

force_port

布尔值

netapp_eseries.santricity 2.7.0 中新增

允许重新分配已分配给当前主机的端口

选项

  • false ← (默认)

  • true

group

别名:cluster

字符串

您希望主机成为其成员的主机组的唯一标识符;这用于集群。

host_type

别名:host_type_index

字符串

这是要映射的主机类型

state=present 时必需

可以指定以下名称之一:Linux DM-MP、VMware、Windows、Windows 集群或主机类型索引,可在 netapp_eseries.santricity.netapp_e_facts 中找到

log_path

字符串

netapp_eseries.santricity 2.7.0 中新增

用于调试日志记录的本地文件路径

name

别名:label

字符串 / 必需

如果主机尚不存在,则在创建时分配的标签/名称。

如果主机已存在,这将用于唯一标识主机以进行任何必要的更改

ports

列表 / 元素=字典

您希望与主机关联的主机端口列表。

主机端口由其 WWN 或 IQN 唯一标识。它们对特定主机的分配由标签唯一标识,这些标签必须是唯一的。

label

字符串 / 必需

分配给此端口分配的唯一标签。

port

字符串 / 必需

要分配到此端口定义的主机端口的 WWN 或 IQN。

type

字符串 / 必需

要定义的端口的接口类型。

可接受的选择取决于目标硬件/软件平台的功能。

选项

  • "iscsi"

  • "sas"

  • "fc"

  • "ib"

  • "nvmeof"

  • "ethernet"

ssid

字符串

要管理的阵列的 ID。此值对于每个阵列必须唯一。

默认值: "1"

state

字符串

netapp_eseries.santricity 2.7.0 中新增

设置为 absent 以删除现有主机

设置为 present 以修改或创建新的主机定义

选项

  • "absent"

  • "present" ← (默认)

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • E 系列 Ansible 模块需要 Web Services Proxy (WSP) 实例才能管理存储系统,或者支持嵌入式 Web Services API 的 E 系列存储系统。

  • 嵌入式 Web Services 目前适用于 E2800、E5700、EF570 和更新的硬件型号。

  • netapp_eseries.santricity.netapp_e_storage_system 可用于配置由 WSP 实例管理的系统。

示例

- name: Define or update an existing host named 'Host1'
  netapp_e_host:
    ssid: "1"
    api_url: "10.113.1.101:8443"
    api_username: admin
    api_password: myPassword
    name: "Host1"
    state: present
    host_type_index: Linux DM-MP
    ports:
      - type: 'iscsi'
        label: 'PORT_1'
        port: 'iqn.1996-04.de.suse:01:56f86f9bd1fe'
      - type: 'fc'
        label: 'FC_1'
        port: '10:00:FF:7C:FF:FF:FF:01'
      - type: 'fc'
        label: 'FC_2'
        port: '10:00:FF:7C:FF:FF:FF:00'

- name: Ensure a host named 'Host2' doesn't exist
  netapp_e_host:
    ssid: "1"
    api_url: "10.113.1.101:8443"
    api_username: admin
    api_password: myPassword
    name: "Host2"
    state: absent

返回值

常见的返回值已在此处记录,以下是此模块独有的字段

Key

描述

api_url

字符串

新增于 netapp_eseries.santricity 2.6.0

处理此请求的API的URL

返回值: 成功时

示例: "https://webservices.example.com:8443"

id

字符串

新增于 netapp_eseries.santricity 2.6.0

主机在E-Series存储系统上的唯一标识符

返回值:当 state=present 时成功

示例: "00000000600A098000AAC0C3003004700AD86A52"

msg

字符串

对所执行操作的用户可读描述。

返回值: 成功时

示例: "主机已创建。"

ssid

字符串

新增于 netapp_eseries.santricity 2.6.0

使用当前API的E-Series存储系统的唯一标识符

返回值: 成功时

示例: "1"

作者

  • Kevin Hulquest (@hulquest)

  • Nathan Swartz (@ndswartz)