Ansible playbooks to provision my linux workstations.
- python 3
Create a virtual environment:
python3 -m venv .venv
and activate it:
source .venv/bin/activate
install dependencies:
pip install -r requirements.txt
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
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