Skip to content

Install some common basic tools and configuration for doing full stack web development

License

Notifications You must be signed in to change notification settings

bbatsche/Ansible-Common-Role

Repository files navigation

Base Ansible Role

Build Status License Role Name Release Version Downloads

This Ansible role does some simple configuration and settings for a system doing web development. It does the following:

  • Updates APT cache
  • Installs Filesystem ACLs
  • Installs Direnv
  • Configures the Bash profile with some helpful command aliases and settings
  • Configures Vim
  • Tweaks Sysctl settings
  • Creates a web-admin group and assigns it to the current user

Role Variables

  • console_user — If you are setting up a new user for your server, you can use this value to install the BASH profile for that user. Default is ansible_user
  • shmmax_percent — Percentage of available memory to use for kernel.shmmax. Default is "50".
  • shmall_percent — Percentage of available memory to use for kernel.shmall. Default is "50".
  • default_groups — Groups to add the Ansible user or console_user to. Values are "web-admin", "www-data", and "adm".

Example Playbook

- hosts: servers
  roles:
     - { role: bbatsche.Base }

License

MIT

Testing

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.

To run the full suite of specs:

$ gem install bundler
$ bundle install
$ rake

The spec suite will target Ubuntu Trusty Tahr (14.04), Xenial Xerus (16.04), and Bionic Bever (18.04).

To see the available rake tasks (and specs):

$ rake -T

These specs are not meant to test for idempotence. They are meant to check that the specified tasks perform their expected steps. Idempotency is tested independently via integration testing.

About

Install some common basic tools and configuration for doing full stack web development

Resources

License

Stars

Watchers

Forks

Packages

No packages published