Giter Site home page Giter Site logo

ansible-thething's Introduction

Ansible configuration for thething.mattbostock.com

This the Ansible configuration for my VM, thething.mattbostock.com.

'The Thing' is a reference to the excellent 1982 film 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
  • Do some basic configuration of Ubuntu for security
  • Configure an instance of the ZNC IRC bouncer
  • Configure an instance of Ghost, the blogging platform

Each daemon runs inside a Docker container.

Note that I'm fronting Ghost with Fastly 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 ZNC

The 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 to pull in external playbooks. Unfortunately librarian-ansible is written in Ruby rather than Python (Ansible uses Python), so I recommend using Bundler 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 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=<Digital Ocean API key here>
export DO_CLIENT_ID=<Digital Ocean client ID here>
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

ansible-thething's People

Contributors

mattbostock avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.