随笔分类 -  ansible

摘要:有的时候我们用copy模块备份的文件想要回滚 ansible -i pbs_hosts all -m copy -a "src=file/hosts dest=/etc/ backup=yes" 那我们就可以用下面这种方式进行回滚 cat restore.hosts.yml #固定格式 #- hos 阅读全文
posted @ 2022-07-21 19:23 Hello_worlds 阅读(385) 评论(0) 推荐(0) 编辑
摘要:cat socat.service [Unit] Description=socat Server Requires=network.target After=network.target [Service] Type=simple PIDFile=/tmp/socat.pid KillMode=c 阅读全文
posted @ 2022-06-21 10:50 Hello_worlds 阅读(85) 评论(0) 推荐(0) 编辑
摘要:shell 方式 ssh 192.100.16.9 < raid_info.sh ansible 方式 ansible -i ip_list all -m script -a "raid_info.sh" 阅读全文
posted @ 2022-01-27 16:40 Hello_worlds 阅读(789) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示