jpmorn
2018-01-01 20:56:46 +08:00
ansible
vi hosts.ini
[windows]
xxx
[windows:vars]
ansible_ssh_user=Administrator
ansible_ssh_pass=aaa
ansible_ssh_port=5986
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
windows 云主机设置
1. 关闭防火墙 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
2. 运行 ConfigureRemotingForAnsible.ps1 这个文件
```
root@111:/opt/ansible# ansible windows -i hosts.ini -m win_ping
8.8.8.8 | SUCCESS => {
"changed": false,
"ping": "pong"
}
```