Ansible repository with roles and playbooks used to set up my Ubuntu webserver
- Ansible
- Install first a virtual env, source it afterwards to activate it and finally install Ansible
sudo apt install python3-venv
mkdir $HOME/.envs && python3 -m venv $HOME/.envs/ansible-env
source $HOME/.envs/ansible-env/bin/activate
pip install ansible
- Git
- Source your ansible environment:
source $HOME/.envs/ansible-env/bin/activate
- Clone repo:
git clone https://github.com/reinka/config_ubuntu.git
- Change directory and run the playbook locally (make sure to substitute
ansible_sudo_pass
with your
sudo password:
$ cd config_ubuntu
$ ansible-playbook --connection=local --inventory 127.0.0.1, \
playbooks/deploy_webserver.yml -e ansible_sudo_pass='****'