I'm新手與這個夢幻般的自動化引擎,並具備與瓦爾文件有點問題:ANSIBLE:使用一個主機文件變量(SSH)
由momment,我必須使用通過SSH連接不keypars一個特定的用戶和密碼。
hosts文件
[all:vars]
connection_mode1=ssh
ssh_user1=user1
ssh_pass1=pass1
[serverstest]
host1 ansible_connection=connection_mode1 ansible_ssh_user=ssh_user1 ansible_ssh_pass=ssh_pass1
我也想包有 「」,{},但沒有作品。
如何在此參數上使用變量?
爲什麼不直接定義'ansible_connection'等PARAMS在'[所有:瓦爾]'? –