Ssh 有没有办法将Ansible与密码列表一起使用?
我使用Ansible与密码不同的100-200台计算机进行交互(我有列表) 我希望:Ssh 有没有办法将Ansible与密码列表一起使用?,ssh,ansible,Ssh,Ansible,我使用Ansible与密码不同的100-200台计算机进行交互(我有列表) 我希望: password_list='["1234","5678"]' Ansible-> try to connect to IP_Adresse1 with password 1 if fail: Ansible-> try to connect to IP_Adresse1 with password 2 if not fail: Do some stuff to the con
password_list='["1234","5678"]'
Ansible-> try to connect to IP_Adresse1 with password 1
if fail:
Ansible-> try to connect to IP_Adresse1 with password 2
if not fail:
Do some stuff to the connected host...
我想知道这是否可能?不要认为你所描述的是可能的。您可以在清单文件中提供每个主机的密码好的,谢谢您的回答,我将尝试从脚本启动此playbook并处理错误您为什么要重新发明轮子,何时可以为您处理所有这些?具体请参见,例如,
ansible\u密码
。如果需要的话,你可以用它来保护那些VAR。