Testing of the academic desktop playbook
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Taha Ahmed 560b24f03a Removed naming story from README 7 months ago
group_vars Forgot to include dependency python3 role. Fixed. 7 months ago
roles Fix in role 7 months ago
templates First test with minimal set of roles 7 months ago
.gitignore First test with minimal set of roles 7 months ago
.gitmodules Added a bunch of roles. Time to test! 7 months ago
LICENSE First test with minimal set of roles 7 months ago
README.md Removed naming story from README 7 months ago
ansible.cfg ansible-pull failed with "Could not match supplied host pattern" 7 months ago
hosts.yml Test role swap 7 months ago
local.yml Added a bunch of roles. Time to test! 7 months ago

README.md

Ansible playbook to provision your academic desktop

At present this playbook supports only Ubuntu. Please help me extend support to other Debian and Linux flavours by contributing issues or pull requests.

Start by flashing Ubuntu Server 22.04.4 Live ISO image to a USB stick (for example, using balenaEtcher) and use the installer to install the default Ubuntu Server OS on your computer (setup the disk however you like).

Getting started

You have a freshly installed OS. Now we will install and configure your workstation using Ansible in pull mode from this repo.

First, install Ansible on your machine (to do that we first install pip, then use that to install ansible):

$ sudo apt install python3-pip
$ sudo python3 -m pip install ansible jmespath

Note that this installs ansible and its related binaries in /usr/local/bin/. We do it this way to avoid messing with PATH or virtual environments at this point.

We also installed jmespath which is required by the json_query filter which is used in some tasks of this playbook.

Run the playbook:

$ ansible-pull -U https://codeberg.org/ansible/playbook-workstation --ask-become-pass

(ansible-pull pulls a playbook from a remote repo and executes it on the host). The warning about Could not match supplied host pattern can safely be disregarded.

Working with roles (git submodules)

Add a new role as a git submodule (standing in the playbook root):

$ git submodule add https://codeberg.org/ansible/dotfiles.git roles/dotfiles

Note that if the submodule has submodules of its own, they must be added in a separate step by first entering the root of the submodule, then

$ cd roles/browser-firefox
$ git submodule update --init --recursive

Update all the roles from their respective remotes:

$ git submodule foreach git fetch
$ git submodule foreach --recursive git pull origin main

(--recursive is only needed if your submodule has submodules of its own).

Installing Ansible from pip

Ansible pull

Ansible inventory