Skip to content

Instantly share code, notes, and snippets.

@mxey
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxey/8717021 to your computer and use it in GitHub Desktop.
Save mxey/8717021 to your computer and use it in GitHub Desktop.
---
- hosts: website
vars:
version: 0.4.1
root: /opt/ghost
temp_zip_file: /opt/ghost-new.zip
tasks:
- name: fetch
get_url: "dest={{temp_zip_file}} url=https://ghost.org/zip/ghost-{{version}}.zip"
- name: remove old core
file: "path={{root}}/core state=absent"
- name: unzip
command: "unzip {{temp_zip_file}} -od {{root}}"
- name: install npm dependencies
npm: "path={{root}} production=yes"
- name: restart service
service: name=ghost state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment