摘要: #!/bin/bash for i in ${cat $1};do ipcalc -cs $i if [ $? -eq 0 ];then echo $i else echo "ip address inlegal" fi 阅读全文
posted @ 2019-08-31 12:50 啦啦啦嘻嘻嘻 阅读(1158) 评论(0) 推荐(0) 编辑
摘要: 1.先创建远程HOST的ip文件 例如:cat <<EOF>/home/test/ip.txt >10.1.1.1 >10.1.1.2 >10.1.1.3 >EOF 2.远程操作: ansible -i /home/test/ip.txt all -m shell -a "df -lh" -b -- 阅读全文
posted @ 2019-08-31 12:42 啦啦啦嘻嘻嘻 阅读(800) 评论(0) 推荐(0) 编辑