ieisystem.inmanage.edit_log_setting 模块 – 设置 bmc 系统和审计日志设置

注意

此模块是 ieisystem.inmanage 集合 (版本 3.0.0) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install ieisystem.inmanage。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定: ieisystem.inmanage.edit_log_setting

ieisystem.inmanage 1.0.0 中的新增功能

概要

  • 在 ieisystem 服务器上设置 bmc 系统和审计日志设置。

  • 只有 M5 型号支持此功能。

要求

在执行此模块的主机上需要以下要求。

  • Python 3.7+

  • inManage

参数

参数

注释

audit_status

字符串

审计日志状态。

选择

  • "enable"

  • "disable"

audit_type

字符串

审计日志类型。

选择

  • "local"

  • "remote"

  • "both"

file_size

整数

文件大小(3-65535 字节),当类型为 local 时设置(默认为 30000)。

host

字符串

指定用于通过指定的传输连接到远程设备的 DNS 主机名或地址。host 的值用作传输的目标地址。

password

字符串

指定用于验证与远程设备连接的密码。如果未在任务中指定该值,则将使用环境变量 ANSIBLE_NET_PASSWORD 的值。

protocol_type

字符串

协议类型,当类型为 remote 时设置。

选择

  • "UDP"

  • "TCP"

provider

字典

包含连接详细信息的 dict 对象。

host

字符串

指定用于通过指定的传输连接到远程设备的 DNS 主机名或地址。host 的值用作传输的目标地址。

password

字符串

指定用于验证与远程设备连接的密码。如果未在任务中指定该值,则将使用环境变量 ANSIBLE_NET_PASSWORD 的值。

username

字符串

配置用于验证与远程设备连接的用户名。如果未在任务中指定该值,则将使用环境变量 ANSIBLE_NET_USERNAME 的值。

rotate_count

整数

轮换计数,当类型为 local 时设置,0-删除旧文件(默认),1-备份旧文件。

选择

  • 0

  • 1

server_addr

字符串

服务器地址,当类型为 remote 时设置。

server_port

整数

服务器端口(0-65535),当类型为 remote 时设置。

status

字符串

系统日志状态。

选择

  • "enable"

  • "disable"

type

字符串

系统日志类型。

选择

  • "local"

  • "remote"

  • "both"

username

字符串

配置用于验证与远程设备连接的用户名。如果未在任务中指定该值,则将使用环境变量 ANSIBLE_NET_USERNAME 的值。

备注

注意

  • 不支持 check_mode

示例

- name: Edit log setting test
  hosts: inmanage
  connection: local
  gather_facts: false
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Edit bmc system log setting"
    ieisystem.inmanage.edit_log_setting:
      status: "enable"
      type: "both"
      provider: "{{ inmanage }}"

  - name: "Edit bmc audit log setting"
    ieisystem.inmanage.edit_log_setting:
      audit_status: "enable"
      audit_type: "remote"
      server_addr: "100.2.126.11"
      server_port: "514"
      provider: "{{ inmanage }}"

返回值

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

描述

changed

布尔值

检查设备上是否进行了更改。

返回值: 始终

message

字符串

模块执行后返回的消息。

返回值: 始终

state

字符串

模块执行后的状态。

返回值: 始终

作者

  • WangBaoshan (@ieisystem)