Wildcard LetsEncrypt renewal with Ansible and Memset

Obtaining a wildcard LetsEncrypt cert with Ansible Earlier this year, LetsEncrypt made their wildcard x509 certificates available to the general public. Whilst this is a massive step forward over individual certificates for each domain, it does come with the overhead of having to distribute the wildcard certificate to the (possibly many) places you would use it. Ignoring that issue for now, I wrote a quick Ansible playbook which uses the dns-01 challenge method and my Memset DNS management modules (available in Ansible 2....

August 7, 2018 · 3 min · Simon Weald

Ansible module development gotchas

Lessons I learnt whilst developing modules Having now spent quite some time working on my initial Ansible modules for Memset, I’ve assembled some handy hints on areas which tripped me up at various times in my journey. It should be noted that this post is written from the point of view of someone who is not a developer and is therefore not as au fait with some of the processes mentioned as others may be....

June 27, 2018 · 5 min · Simon Weald

Deploying Kubernetes on VMs with Kubespray

All the choices So you’re looking to start using Kubernetes, but you’re overwhelmed by the multitude of deployment options available? Judging by the length of the Picking the Right Solution section to the Kubernetes docs, it’s safe to assume that you’re not alone. Even after you’ve made it past the provisioning stage, you then need to learn how to administrate what is a very complex system. In short; Kubernetes is not easy....

August 9, 2017 · 9 min · Simon Weald

Ansible Node Bootstrapping

When you receive a new server, there are a variety of pre-requisites required before Ansible can be used to administrate the host. Below is my own personal playbook which works for both Debian and RedHat (and derivative) systems. --- # ansible-playbook bootstrap-ansible-target.yml -b -e 'user=user' - hosts: "{{ host }}" remote_user: "{{ user | default('root') }}" gather_facts: no pre_tasks: - name: attempt to update apt's cache raw: test -e /usr/bin/apt-get && apt-get update ignore_errors: yes - name: attempt to install Python on Debian-based systems raw: test -e /usr/bin/apt-get && apt-get -y install python-simplejson python ignore_errors: yes - name: attempt to install Python on CentOS-based systems raw: test -e /usr/bin/yum && yum -y install python-simplejson python ignore_errors: yes - setup: tasks: - name: Create admin user group group: name: admin system: yes state: present - name: Ensure sudo is installed package: name: sudo state: present - name: Create Ansible user user: name: ansible shell: /bin/bash comment: "Ansible management user" home: /home/ansible createhome: yes - name: Add Ansible user to admin group user: name: ansible groups: admin append: yes - name: Add authorized key authorized_key: user: ansible state: present key: "{{ lookup('file', '/etc/ansible/....

August 4, 2017 · 2 min · Simon Weald