-
-
Save discipolo/9ddd486a622e1582921bf6cc804378ff to your computer and use it in GitHub Desktop.
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
--- | |
# test SSH agent forwarding | |
- shell: echo "Client= [$SSH_CLIENT] Sock= [$SSH_AUTH_SOCK]" | |
sudo: no | |
register: myecho | |
- debug: msg="{{myecho.stdout}}" | |
- shell: ssh-add -l | |
sudo: no | |
register: myecho | |
- debug: msg="{{myecho.stdout}}" | |
# - shell: ssh -T -vvvv git@github.com | |
# register: myecho | |
# - debug: msg="{{myecho.stdout}}" | |
- name: Get app from github | |
sudo: no | |
git: | |
repo=git@github.com:myprivate/repo.git | |
dest=git-repo/myproject.git | |
accept_hostkey=yes | |
force=yes | |
bare=yes | |
update=yes | |
version="{{ git_branch }}" | |
- name: Create project folder | |
become: yes | |
become_user: root | |
become_method: sudo | |
file: path=/home/{{ base_user}}/{{ project_folder }} | |
owner={{ base_user }} | |
group={{ base_user }} | |
mode=0774 | |
state=directory | |
- name: checkout app to project folder | |
environment: | |
GIT_WORK_TREE: /home/{{ base_user }}/{{ project_folder }} | |
shell: | |
git checkout {{ git_branch}} -f | |
chdir=/home/{{ base_user}}/git-repo/myproject.git/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment