ansible管理windows主机
2018-02-23 14:51
363 查看
1.安装、配置控制机
https://pypi.python.org/packages/source/p/pywinrm/pywinrm-0.1.1.tar.gz
或者
pip install "pywinrm>=0.1.1"
如果需要支持活动目录需安装python-kerberos模块
2.windows被控制机满足2个条件:
1)必须开启WinRM支持远程管理; 2)确保PowerShell版本是3.0或更高版本
WinRM即windows远程管理,监听5985/5986端口
windows启动服务
PS C:\Users\Administrator> powershell Enable-PSRemoting -Force
在此计算机上设置了 WinRM 以接收请求。
在此计算机上设置了 WinRM 以进行远程管理。
开启WinRM支持远程管理
Ansible为了方便用户配置windows环境的WinRM服务,提供了一个初始化windows环境的powershell脚本,地址
“https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1”
然后在被管理的windows主机上执行就可以
1)检查最后的安装证书的指纹
2)配置错误处理
3)检测PowerShell版本
4)检查启动WinRM服务
5)确保WinRM运行之后,检查有PS会话配置
6)确保有SSL监听
7)检查基本鉴权
8)配置防火墙允许WinRM HTTPS链接
9)本地测试通过网络方式连接是否正常
在powershell上执行: .\ConfigureRemotingForAnsible.ps1
确保powershell 是3.0或更高版本
https://github.com/cchurch/ansible/blob/stable-2.0/examples/scripts/upgrade_to_ps3.ps1
或者
https://www.microsoft.com/en-us/download/details.aspx?id=34595这个软件包括powershell3.0、WMI、WinRM、Management OData IIS Extension和Server Manager CIM Provider
https://pypi.python.org/packages/source/p/pywinrm/pywinrm-0.1.1.tar.gz
或者
pip install "pywinrm>=0.1.1"
如果需要支持活动目录需安装python-kerberos模块
2.windows被控制机满足2个条件:
1)必须开启WinRM支持远程管理; 2)确保PowerShell版本是3.0或更高版本
WinRM即windows远程管理,监听5985/5986端口
windows启动服务
PS C:\Users\Administrator> powershell Enable-PSRemoting -Force
在此计算机上设置了 WinRM 以接收请求。
在此计算机上设置了 WinRM 以进行远程管理。
开启WinRM支持远程管理
Ansible为了方便用户配置windows环境的WinRM服务,提供了一个初始化windows环境的powershell脚本,地址
“https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1”
然后在被管理的windows主机上执行就可以
1)检查最后的安装证书的指纹
2)配置错误处理
3)检测PowerShell版本
4)检查启动WinRM服务
5)确保WinRM运行之后,检查有PS会话配置
6)确保有SSL监听
7)检查基本鉴权
8)配置防火墙允许WinRM HTTPS链接
9)本地测试通过网络方式连接是否正常
在powershell上执行: .\ConfigureRemotingForAnsible.ps1
确保powershell 是3.0或更高版本
https://github.com/cchurch/ansible/blob/stable-2.0/examples/scripts/upgrade_to_ps3.ps1
或者
https://www.microsoft.com/en-us/download/details.aspx?id=34595这个软件包括powershell3.0、WMI、WinRM、Management OData IIS Extension和Server Manager CIM Provider
相关文章推荐
- Ansible学习笔记--使用ansible管理windows集群
- Ansible管理windows系统
- 运维工具Ansible—主机分组管理(hosts)
- Ansible操作windows主机出现SL3_GET_SERVER_CERTIFICATE:certificate verify failed错误
- ansible管理windows实践
- 自动化运维工具Ansible实战(二)主机清单的管理
- Windows主机管理系统Websitepanel
- 菜鸟运维笔记:Windows上用Xshell管理你的云主机
- ansible管理windows实践
- ansible管理windows实践
- Mocha BSM基础架构管理――Windows主机监控
- vscode 通过 WIN10 ubuntu子系统(Bash On Windows)管理远程主机
- 使用subversion实现虚拟机中linux和windows宿主机代码共享管理
- Windows主机管理系统Websitepanel
- Ansible管理windows服务器-windows配置
- 使用subversion实现虚拟机中linux和windows宿主机代码共享管理
- ansible自动化管理windows系统实战
- 使用一台window server 2003主机,管理多台多台子服务器的远程登录
- win7下使用Windows xp Mode实现主机和虚拟机通ping
- windows环境变量管理工具EnvMan