ansible laptop will set up my laptop to my liking. Supports both KDE and GNOME.
Explore the Ansible docs »
Tested on:
- Arch Linux
- Debian Sid
- Fedora 33
- Ubuntu 20.04 & 20.10
- KDE Neon
Before starting, a few things must be configured on the OS.
apt install -y python3-virtualenv python3-dev python3-wheel libxml2-dev libxslt-dev libssl-dev linux-headers-generic build-essential
dnf install -y python3-virtualenv
dnf groupinstall -y "Development Tools"
sudo pacman -S python-pip python-virtualenv base-devel
Set up the virtual environment as follows:
mkdir ~/.venvs
python3 -m venv ~/.venvs/ansible
source ~/.venvs/ansible/bin/activate
pip install wheel
pip install ansible
Every time you work with Ansible, source the virtualenv (source ~/.venvs/ansible/bin/activate
)
Download the required Ansible collections from galaxy by running the following command
ansible-galaxy install -r collections/requirements.yml
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
:
---
grub_PBKDF2: grub.pbkdf2.sha512.10000.....
user_fullname: Firstname Lastname
user_email: [email protected]
git_signingkey: 123412341234ABCD
Fill in the variable from the output of the following command:
grub-mkpasswd-pbkdf2
Encrypt the new yaml
file:
ansible-vault encrypt inventory/host_vars/localhost/vault.yml
Please read through roles for an explanation on what it all does.
ansible-playbook playbooks/provision.yml
Icons made by Prosymbols from www.flaticon.com