Skip to content

Commit

Permalink
Create git playbook
Browse files Browse the repository at this point in the history
- Create git user, group, ssh floder.
- Install git-core package.

Fixes #4
Fixes #5
Closes #31
  • Loading branch information
nikolavidovic authored and rxaviers committed Apr 8, 2015
1 parent c8aa64d commit f3cb7cf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playbooks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@
get_url: url=https://github.com/rxaviers.keys dest=/root/.ssh/authorized_keys mode=700

- include: deploy.yml

- include: git.yml
19 changes: 19 additions & 0 deletions playbooks/git.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

- name: Create git group
group: name=git state=present

- name: Create git user
user: name=git home=/srv/git group=git shell=/bin/bash

- name: Create git users .ssh folder
file: path=/srv/git/.ssh state=directory owner=git group=git mode=700

- name: Create git users authorized_keys
file: path=/srv/git/.ssh/authorized_keys state=touch owner=git group=git mode=700

- name: Set profile environment for git user
copy: src=files/profile dest=/srv/git/.profile owner=git group=git

- name: Install git-core package
apt: name=git-core update_cache=yes

0 comments on commit f3cb7cf

Please sign in to comment.