摘要:
#!/bin/bash for i in ${cat $1};do ipcalc -cs $i if [ $? -eq 0 ];then echo $i else echo "ip address inlegal" fi 阅读全文
摘要:
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 -- 阅读全文