Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private Git Repo in requirements.yml does not work without private ssh key #226

Closed
emoshaya opened this issue Mar 10, 2017 · 7 comments
Closed

Comments

@emoshaya
Copy link

because I use private git repositories in my requirements.yml, I need to be able to upload my local ~/.ssh/id_rsa to the target host ~/.ssh/id_rsa... is there a way to do that in the provisioner?

@neillturner
Copy link
Owner

neillturner commented Mar 10, 2017

  1. you need to put the /id_rsa in the ansible repo somewhere so it get copied to the server.
    you could look at the additional_copy_path parameter

  2. then we need to add similar functionalu to the custom_pre_apply_command as in kitchen-puppet
    from https://github.com/neillturner/kitchen-puppet/blob/master/provisioner_options.md
    Try creating a pull request. I might get to on the weekend to implement.

  3. then this custom_pre_play_command we would put the command to move the id_rsa file from the ansible repo on the ~/.ssh directory

@neillturner
Copy link
Owner

neillturner commented Mar 11, 2017

added custom_pre_play_command option to 0.46.1 so should be able to implement this.
Thought a bit more and this seems to be a common requirement.
see #87
we have an option ssh_known_hosts
it would be better to have an explicit option ssh_private_keys which is a list of files to copy to ~/.ssh/known_hosts

@emoshaya
Copy link
Author

Hi @neillturner The change in 0.46.1 kind of broke the idempotency test in kitchen. I get to the end of the first converge where it is about to run the second converge to verify idempotency and I get the following errors:
bash: -c: line 3: syntax error near unexpected token &&' bash: -c: line 3: && (echo 'going to invoke ansible-playbook second time:';

@neillturner
Copy link
Owner

thanks for letting me i will fix -)

@neillturner
Copy link
Owner

fixed in 0.46.2 but i will still add an option ssh_private_keys

@emoshaya
Copy link
Author

thanks @neillturner any update on the ssh_private_keys option?

@neillturner
Copy link
Owner

additional_ssh_private_keys parameter in version 0.46.3
would be great if you can test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants