标签: ansible ansible-playbook
我创建了一个剧本来从云图像中创建一个新的实例。
现在有人可以帮我弄清楚如何使用用于创建实例的密钥对登录实例。我不想使用除root之外的任何用户登录。
感谢。
答案 0 :(得分:0)
在hosts文件中:
hosts
[servercategory] 54.85.136.142 ansible_ssh_private_key_file=~/.ssh/your-ssh-key.pem ansible_ssh_user=root