From f3cb7cf17fc6ac2e3e78585f973920d3233f28c9 Mon Sep 17 00:00:00 2001 From: Nikola Vidovic Date: Fri, 26 Sep 2014 12:01:41 +0200 Subject: [PATCH] Create git playbook - Create git user, group, ssh floder. - Install git-core package. Fixes #4 Fixes #5 Closes #31 --- playbooks/bootstrap.yml | 2 ++ playbooks/git.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 playbooks/git.yml diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index ad5b8a0..eb2b653 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -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 diff --git a/playbooks/git.yml b/playbooks/git.yml new file mode 100644 index 0000000..fc4577c --- /dev/null +++ b/playbooks/git.yml @@ -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