community.windows.win_audit_policy_system 模块 – 用于更改系统范围的审核策略
注意
此模块是 community.windows 集合(版本 2.3.0)的一部分。
如果您正在使用 ansible
包,您可能已经安装了这个集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.windows
。
要在 playbook 中使用它,请指定:community.windows.win_audit_policy_system
。
概要
用于更改系统范围的审核策略。
参数
参数 |
注释 |
---|---|
您要审核的事件类型。 接受列表。请参阅示例。 选项
|
|
要调整策略的类别的单个字符串值。 不能与 subcategory 一起使用。您必须定义其中一个。 更改此设置会导致所有子类别调整为定义的 audit_type。 |
|
要调整策略的子类别的单个字符串值。 不能与 category 一起使用。您必须定义其中一个。 |
注释
注意
建议在首次调整策略之前对其进行备份。
有关详细信息,请参阅此页面 https://technet.microsoft.com/en-us/library/cc766468.aspx。
另请参阅
另请参阅
- community.windows.win_audit_rule
将审核规则添加到文件、文件夹或注册表项。
示例
- name: Enable failure auditing for the subcategory "File System"
community.windows.win_audit_policy_system:
subcategory: File System
audit_type: failure
- name: Enable all auditing types for the category "Account logon events"
community.windows.win_audit_policy_system:
category: Account logon events
audit_type: success, failure
- name: Disable auditing for the subcategory "File System"
community.windows.win_audit_policy_system:
subcategory: File System
audit_type: none
返回值
常见返回值记录在此处这里,以下是此模块独有的字段
键 |
描述 |
---|---|
有关目标策略的详细信息 返回: 始终 示例: |