–
杀掉特定的进程 ansible -i a all -m shell -a "ps auxf | grep monitor_php | grep -v grep | awk '{print \$2}' | xargs kill " 删除文件 ansible -i a all -m shell -a "rm -f /data/script/*" 复制文件 ansible -i a all -m copy -a "src=monitor_php.sh dest=/data/script/" ansible -i a all -m shell -a 'chmod +x /data/script/*' 后台执行 ansible -i a all -m shell -a 'nohup /bin/bash /data/script/monitor_php.sh &'
–
–
–
评论前必须登录!
注册