百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

ansible-windows-hardening

> DevOps
开源

此 Ansible 角色为 DevSec Windows 基准配置提供了 Windows 加固配置。

156 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

此 Ansible 角色为 DevSec Windows 基准配置提供了 Windows 加固配置。

windows-hardening (Ansible Role)

Attention: This role has been migrated to our hardening-collection:

  • https://github.com/dev-sec/ansible-os-hardening/
  • https://galaxy.ansible.com/devsec/hardening

Please open any issues and pull requests there!

Requirements

  • Ansible 2.3.0

Variables

Name Default Value Description
win_security_PasswordComplexity 1 Flag that indicates whether the operating system MUST require that passwords meet complexity requirements. Default: True
win_security_LockoutBadCount 4 Number of failed logon attempts after which a user account MUST be locked out. Default: 4
win_security_ResetLockoutCount 15 Number of minutes after a failed logon attempt that the account MUST be locked out. Default: 15 minutes
win_security_LockoutDuration 15 The number of minutes that a locked-out account MUST remain locked out before automatically becoming unlocked. Default: 15 minutes
win_security_SeRemoteInteractiveLogonRight *S-1-5-32-544 Determines which users or groups can access the logon screen of a remote computer through a RDP connection. Default: Administrators
win_security_SeTcbPrivilege *S-1-0-0 Allows a process to authenticate like a user and thus gain access to the same resources as a user. Default: Nobody
win_security_SeMachineAccountPrivilege *S-1-5-32-544 Allows the user to add a computer to a specific domain. Default: Administrators
win_security_SeTrustedCredManAccessPrivilege `` Access Credential Manager as a trusted caller policy setting is used by Credential Manager during backup and restore. Default: No One
win_security_SeNetworkLogonRight *S-1-0-0 Required for an account to log on using the network logon type. Default: Nobody

Example Playbook

    - hosts: localhost
      roles:
        - dev-sec.windows-hardening

Local Testing

For all our tests we use test-kitchen. If you are not familiar with test-kitchen please have a look at their guide.

We create multiple hosts - one linux host where Ansible runs on and the Windows hosts.

Next install test-kitchen:

bash
# Install dependencies
gem install bundler
bundle install

Then you can run the playbook and tests:

# create the ansible and windows hosts
bundle exec kitchen create

# run ansible playbook on windows host
bundle exec kitchen converge default-ansibleserver

# verify windows machines
bundle exec kitchen verify windows

Contributing

See contributor guideline.

License and Author

  • Author:: Sebastian Gumprich

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyansibleplaybookwindows-hardening

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理