dellemc.openmanage.idrac_virtual_media 模块 – 配置远程文件共享设置。
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage
。您需要更多要求才能使用此模块,请参阅 要求 了解详细信息。
要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_virtual_media
。
dellemc.openmanage 6.3.0 中的新增功能
概要
此模块允许配置远程文件共享设置。
要求
执行此模块的主机需要以下要求。
python >= 3.9.6
参数
参数 |
注释 |
---|---|
包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 |
|
如果已连接并插入 image 中提供的文件,则 选择
|
|
iDRAC IP 地址。 |
|
iDRAC 用户密码。 如果未提供密码,则使用环境变量 示例:export IDRAC_PASSWORD=password |
|
iDRAC 端口。 默认值: |
|
iDRAC 用户名。 如果未提供用户名,则使用环境变量 示例:export IDRAC_USERNAME=username |
|
iDRAC 的资源 ID,如果未指定,则将使用管理器集合 ID。 |
|
套接字级别超时(以秒为单位)。 默认值: |
|
如果 仅在个人控制的站点上使用自签名证书时配置 在集合版本 选择
|
|
远程文件共享的详细信息。 |
|
网络共享的域名。此选项适用于 CIFS 和 HTTPS 共享。 |
|
映像文件的路径。支持的文件类型为 .img 和 .iso。 带有 .img 扩展名的文件名被重定向为虚拟软盘,带有 .iso 扩展名的文件名被重定向为虚拟 CDROM。 当 insert 为 以下是共享位置的示例:CIFS 共享://192.168.0.1/file_path/image_name.iso,NFS 共享:192.168.0.2:/file_path/image_name.img,HTTP 共享:http://192.168.0.3/file_path/image_name.iso,HTTPS 共享:https://192.168.0.4/file_path/image_name.img iDRAC8 不支持 CIFS 共享。 iDRAC8 不支持使用凭据的 HTTPS 共享。 |
|
远程文件共享的索引。例如,要指定远程文件共享 1,index 的值应为 1。如果未指定 index,则将考虑 virtual_media 列表的顺序。 |
|
选择
|
|
映像文件的类型。这在 insert 为 选择
|
|
网络共享密码。此选项适用于 CIFS 和 HTTPS 共享。 当提供 password 时,此模块始终报告为找到的更改。 |
|
网络共享用户名。此选项适用于 CIFS 和 HTTPS 共享。 |
|
身份验证令牌。 如果未提供 x_auth_token,则使用环境变量 示例:export IDRAC_X_AUTH_TOKEN=x_auth_token |
注释
注意
从可以直接访问 Dell iDRAC 的系统运行此模块。
此模块支持
check_mode
。
示例
---
- name: Insert image file to Remote File Share 1 using CIFS share.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
virtual_media:
- insert: true
image: "//192.168.0.2/file_path/file.iso"
username: "username"
password: "password"
- name: Insert image file to Remote File Share 2 using NFS share.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
virtual_media:
- index: 2
insert: true
image: "192.168.0.4:/file_path/file.iso"
- name: Insert image file to Remote File Share 1 and 2 using HTTP.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
force: true
virtual_media:
- index: 1
insert: true
image: "http://192.168.0.4/file_path/file.img"
- index: 2
insert: true
image: "http://192.168.0.4/file_path/file.img"
- name: Insert image file using HTTPS.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
force: true
virtual_media:
- index: 1
insert: true
image: "https://192.168.0.5/file_path/file.img"
username: username
password: password
- name: Eject multiple virtual media.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
force: true
virtual_media:
- index: 1
insert: false
- index: 2
insert: false
- name: Ejection of image file from Remote File Share 1.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
force: true
virtual_media:
insert: false
- name: Insertion and ejection of image file in single task.
dellemc.openmanage.idrac_virtual_media:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
force: true
virtual_media:
- index: 1
insert: true
image: https://192.168.0.5/file/file.iso
username: username
password: password
- index: 2
insert: false
返回值
通用返回值记录在此处,以下是此模块独有的字段
键 |
描述 |
---|---|
HTTP 错误的详细信息。 返回: 在 HTTP 错误时 示例: |
|
成功执行了虚拟介质操作。 返回: 成功 示例: |
作者
Felix Stephen (@felixs88)