Skip to content

PauloPortugal/manjaro-playbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manjaro/Arch Linux Ansible Provision

This is an Ansible playbook meant to configure a Manjaro OS (Arch Linux distribution) GNOME 3 desktop. It should run locally after a clean OS install.

This playbook follows the Manjaro community recommendation when installing the additional software packages from the Arch User Repository:

🪧 Table of contents


Provision and configure a Vagrant VM

Before applying the changes against your desktop/laptop, being able to test against a Docker container or a Vagrant VM machine allows to test the playbook safer, quicker and often.

Since this is a Manjaro/Arch Desktop setup, having a Virtual Box to be able to login and inspect the UI is somewhat useful, although this is still an experimentation as the preferred approach was to opt for a Docker container.

The Vagrant VM box is based on a Manjaro Gnome X64 21.0 box. This should not be an issue if you want the latest Manjaro release, as the playbook will upgrade the VM to the lastest Manjaro release version.

Provision and configure a Manjaro Vagrant VM

Install and configure Vagrant & Oracle VirtualBox locally

# if from a different Linux distribution or on a Mac make sure to install Vagrant and Oracle
# if you are using a Manjaro/Arch, install and configure Vagrant & Oracle VirtualBox locally
ansible-playbook playbook.yml -l localhost --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME" --ask-become-pass --tags virtualization

#Provision the Vagrant box
vagrant up --provision

# Run Ansible playbook against the Vagrant VM
ansible-playbook playbook.yml -l testbuild --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME user_email=EMAIL" --ask-become-pass

Run and configure the localhost machine

Install everything

ansible-lint
ansible-playbook playbook.yml -l localhost --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME user_email=EMAIL" --ask-become-pass

Install everything with debug turned on

ansible-lint
ansible-playbook -vvvv playbook.yml -l localhost --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME user_email=EMAIL" --ask-become-pass

Install only the 'dev-tools' role with minimal logging

ansible-lint
ansible-playbook -v playbook.yml -l localhost --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME user_email=EMAIL" --ask-become-pass --tags dev-tools

🧰 Playbook Roles

Roles supported:

Roles Description
base Install Linux util libraries, python-pip, xinput, terminator, snap and zsh
users Setup user accounts
printers Install printer drivers
browsers Install tor, google-chrome and chromedriver
audio-tools Install audacity
dev-tools Install tesseract, jq, xq, docker, docker-compose, go, nodejs, npm, nvm, jre8, jre10, maven, clojure, leiningen, sbt, scala, minikube, kubectl, kubectx, kubefwd, hub and heroku
cloud-tools Install google-cloud-sdk
editors Install vim, emacs, gimp, Intellij + JetBrains Toolbox, Goland, Visual Studio Code and Xmind
media Install Spotify and Peek (GIF Screen recorder)
multimedia Install gimp, darktable and kdenlive
gnome Configure the desktop environment
comms Install communication/Instant Messaging apps: signal-desktop, slack-desktop
aur Install Arch User Repository libraries
security Install clamav, clamtk, ufw, ufw-extras and gufw
virtualization Install vagrant, virtualbox and virtualbox-host-modules

Example on how to install only browsers:

ansible-playbook playbook.yml --extra-vars="user_name=USERNAME user_git_name=GIT_USERNAME user_email=EMAIL" --ask-become-pass --tags browsers

🚀 Instructions to install a new Manjaro image

1. Creating Bootable Linux USB Drive from the Command Line

Find out the name of the USB drive

lsblk

Flash the ISO image to the USB drive

dd bs=4M if=/path/to/iso of=/dev/sdx status=progress oflag=sync

Change boot order and install Manjaro.

2. Refresh pacaman mirrors, the copy of the master package database from the server and install ansible, git and xclip

After installing Manjaro, ensure that ansible, git and xclip are installed

sudo pacman-mirrors -f && sudo pacman -Syyu
sudo pacman -S ansible ansible-lint git xclip --noconfirm

3. Set Git SSH credentials

Generate a new SSH Key

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Start the ssh-agent in the background

eval "$(ssh-agent -s)"

Add SSH Key to the ssh-agent

ssh-add ~/.ssh/id_rsa

Copy the SSH public key to the clipboard

xclip -sel clip < ~/.ssh/id_rsa.pub

4. Git clone the current project

git clone git@github.com:PauloPortugal/manjaro-playbook.git
cd manjaro-playbook

☁️ Google Cloud Configuration

On the command line run

gcloud init
gcloud auth login

For more information about Gcloud command lines read https://cloud.google.com/sdk/gcloud

🚧 TODO

  1. It would be nice to include more audio-tools.