Ansible windows安装 复制文件 执行程序

1、window主机:
执行winrmchange.reg
执行 ConfigureRemotingForAnsible.ps1
执行:
winrm qc
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'

2、vi /etc/ansible/hosts
[lsyhymwin]
172.20.60.60 ansible_ssh_user=administrator ansible_ssh_pass="B9clgys@" ansible_ssh_port=5985 ansible_connection="winrm" ansible_winrm_server_cert_validation=ignore

3、复制文件:ansible allwin -m win_copy -a "src=/root/Zabbix3AgentSetup dest=c:\ owner=administrator"

4、执行程序:ansible allwin -m raw -a "cd c:\Zabbix3AgentSetup\bin\Debug; c:\Zabbix3AgentSetup\bin\Debug\Zabbix3AgentSetup.exe"

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,332评论 19 139
  • 1)安装2)常用模块3)inventory4)playbook(role\tag\template)5) yaml...
    秦记阅读 4,544评论 2 5
  • 一、前言 近期打算搞搞自动部署,因为是windows服务器,一些工具和系统支持都不是太好。最后发现ansible比...
    SkTj阅读 748评论 0 2
  • 昨晚儿子四点才睡,今早比我还起得早。他是怕父母焦虑吧。 早饭后洗碗。和我一起做午饭。饭后去买米。除此之外,都是躺着...
    天蓝蓝47阅读 362评论 1 6
  • 2017.8.5 周六 住宿房租 ⥤ ¥1380 午餐饭店 ⥤ ¥208 乌龟和帐篷 ⥤ ¥50 晚餐海鲜 ⥤ ¥...
    stella91yogurt阅读 309评论 0 0

友情链接更多精彩内容