Skip to content

Commit

Permalink
Create deploy playbook
Browse files Browse the repository at this point in the history
- Add deploy user, set profile and lock it.
- Add profile file.

Fixes #2
Fixes #3
Closes #30
  • Loading branch information
nikolavidovic authored and rxaviers committed Apr 8, 2015
1 parent c16679a commit c8aa64d
Show file tree
Hide file tree
Showing 3 changed files with 17 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 @@ -65,3 +65,5 @@

- name: Save public key to authorized keys
get_url: url=https://github.com/rxaviers.keys dest=/root/.ssh/authorized_keys mode=700

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

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

- name: Lock user deploy
shell: usermod -L deploy

- name: Create srv folder
file: path=/srv owner=deploy state=directory

- name: Set profile for deploy user
copy: src=files/profile dest=/srv/.profile
2 changes: 2 additions & 0 deletions playbooks/files/profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PS1='\[\033[01;35m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
alias ls="ls --color=auto"

0 comments on commit c8aa64d

Please sign in to comment.