Skip to content

Instantly share code, notes, and snippets.

@sameg14
Last active August 29, 2015 14:12
Show Gist options
  • Save sameg14/bbf762e47da1df85ff52 to your computer and use it in GitHub Desktop.
Save sameg14/bbf762e47da1df85ff52 to your computer and use it in GitHub Desktop.
Platform QA Deploy - Ansible Playbook
---
- hosts : platform-qa-server
su : yes
vars :
hipchat_rooms:
- { token: "a2a1d9143d45feac80d33bf5246247", room: "504774", name: "LIN Digital Engineering" }
pre_tasks:
- name : HipChat - Attempting Deploy...
hipchat: token={{ item.token }} room={{ item.room }} msg="Deploying platform to QA" notify=yes
with_items: hipchat_rooms
run_once: yes
changed_when: false
tasks :
- name : Checkout qa branch
su_user : fmpub
git : repo=ssh://git@github.com/rmm/platform.git
dest=/home/fmpub/platform
version=qa
- name : Update composer
shell : cd /home/fmpub/platform; composer update
- name : Clear cache
shell : rm -rf /home/fmpub/platform/cache/*
- name : Restart apache
service: name=httpd state=restarted
post_tasks:
- name : HipChat - Finished Deploy...
hipchat: token={{ item.token }} room={{ item.room }} msg="Successfully Deployed platform to QA" notify=yes
with_items: hipchat_rooms
run_once: yes
changed_when: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment