Adding iptables Rules With Ansible

16th February 2014

Many systems and applications require certain access to certain ports and protocols. When installing these systems using Ansible it is necessary to also open up the needed ports so that the systems can function correctly. As there is no iptables module in Ansible the shell command is needed to add the iptables rules.

As an example, here is a task that adds a iptables rule to allow Apache to communicate on port 80.

Installing sshpass On OSX Mavericks

16th February 2014

When setting up a server for the first time with Ansible you will need to pass ssh credentials to Ansible directly to set up ssh keys. This is done by the use of the sshpass program which allows Ansible to pass your user credentials directly to ssh in order to open a connection to the server. The sshpass program is easily installed on Linux systems with the apt or yum package managers, but on OSX you will need to install it manually.

Vlad - The Vagrant LAMP Ansible Drupal development box
I’ve been using local development environments for years to work on websites. At one points I even setup some Phing scripts to create Apache hosts and databases locally so that I didn’t have to keep adding them myself. When I was first introduced to Vagrant I liked the idea of supplying a box with a project so that people could work on it without having to reconfigure their system for each project. What was missing was a good provisioning tool that wasn’t difficult to understand. I had looked at Puppet and Chef but they were just too complex and after a couple of hours of looking into each one I still wasn’t sure about how they worked.
philipnorton42 Sun, 02/02/2014 - 00:51

Automatically List Directory Contents When Changing Directory In Linux

28th January 2014

When navigating around a Linux box I tend to find I use the same two commands a lot. The first is 'cd' to change a directory, and the second is 'ls' in order to see what is in the new directory. Rather than do this over and over again I decided to look around for a good solution to automate this.

Ansible SSH Setup Playbook

14th January 2014

It is best practice to use Ansible with SSH keys in order to create the SSH connections to the servers. This does require a little bit of extra setup before hand in order to ensure that the server can be reached by Ansible via SSH keys alone. As I have been doing this quite a lot recently I decided to package the setup steps into an Ansible playbook.

Vagrant: Development Environments Made Easy

26th December 2013

Vagrant is a tool that allows the easy creation of virtual machines. It was originally developed for use with VirtualBox, but it has been extended to allow integration with other virtualisation tools. Using Vagrant you can create a particular setup that you can then share with other people without having to give them large virtual disk images.

Ansible: The Automation Engine

23rd December 2013

Ansible is a automation and provisioning tool that makes it easy to configure systems with the needed software, configuration options and even content. It is a command line tool, written in Python, that uses SSH connections to run these actions. This means that all you need to do is have a viable SSH connection to a machine and Ansible will run any actions you want to run. Ansible can either run single commands or use what is called a playbook to run several commands. Ansible playbooks are written in YAML, which makes understanding them quite easy.

Drupal 7 Audit SQL Queries

13th December 2013

When doing site audits on Drupal sites it’s always a good idea to get a feel of what sort of content types, users and taxonomy terms are available. Here are some SQL queries that I tend to use when starting out on a Drupal Audit.

Deleting Unapproved Comments In Drupal 7

13th December 2013

I recently came under a spam attack that gave me a bit of a problem to sort out. Over the course of 24 hours my blog received over 50,000 comments, all of which were utterly useless. What was good was the fact that my tiny little VPS server managed to stay available for most of the attack.

DrupalCampNW 2013: A Review

2nd December 2013

It’s been a whole year since the last DrupalCampNW2012 and this years DrupalCampNW (appropriately titled DrupalCampNW2013) seems to have been a great success. This years camp was held in Manchester at The Studio and I was part of the committee of people who helped organise and run the event.

Over the course of the weekend there was a range of talented speakers covering differing issues around Drupal, open source technologies and user experience. The weekend consisted of a Friday business event, followed by a developer and site builder event on the Saturday and Sunday.

My main task during the event was making sure the volunteers we had there on the day knew what they were doing and when to do it. The trouble with organising and running a conference is that you are lucky if you get to see many of the sessions. I did, however, manage to see several sessions over the course of the weekend.