Ansible---模块-4

创建文件
ansible all -m file -a 'name=/opt/1.log state=touch'

删除文件
state= absent
state = directory 创建文件夹

修改主机名
ansible 192.168.103.62 -m hostname -a 'name=node-8'

posted @ 2021-05-24 15:46  lavida2000  阅读(38)  评论(0)    收藏  举报