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在'[所有:瓦尔]'? –