本文摘自PHP中文网,作者黄舟,侵删。
环境需求:* Controller 一定要是 Linux
* Windows 需要:
1.Framework 4.5
2.PowerShell 3.0
原料:
Ansible Master (CentOS)
Anisble Slave (Windows SP1)
步骤:
[Linux]
1 |
|
[Windows]
下载 Framework 4.5
1 |
|
下载 PowerShell 3.0
1 |
|
安装完成后会重启一次
下载 Remoting Script for Ansible
1 |
|
使用管理员身份运行脚本
使用管理员身份打开PowerShell
1 |
|
会出现以下错误
这个其实也不算是错误,只需要求改网络的属性:在网络和共享中心中把公共网络,切换成家庭网络
再次执行
1 |
|
接下来需要开启windows 远程操作的相关属性:
1 |
|
1 |
|
以上就可以看到端口5985 已经起来了
1 |
|
使用ansible 测试windows 主机
1 |
|
[windows]
1 |
|
以上就是详细介绍Windows下如何使用Ansible应用的实例的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
Windows 10 ltsb如何激活?Windows 10 ltsb激活方法
在 Windows 中,有关文件或文件夹的属性说法不正确的是什么
更多相关阅读请进入《Windows》频道 >>