jm2dev / workstation-provisioning

Provision a linux workstation with ansible. MIT.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Workstation setup with ansible

Overview

Ansible playbooks to provision my linux workstations.

Requirements

  • python 3

Usage

Create a virtual environment:

python3 -m venv .venv

and activate it:

source .venv/bin/activate

install dependencies:

pip install -r requirements.txt

Virtual environments

pip install --user virtualenvwrapper

Add the following section to your shell rc file:

// .bashrc
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/src/python
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3

if [[ -f $HOME/.local/bin/virtualenvwrapper.sh ]]; then
  source $HOME/.local/bin/virtualenvwrapper.sh
fi

And expand your PATH variable:

// .profile
export PATH=$PATH:$HOME/.local/bin

Finally create a virtual environment and install requirements:

cd .
mkvirtualenv ansible-p3
pip install -r requirements.txt

Usage

As root run:

ansible-playbook debianbox.yml -i hosts

Those relevant for my user, so it can be run without being root:

ansible-playbook clojure-jm.yml -i hosts 

For opensuse setup I run the playbooks as normal user and prompt for password for those playbooks that require privilege escalation:

ansible-playbook opensuse-workstation.yml -i hosts -K

About

Provision a linux workstation with ansible. MIT.

License:MIT License


Languages

Language:Shell 65.3%Language:Emacs Lisp 21.7%Language:Makefile 10.7%Language:Vim Script 2.4%