添加
ansible all -i jpuyy-com-lan -m lineinfile -a "dest=/etc/hosts line='115.239.28.20 api.jpuyy.com'" -s
删除
ansible all -i jpuyy-com-lan -m lineinfile -a "dest=/etc/hosts line='115.239.28.20 api.jpuyy.com' state=absent" -s
更改某一行
ansible all -i jpuyy-com-lan -m lineinfile -a "dest=/etc/env.yaml line='idc: sh' regexp='idc: qcloud'" -s
Leave a Reply