Using Ansible - setting up a Postfix mail server

I have always used a full-on mailserver with virtual mailboxes as used by ISPs and fortunately I found a ready made ansible script to do the job.

Fortunately this script is written for Ansible 1.9 and Debian Jessie so I don't envisage many problems.

I followed the README and checked the scripts.  Variables have to be supplied to fit each use case, found in group_vars/all.  For the database passwords I used my previously obtained unique value:

Using Ansible - configuring some of that stuff

Now that we have our web files in place we need to configure apache so that we can make things work.  Apache2.conf has a handy couple of lines that we can use to make this happen easily.  They are:

# Include generic snippets of statements
  IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
  IncludeOptional sites-enabled/*.conf

Configure vhosts

Using Ansible - Install sites using git

Now that we have our LAMP stack we want to use it for something.  The first thing we think of is to get our web files in there ready for launching web pages.  For this purpose I was not able to find a ready made script online so this time had to put my head down and learn to write ansible yaml files myself.  I did find a helpful post here, and used some of that for a starting point.

I created a new Ansible Playbook to do the following:

Using Ansible - A Playbook to install LAMP

Now that ansible is connecting successfully to my server, I wanted to understand some of the available features of ansible.  Hosts can be grouped so I decided to group my one IP address in hosts.  You can also connect the connection type and user per host so my host file ended up like this:

[ppserver]
120.138.18.54 ansible_connection=ssh ansible_user=root

I can now ping this using 

ansible ppserver -m ping

Installing Ansible on MAC OS

The following is my experience of installing Ansible on Mac OS.  Ansible enables remote server configuration and management via SSH.  I'm drawn to it because I am hoping to simplify the process of provisioning my server each time Debian upgrades.  Installing Ansible is easy but getting it to communicate with Debian Jennie server proved harder.

Drupal Commerce

I have built my first site in Drupal Commerce for Drupal 7.x and am very impressed.  The module is built along similar architecture to Drupal 7 core and uses a number of contrib modules to provide functionality such as Rules instead of the previous Conditional Actions.

While the commerce system is more flexible than Ubercart is it also more complicated and there are places where it is difficult to understand what is happening.  This is true in the area of user permissions and some of these can be quite confusing.  A couple of examples:

Configuring the Domain Module in Drupal 5

The following instructions apply to setting up the Domain Access Module to work with Organic Groups in Drupal 5.

The requirement was to have a main site where admin controls the content and a subsite where registered users are able to create groups and post content. Admin then has the power to publish any chosen content from the subsite to the main site. It is conceivable that this set up would work with multiple subsites and not just one.

The subsite(s) is/are a subdomain of the main site.