An Ansible role to set up commonly required utilities and configurations for TEN7 hosting.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
defaults
handlers
meta
tasks
tests
vars
LICENSE
README.md

README.md

Ansible Role: Server Common

Installs commonly required utilities and configurations for TEN7 hosting.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml).

Setting the hostname

You can set the server hostname with server_common_hostname:

server_common_hostname: "your-hostname.example.com"

Installing packages from the system manager

This role installs several packages by default from the system package manager (see the vars/ folder). If you want to install additional packages, set the server_common_apt_packages_extra variable:

server_common_apt_packages_extra:
  - "packagename"
  - "anotherpackage"
  - "yet-more-packages"

If you want to override the default list of packages, set the server_common_apt_packages variable.

Installing packages from the Python pip package manager

Sometimes it's better to install Python dependencies directly from pip. This role already installs some Python dependencies by default (see the vars/ folder). To install additional packages from pip, set the server_common_pip_packages_extra variable:

server_common_pip_packages_extra:
  - "stuff"
  - "things"
  - "junk"

You can also override the default list by setting the server_common_pip_packages variable.

Set the localhost entry in the global inventory file

On some distributions, installing Ansible does not include the creation of the global inventory file, leading to an annoying warning message. This role creates the inventory file, setting an item for localhost.

localhost ansible_connection=local

Dependencies

None.

Example Playbook

- hosts: all
  vars:
    server_common_hostname: "your-hostname.example.com"
    server_common_apt_packages_extra:
      - "mysql-common"
    server_common_pip_packages_extra:
      - "linode-api"
  roles:
    - ten7.server-common

License

GPL 3.0.

Author Information

TEN7 Interactive is a web agency based out of Minneapolis, MN.