ansible学习笔记
ansible web -m shell -a 'cat /etc/passwd |grep "keer"'
ansible web -m copy -a 'src=~/hello dest=/data/hello'
ansible web -m copy -a 'content="I am keer\n" dest=/data/name mode=666'
ansible web -m copy -a 'content="I am keerya\n" backup=yes dest=/data/name mode=666'
ansible web -m script -a '/tmp/df.sh' --可以把本机的脚本模拟在被管理主机运行。
ansible bss-cz -m shell -a "nohup ps -ef|grep checkRealbill|grep -v grep|awk '{print \$2}'|xargs -i kill -9 {} &"
浙公网安备 33010602011771号