1.ansible將文件複製到遠程主機 ansible hostgroup -m copy -a "src=/data/ansible/roles/change_prod_marketing_conf/application-prod.properties dest=/data/home/services/xxx/conf/" 2.啓動遠程主機 ansible hostgroup -m shell -a "source /etc/profile && /data/home/services/xxx/bin/restart.sh"
ansible使用
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.