Created
November 5, 2015 12:06
-
-
Save rey/f21ddec2e0d6f581170b to your computer and use it in GitHub Desktop.
git clone for private repo using Ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: node1 | |
sudo: yes | |
tasks: | |
- name: copy ssh key | |
copy: src=/Users/vinta/.ssh/your_project_deploy_key | |
dest=/home/ubuntu/.ssh/your_project_deploy_key | |
mode=0400 | |
- name: git clone | |
git: repo=git@github.com:your/project.git | |
dest=/home/ubuntu/your_project | |
key_file=/home/ubuntu/.ssh/your_project_deploy_key | |
accept_hostkey=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment