This role will install and secure a basic PostgreSQL server.
db_admin
— Admin username to be created. Default "vagrant"db_pass
— Password for admin user. Default "vagrant"
- hosts: servers
roles:
- { role: bbatsche.PotgreSQL-Install }
MIT
Included with this role is a set of specs for testing each task individually or as a whole. To run these tests you will first need to have Vagrant and VirtualBox installed. The spec files are written using Serverspec so you will need Ruby and Bundler. Note: To keep things nicely encapsulated, everything is run through rake
, including Vagrant itself. Because of this, your version of bundler must match Vagrant's version requirements. As of this writing (Vagrant version 1.8.1) that means your version of bundler must be between 1.5.2 and 1.10.6.
To run the full suite of specs:
$ gem install bundler -v 1.10.6
$ bundle install
$ rake
To see the available rake tasks (and specs):
$ rake -T
There are several rake tasks for interacting with the test environment, including:
rake vagrant:up
— Boot the test environment (Note: This will not run any provisioning tasks.)rake vagrant:provision
— Provision the test environmentrake vagrant:destroy
— Destroy the test environmentrake vagrant[cmd]
— Run some arbitrary Vagrant command in the test environment. For example, to log in to the test environment run:rake vagrant[ssh]
These specs are not meant to test for idempotence. They are meant to check that the specified tasks perform their expected steps. Idempotency can be tested independently as a form of integration testing.