netapp_eseries.santricity.netapp_e_iscsi_interface 模块 – NetApp E 系列 iSCSI 接口配置管理

注意

此模块是 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_iscsi_interface

netapp_eseries.santricity 2.7.0 中的新增功能

概要

  • 配置 E 系列 iSCSI 接口的设置

参数

参数

注释

address

字符串

要分配给接口的 IPv4 地址。

应以 xx.xx.xx.xx 的格式指定。

config_method=dhcp 互斥

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 进行身份验证的用户名。

config_method

字符串

要为此接口使用的配置方法类型。

dhcp 与 addresssubnet_maskgateway 互斥。

选项

  • "dhcp" ← (默认)

  • "static"

controller

字符串 / 必需

拥有要配置的端口的控制器。

控制器名称按字母顺序排列,第一个控制器为 A,第二个为 B,依此类推。

当前硬件型号有 1 个或 2 个可用的控制器,但这并非硬性限制,将来可能会更改。

选项

  • "A"

  • "B"

gateway

字符串

要用于接口的 IPv4 网关地址。

应以 xx.xx.xx.xx 的格式指定。

config_method=dhcp 互斥

log_path

字符串

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

mtu

别名:max_frame_size

整数

最大传输单元 (MTU),以字节为单位。

这允许您配置更大的 MTU 值,以启用巨型帧(任何值 > 1500)。

通常,您需要主机、交换机和其他组件不仅支持巨型帧,还需要正确配置它。因此,除非您知道自己在做什么,否则最好将其保留为默认值。

默认值: 1500

name

别名:channel

整数 / 必需

要修改其配置的端口的通道。

选项列表不一定是全面的。它取决于系统中可用端口的数量。

数值表示通道号(通常在 HIC 上从左到右),从 1 开始。

ssid

字符串

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

默认值: "1"

state

字符串

启用时,将使用提供的配置。

禁用时,将清除 IPv4 配置并禁用 IPv4 连接。

选项

  • "enabled" ← (默认)

  • "disabled"

subnet_mask

字符串

要用于接口的子网掩码。

应以 xx.xx.xx.xx 的格式指定。

config_method=dhcp 互斥

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • 支持检查模式。

  • 接口设置是同步应用的,但接口本身的更改(例如通过 dhcp 接收新的 IP 地址)可能需要几秒钟或几分钟才能生效。

  • 如果没有任何 iSCSI 接口,此模块在 E 系列系统上将无法使用。

  • 此模块需要 Web Services API 版本 >= 1.3。

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

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

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

示例

- name: Configure the first port on the A controller with a static IPv4 address
  netapp_e_iscsi_interface:
    name: "1"
    controller: "A"
    config_method: static
    address: "192.168.1.100"
    subnet_mask: "255.255.255.0"
    gateway: "192.168.1.1"
    ssid: "1"
    api_url: "10.1.1.1:8443"
    api_username: "admin"
    api_password: "myPass"

- name: Disable ipv4 connectivity for the second port on the B controller
  netapp_e_iscsi_interface:
    name: "2"
    controller: "B"
    state: disabled
    ssid: "{{ ssid }}"
    api_url: "{{ netapp_api_url }}"
    api_username: "{{ netapp_api_username }}"
    api_password: "{{ netapp_api_password }}"

- name: Enable jumbo frames for the first 4 ports on controller A
  netapp_e_iscsi_interface:
    name: "{{ item | int }}"
    controller: "A"
    state: enabled
    mtu: 9000
    config_method: dhcp
    ssid: "{{ ssid }}"
    api_url: "{{ netapp_api_url }}"
    api_username: "{{ netapp_api_username }}"
    api_password: "{{ netapp_api_password }}"
  loop:
    - 1
    - 2
    - 3
    - 4

返回值

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

描述

enabled

布尔值

指示是否已启用或禁用 IPv4 连接。

这并不一定表示连接。例如,如果在没有 dhcp 服务器的情况下启用了 dhcp,则配置不太可能有效。

返回:成功时

示例: true

msg

字符串

成功消息

返回:成功时

示例: "The interface settings have been updated."

作者

  • Michael Price (@lmprice)