Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattbostock/ansible-thething
NO LONGER MAINTAINED: Server configuration for thething.mattbostock.com
https://github.com/mattbostock/ansible-thething
Last synced: about 5 hours ago
JSON representation
NO LONGER MAINTAINED: Server configuration for thething.mattbostock.com
- Host: GitHub
- URL: https://github.com/mattbostock/ansible-thething
- Owner: mattbostock
- Created: 2014-04-20T17:14:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-11T12:43:41.000Z (over 10 years ago)
- Last Synced: 2024-04-17T19:24:53.440Z (7 months ago)
- Language: Python
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible configuration for thething.mattbostock.com
This the [Ansible](http://www.ansible.com/home) configuration for my
VM, thething.mattbostock.com.'The Thing' is a reference to the [excellent 1982 film](http://www.imdb.com/title/tt0084787/)
of the same name.It's also my first foray with Ansible.
## What it does
The playbooks here:
- Provision a new VM from [Digital Ocean](https://www.digitalocean.com/)
- Do some basic configuration of Ubuntu for security
- Configure an instance of the [ZNC IRC bouncer](http://wiki.znc.in/ZNC)
- Configure an instance of [Ghost](https://ghost.org/), the blogging
platformEach daemon runs inside a [Docker](https://www.docker.io/) container.
Note that I'm fronting Ghost with [Fastly](http://www.fastly.com/) CDN
so haven't opted to proxy it through a web server for simplicity.## Configuration
I've made use of Ansible's file lookups and vars_prompt to pull in
configuration variables, such as:- A ZNC username and password
- An SSL PEM file for ZNCThe main reason for this is that it allows me to host this repo publicly
without exposing any secrets. I also don't expect to need to run this
playbook often enough that entering these variables would be a hassle.## How to run
This repo relies on [librarian-ansible](https://github.com/bcoe/librarian-ansible)
to pull in external playbooks. Unfortunately librarian-ansible is
written in Ruby rather than Python (Ansible uses Python), so I recommend
using [Bundler](http://bundler.io/) to install the librarian-ansible
gem.There are two playbooks used; `provision.yml` creates and bootstraps the
Digital Ocean VM and `site.yml` installs the services. These need to be
run separately, to allow the Digital Ocean [inventory script](hosts/digital_ocean.py)
to refresh the list of hosts once the VM has been created.```
pip install -r requirements.txt
bundle install
librarian-ansible install
export DO_API_KEY=
export DO_CLIENT_ID=
ANSIBLE_ROLES_PATH=librarian_roles/ ansible-playbook -i hosts provision.yml
ANSIBLE_ROLES_PATH=librarian_roles/ ansible-playbook -i hosts site.yml
```## TODO
- Restrict Ghost on port 80 to Fastly edge nodes (AKA dark origin)
- Configure bitlbee and Campervan for ZNC
- Figure out how to run provision.yml and site.yml together in one run