base
Base Ansible Role
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 isansible_user
shmmax_percent
— Percentage of available memory to use forkernel.shmmax
. Default is "50".shmall_percent
— Percentage of available memory to use forkernel.shmall
. Default is "50".default_groups
— Groups to add the Ansible user orconsole_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
A basic role providing some common development tools and system configurations for doing full stack web development
Install
ansible-galaxy install bbatsche/Ansible-Common-Role
License
mit
Downloads
26980
Owner