netapp.ontap.na_ontap_security_ssh 模块 – NetApp ONTAP 安全 SSH
注意
此模块是 netapp.ontap 集合 (版本 22.13.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install netapp.ontap
。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:netapp.ontap.na_ontap_security_ssh
。
netapp.ontap 21.24.0 中的新增功能
概要
修改 ONTAP 上 SVM 的 SSH 服务器配置
要求
执行此模块的主机需要以下要求。
Ansible 2.9 或更高版本 - 建议使用 2.12 或更高版本。
Python 3 - 建议使用 3.9 或更高版本。
使用 ZAPI 时,需要 netapp-lib 2018.11.13 或更高版本(使用“pip install netapp-lib”安装),强烈建议使用 netapp-lib 2020.3.12,因为它可以提供更好的连接问题错误报告。
物理或虚拟集群式 Data ONTAP 系统,模块支持 Data ONTAP 9.1 及更高版本,REST 支持需要 ONTAP 9.6 或更高版本。
参数
参数 |
注释 |
---|---|
SSL 客户端证书文件(.pem)的路径。 python 2.6 不支持。 |
|
用于加密数据的密码。 示例列表 [aes256_ctr, aes192_ctr, aes128_ctr, aes256_cbc, aes192_cbc] |
|
启用或禁用新功能。 这可用于启用实验性功能或禁用破坏向后兼容性的新功能。 支持的键和值可能会随时更改,恕不另行通知。未知键将被忽略。 |
|
使用 REST 时覆盖集群 ONTAP 版本。 如果版本与目标集群不匹配,则行为未定义。 这是在由于权限问题无法读取集群版本时提供的一种解决方法。请参阅 https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues。 这应采用 9.10 或 9.10.1 的形式,每个元素都是整数。 |
|
ONTAP 实例的主机名或 IP 地址。 |
|
使用此端口覆盖默认端口(80 或 443) |
|
启用和禁用 https。 使用 REST 时被忽略,因为只支持 https。 使用 SSL 证书身份验证时被忽略,因为它需要 SSL。 选项
|
|
密钥交换算法。 示例列表 [diffie_hellman_group_exchange_sha256, diffie_hellman_group14_sha1] |
|
SSL 客户端密钥文件的路径。 |
|
MAC 算法。 示例列表 [hmac_sha1, hmac_sha2_512_etm] |
|
在关闭连接之前允许的最大身份验证重试次数。 最小值为 2,最大值为 6。 默认值为 2。 |
|
指定用户的密码。 |
|
SSH 服务始终启用。 选项
|
|
此模块仅支持 REST。 always – 将始终使用 REST API。如果模块不支持 REST,则会发出警告。 默认: |
|
这可以是集群范围或 SVM 范围的帐户,具体取决于是否需要集群级或 SVM 级 API。 有关更多信息,请阅读文档 https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/。 支持两种身份验证方法
要使用证书,必须已在 ONTAP 集群中安装证书,并且必须已启用证书身份验证。 |
|
如果设置为 这应仅设置为 选项
|
|
用于 vserver 作用域的 vserver 名称。 如果不存在或为 null,则假定为集群作用域。 |
备注
注意
不支持删除所有 SSH 密钥交换算法。SSH 登录将失败。
此模块仅适用于 REST。
以 na_ontap 为前缀的模块旨在支持 ONTAP 存储平台。
默认情况下启用 HTTPS,建议使用。要在集群上启用 HTTP,您必须运行以下命令:“set -privilege advanced;” “system services web modify -http-enabled true;”。
示例
- name: Modify SSH algorithms
netapp.ontap.na_ontap_security_ssh:
vserver: vserverName
ciphers: ["aes256_ctr", "aes192_ctr"]
key_exchange_algorithms: ["diffie_hellman_group_exchange_sha256"]
mac_algorithms: ["hmac_sha1"]
max_authentication_retry_count: 6
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify SSH algorithms at cluster level
netapp.ontap.na_ontap_security_ssh:
vserver:
ciphers: ["aes256_ctr", "aes192_ctr"]
key_exchange_algorithms: ["diffie_hellman_group_exchange_sha256"]
mac_algorithms: ["hmac_sha1"]
max_authentication_retry_count: 6
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify SSH algorithms at cluster level
netapp.ontap.na_ontap_security_ssh:
ciphers: ["aes256_ctr", "aes192_ctr"]
key_exchange_algorithms: ["diffie_hellman_group_exchange_sha256"]
mac_algorithms: ["hmac_sha1"]
max_authentication_retry_count: 6
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"