- name: Preparation
vars:
- ansible_ssh_user: root
- ansible_ssh_private_key_file: ~/.ssh/site-root
...
- name: Main play
vars:
- ansible_ssh_user: ci
- ansible_ssh_private_key_file: ~/.ssh/site-ci
...
ansible-sandbox ansible_ssh_host=ansible-sandbox.local ansible_ssh_user=ci ansible_ssh_private_key_file=~/.ssh/ci
- name: Preparation
remote_user: root
vars:
- ansible_ssh_private_key_file: ~/.ssh/site-root
...
- name: Main play
remote_user: ci
...Does not work: 'Main play' will be executed as root user
- ansible_ssh_private_key_file: ~/.ssh/site-ci
SSH Error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
... but where do you store the alternative user's credentials?
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/Uu-0BEZwcCI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nHEKsGG_y2ZZpt4OsYQPfDNn5kASz4aE9O4xV0aQKC2A%40mail.gmail.com.
Well, actually it's Windows with babun (cygwin) and python 2.7.x
Do you think this is because of the OS?
SSH agent? Is hat work for private keys too? Or just for passwords? I suspects that more than the OS
Regards:
Bence
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3DPXAOGZzL8HXqpNdyn6zncCQbEqs1tfED3z2s7%2B4eMJA%40mail.gmail.com.