通过winrm自动化安装zabbix agent.
1. 设置winrm
2. 下载zabbix安装包到http server下
3. 通过winrm接口执行powershell script,或通过ansible, 先下载脚本,再执行脚本
ansible 10.0.202.219 -m win_command -a "powershell.exe invoke-webrequest -uri http://10.0.202.210:18083/repo/windows/zabbix/zabbix_install.ps1 -outfile C:\zabbix_install.ps1"
ansible 10.0.202.219 -m win_command -a "powershell.exe invoke-webrequest -uri http://10.0.202.210:18083/repo/windows/zabbix/zabbix-win.zip -outfile C:\zabbix\zabbix-win.zip"
ansible 10.0.202.219 -m win_shell -a "C:\zabbix_install.ps1"
=============================================================
zabbix install powershell script:
[roo