dellemc.openmanage.ome_application_network_proxy 模块 – 更新 OpenManage Enterprise 上的代理配置
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,请参阅 要求 以了解详细信息。
要在剧本中使用它,请指定:dellemc.openmanage.ome_application_network_proxy。
dellemc.openmanage 2.1.0 中的新增功能
概要
- 此模块允许在 OpenManage Enterprise 上配置网络代理。 
要求
执行此模块的主机上需要以下要求。
- python >= 3.9.6 
参数
| 参数 | 注释 | 
|---|---|
| 包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 | |
| 启用或禁用代理身份验证。 如果 enable_authentication 为 true,则必须提供 proxy_username 和 proxy_password。 如果 enable_authentication 为 false,则代理用户名和密码将设置为其默认值。 选项 
 | |
| 启用或禁用 HTTP 代理配置。 如果 enable proxy 为 false,则 HTTP 代理配置将设置为其默认值。 选项 
 | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular IP 地址或主机名。 | |
| 此选项将忽略集成的证书检查,例如用于保修和目录更新的检查。 
 
 选项 
 | |
| 代理服务器地址。 当 enable_proxy 为 true 时,此选项是必需的。 | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular 密码。 如果未提供密码,则将使用环境变量  示例:export OME_PASSWORD=password | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular HTTPS 端口。 默认值:  | |
| 可以绕过代理服务器直接访问设备的 IPv4 地址、IPv6 地址或域名列表。 | |
| 代理服务器密码。 当 enable_authentication 为 true 时,此选项是必需的。 | |
| 代理服务器的端口号。 当 enable_proxy 为 true 时,此选项是必需的。 | |
| 代理服务器用户名。 当 enable_authentication 为 true 时,此选项是必需的。 | |
| 套接字级别的超时时间(以秒为单位)。 默认值:  | |
| 此标志用于更新 proxy_password。 这仅在 enable_authentication 为  
 
 选项 
 | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular 用户名。 如果未提供用户名,则将使用环境变量  示例:export OME_USERNAME=username | |
| 如果  仅在个人控制的使用自签名证书的站点上配置  在集合版本  选项 
 | |
| 身份验证令牌。 如果未提供 x_auth_token,则将使用环境变量  示例:export OME_X_AUTH_TOKEN=x_auth_token | 
注释
注意
- 请在可以直接访问 Dell OpenManage Enterprise 的系统上运行此模块。 
- 此模块支持 - check_mode。
- 此模块支持 IPv4 和 IPv6 地址。 
示例
---
- name: Update proxy configuration and enable authentication
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: true
    ip_address: "192.168.0.2"
    proxy_port: 444
    enable_authentication: true
    proxy_username: "proxy_username"
    proxy_password: "proxy_password"
- name: Reset proxy authentication
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: true
    ip_address: "192.168.0.2"
    proxy_port: 444
    enable_authentication: false
- name: Reset proxy configuration
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: false
- name: Add IPv4, IPv6 and domain names of devices in proxy exclusion list
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: true
    ip_address: "192.168.0.2"
    proxy_port: 444
    enable_authentication: false
    proxy_exclusion_list:
      - 192.168.1.0
      - 191.187.2.0
      - www.*.com
      - 191.1.168.1/24
- name: Clear the proxy exclusion list
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: true
    ip_address: "192.168.0.2"
    proxy_port: 444
    proxy_exclusion_list: []
- name: Ignore the certificate validation
  dellemc.openmanage.ome_application_network_proxy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    enable_proxy: true
    ip_address: "192.168.0.2"
    proxy_port: 444
    ignore_certificate_validation: true
返回值
常见的返回值记录在这里,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| HTTP 错误的详细信息。 返回: 在 HTTP 错误时 示例:  | |
| 网络代理配置更改的总体状态。 返回: 始终 示例:  | |
| 更新后的应用程序网络代理配置。 返回: 在成功配置网络代理设置时 示例:  | 
