Code deploy playbook

This commit is contained in:
2016-01-19 08:19:41 -05:00
parent 2f63db463f
commit c0e6cd1fdc
3 changed files with 23 additions and 0 deletions

1
code-deploy.sh Normal file
View File

@@ -0,0 +1 @@
ansible-playbook -i hosts code-deploy.yml

19
code-deploy.yml Normal file
View File

@@ -0,0 +1,19 @@
--
# This playbook deploys the whole application stack for wrestlingdev
#
- name: deploy code to webservers
hosts: webservers
remote_user: root
tasks:
- name: Restart docker container
command: cd /root/wrestlingApp/ && git pull origin master && bash rails-prod.sh wrestlingdev-app
- name: deploy code to workers
hosts: workers
remote_user: root
tasks:
- name: Restart docker container
command: cd /root/wrestlingApp/ && git pull origin master && bash rails-worker-prod.sh wrestlingdev-app

3
hosts
View File

@@ -1,6 +1,9 @@
[webservers]
webhostname
[workers]
woker1
[dbfirstclustermachine]
db1-hostname