Skip to content

GuerrillaAnalytics/ansible-config

Repository files navigation

This project is a simple reproducible setup of my home machines using Ansible.

To run the configuration, set up your system as detailed below and then type the following.


Motivation

Reproducibility is key to doing traditional science. Reproducibility is also key to doing Data Science well in a way that you can explain your results, iterate quickly and not waste time configuring the complex mix of tools used in Data Science work.

See more about reproducible data science at Guerrilla Analytics.

To launch

  • set up your system as detailed below
  • activate the virtual environment with source .venv/bin/activate
  • execute ansible-playbook master.yml --ask-vault-pass
  • execute an individual tag with ansible-playbook master.yml --ask-vault-pass -t <tag name>

Set up your system

  • Install virtualenv as described here

  • Create and activate a Python virtual environment for this project's installations

    virtualenv --python=python3 .venv source .venv/bin/activate

  • Install this project's Python requirements inside your virtualenv

    pip3 install -r requirements.txt

  • Install ansible roles using the ansible requirements file.

    ansible-galaxy install -r requirements.yml

  • add this line code to inventory.ini.

    localhost ansible_become_pass=ZZZZ

where ZZZZ is the sudo password for your local machine

  • encrypt your new inventory.ini file

    ansible-vault encrypt inventory.ini

Supported tools

  • Docker
  • Terminal configuration with useful information and colour coding
  • apt-file
  • xclip often useful in scripting

Maintenance

Adding new encrypted text

See the Ansible documentation here.