Installs Ghost, a blogging platform. By default it'll install the latest Ghost version available from Ghost's homepage.
By default, it installs the latest Node version available on Nodesource's repository using the nodesource.node role.
By default, it installs and configures a Nginx proxy using the jdauphant.nginx role.
This role also takes care of Ghost's issue #2639 on hosts using libc 2.13 or older, making sure that npm's sqlite3 is compiled beforehand. This has been tested and verified to work on Debian Wheezy.
None.
Required variables:
ghost_install_dir
: Directory where Ghost will be installed. It is also the home of the user that runs Ghost. Defaults to `/var/www/ghost'.ghost_user_name
: Username for the user that runs Ghost. Defaults toghost
.ghost_user_group
: Group for the user that runs Ghost. Defaults toghost
.ghost_config_mail
: Ghost's mail configuration. It expects a YAML dictonary. Defaults to{}
.ghosts_config_database
: Ghost's database configuration. It expects a YAML dictionary. Defaults configure a sqlite3 database, which is Ghost's default.ghosts_config_server
: Ghost's server configuration. It expects a YAML dictionary. Defaults to localhost on port 2368.ghost_nodejs_enabled
: Enables or disables installing nodejs. Defaults toyes
.ghost_nginx_enabled
: Enables or disables configuring a nginx proxy. Defaults toyes
.ghost_nginx_port
: Defines the nginx listening port. Defaults to80
.
Internal variables, avoid changing:
ghost_fetch_url
: URL used for fetching Ghost. Defaults tohttps://ghost.org/zip/ghost-latest.zip
.ghost_fetch_dir
: Directory to store the Ghost zip. Defaults to/tmp
.ghost_nodejs_pin_priority
: Pin forapt-preferences
. Defaults to500
.ghost_nodejs_path
: Nodejs binary path. Defaults to/usr/bin/node
.ghost_nginx_sites
: Nginx sites configuration passed to jdauphant.nginx role. Check its README for more information. The defaults configure a reverse proxy listening on port 80 and denying access to Ghost's admin page except for requests originated from localhost.
These roles can be installed by running ansible-galaxy install -r requirements.yml
.
Tests can be ran on Debian Wheezy and Ubuntu Trusty boxes by executing "vagrant up". There are the following ENV variables:
ANSIBLE_TAGS
: A list of tags, comma-separated, that will be ran by Ansible. Defaults toall
.ANSIBLE_VERBOSE
: Ansible's verbosity level. Defaults tov
.
- hosts: servers
roles:
- mtpereira.ghost
BSD
Thanks to nodesource for the Nodejs packages repository and Ansible role.
Thanks to jdauphant for the Nginx role.