jbouter/ansible-server
Ansible codebase to install my servers
- Jinja 94.5%
- Shell 5.5%
Ansible Server
Tested on:
- Raspberry pi OS Trixie (Raspberry PI 5, aarch64)
- Ubuntu 24.04 (VPS, amd64)
Preface/Notes
Before starting, a few things must be configured on the OS.
Ubuntu/Debian
apt install -y git python3-virtualenv python3-dev python3-wheel libxml2-dev \
libxslt-dev libssl-dev linux-headers-generic build-essential
Setting up the Virtual Environment
Set up the virtual environment as follows:
python3 -m venv env
source env/bin/activate
pip install wheel
pip install ansible
Every time you work with Ansible, source the virtualenv (source .venv/bin/activate)
Downloading the required ansible collections from Ansible Galaxy
Download the required Ansible collections from galaxy by running the following command
ansible-galaxy install -r collections/requirements.yml
Configuration
Username can be changed from jeffrey to whatever you like in inventory/host_vars/localhost/user.yml
GRUB password must be reconfigured by yourself
in inventory/host_Vars/localhost/vault.yml by creating a new vault:
Create a new yaml file with the following content:
inventory/host_vars/localhost/vault.yml:
Please read through roles for an explanation on what it all does.
ansible-playbook playbooks/provision.yml
Sources
Server icons created by juicy_fish from www.flaticon.com