gggggds 发表于 2018-1-2 20:55:16

ansible-playbook 主机变量1

hosts 配置后可以支持指定 端口,密码等其他变量# ll
  
total
12  
-rw-r--r-- 1 root root 236 May5 09:11 hosts
  
-rw-r--r-- 1 root root 205 May4 21:08 test1.yaml
  
-rw-r--r-- 1 root root 146 May5 09:09 test.playbook
  
# cat hosts
  

  
10.1.167.36
  

  
ansible_ssh_port=32200
  

  

  
10.1.167.18
  

  
ansible_ssh_port=322
  

  

  
10.1.162.18 ansible_ssh_port=322 ansible_ssh_pass=test*
  10.1.167.36 ansible_ssh_port=32200 ansible_ssh_pass=test***
页: [1]
查看完整版本: ansible-playbook 主机变量1