cisco.ucs.ucs_serial_over_lan_policy 模块 – 在 UCS Manager 上管理 UCS 串行 over LAN 策略

注意

此模块是 cisco.ucs 集合(版本 1.14.0)的一部分。

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

要安装它,请使用:ansible-galaxy collection install cisco.ucs。 您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。

要在 playbook 中使用它,请指定:cisco.ucs.ucs_serial_over_lan_policy

概要

  • 在 UCS Manager 上管理 UCS 串行 over LAN 策略。

要求

执行此模块的主机需要满足以下要求。

  • ucsmsdk

参数

参数

注释

admin_state

字符串

串行 over lan 策略的管理状态。

禁用 阻止串行 over LAN 访问。

启用 允许串行 over LAN 访问。

选择

  • "disable"

  • "enable"

description

别名: descr

字符串

用户定义的串行 over lan 策略的描述。

最多输入 256 个字符。

您可以使用任何字符或空格,但以下字符除外

`(重音符),\(反斜杠),^(插入符),“(双引号)

=(等号),>(大于号),<(小于号),‘(单引号)。

hostname

字符串 / 必需

Cisco UCS Manager 的 IP 地址或主机名。

模块可以与 UCS 平台模拟器 https://cs.co/ucspe 一起使用

name

字符串 / 必需

串行 over lan 策略的名称。

最多输入 16 个字符。

您可以使用任何字符或空格,但以下字符除外

`(重音符),\(反斜杠),^(插入符),“(双引号)

=(等号),>(大于号),<(小于号),‘(单引号)。

org_dn

字符串

串行 over lan 策略的 Org dn(可分辨名称)。

默认值: "org-root"

password

字符串 / 必需

用于 Cisco UCS Manager 身份验证的密码。

port

整数

连接期间使用的端口号(默认情况下,https 使用 443,http 连接使用 80)。

proxy

字符串

如果 use_proxy 为 no,则指定用于连接的代理。例如,'http://proxy.xy.z:8080'

speed

字符串

串行 over lan 策略的传输速度。

选择

  • "9600"

  • "19200"

  • "38400"

  • "57600"

  • "115200"

state

字符串

如果 absent,将删除串行 over LAN 策略。

如果 present,将创建或更新串行 over LAN 策略。

选择

  • "absent"

  • "present" ← (默认)

use_proxy

布尔值

如果 no,将不使用系统环境变量定义的代理。

选择

  • false

  • true ← (默认)

use_ssl

布尔值

如果 no,将使用 HTTP 连接而不是默认的 HTTPS 连接。

选择

  • false

  • true ← (默认)

username

字符串

用于 Cisco UCS Manager 身份验证的用户名。

默认值: "admin"

示例

- name: Add UCS Serial Over Lan Policy
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: present
    name: sol_org_root
    description: Serial Over Lan for Org root servers
    admin_state: enable
    speed: 115200
  delegate_to: localhost

- name: Add UCS Serial Over Lan Policy in Organization
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: present
    org_dn: org-root/org-prod
    name: sol_org_prod
    description: Serial Over Lan for Org Prod servers
    admin_state: enable
    speed: 115200
  delegate_to: localhost

- name: Update UCS Serial Over Lan Policy in Organization
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: present
    org_dn: org-root/org-prod
    name: sol_org_prod
    description: Serial Over Lan for Org Prod servers
    admin_state: enable
    speed: 38400
  delegate_to: localhost

- name: Update UCS Serial Over Lan Policy in Organization
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: present
    org_dn: org-root/org-prod
    name: sol_org_prod
    descr: Serial Over Lan for Org Prod servers
    admin_state: enable
    speed: 57600
  delegate_to: localhost

- name: Delete UCS Serial Over Lan Policy in Organization
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: absent
    org_dn: org-root/org-prod
    name: sol_org_prod
  delegate_to: localhost

- name: Delete UCS Serial Over Lan Policy
  cisco.ucs.ucs_serial_over_lan:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    state: absent
    name: sol_org_root
  delegate_to: localhost

作者

  • John McDonough (@movinalot)