在指令行中使用for循環: 注意使用{ }來進行變兩個範圍限制,等同于python中的range
[root@ES25 tmp]# for i in {0..9};do echo "10.46.19$i ansible_ssh_user=root ansible_ssh_pass=111111";done
10.46.190 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.191 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.192 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.193 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.194 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.195 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.196 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.197 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.198 ansible_ssh_user=root ansible_ssh_pass=111111
10.46.199 ansible_ssh_user=root ansible_ssh_pass=111111