前言
本文主要介绍在如何使用 Ansible 管理 Windows 客户端,Ansible 官方提供了一个很方便的安装脚本,对于外网用户来说安装真的很轻松,可惜我遇到的问题是如何在内网部署,有相同烦恼的小伙伴不妨参考下
轻轻松松使用 Ansible 管理 Windows 客户端 更新历史
2018 年 05 月 21 日 - 初稿
阅读原文 - https://wsgzao.github.io/post/ansible-windows/ 扩展阅读
Ansible Windows Guides - http://docs.ansible.com/ansible/latest/user_guide/windows.html Ansible Windows Support
Ansible 在 2.3 版本之前对于 Windows 支持的并不算很友好,从 2.4 版本开始已经可以使用原生模块实现很多需求
Because Windows is a non-POSIX-compliant operating system, there are differences between how Ansible interacts with them and the way Windows works. These guides will highlight some of the differences between Linux/Unix hosts and hosts running Windows.
Ansible ’ s supported Windows versions generally match those under current and extended support from Microsoft. Supported desktop OSs include Windows 7, 8.1, and 10, and supported server OSs are Windows Server 2008, 2008 R2, 2012, 2012 R2, and - 2016.
Ansible requires PowerShell 3.0 or newer and at least .NET 4.0 to be installed on the Windows host.
A WinRM listener should be created and activated. More details for this can be found below.
Ansible does not support managing Windows XP or Server 2003 hosts. The supported operating system versions are:
Windows Server 2008 Windows Server 2008 R2 Windows Server 2012 Windows Server 2012 R2 Windows Server 2016 Windows 7 Windows 8.1 Windows 10
# 查看 ip 地址 ansible windows -m win_command -a "ipconfig" 网盘下载
Windows 作为客户端所需的软件包我上传到百度网盘,.Net Framework 安装失败提示证书错误记得手动导入 MicrosoftRootCertificateAuthority2011.cer
https://pan.baidu.com/s/1JNV2pXjwUn14ojAtdEH_Sg