WIP This repository contains:
- Ansible roles for configuring development environment
- Vagrantfiles for setting up development VMs with a single command
- Tests!
- Outdated README π’
- Add a fancy test runner with colorful output
- Add
Ansible Molecule
tests for each role - Write a good README for each role
- Support three distributions:
Arch
OpenSUSE Tumbleweed
andUbuntu:18.04
Execute ./test.sh
script and wait for a couple of hoursminutes expecting
wonderfull colorful output:
There are currently two supported distros (WIP): Arch Linux
and OpenSUSE Tumbleweed
.
Choose your destiny - navigate to appropriate path:
vagrant/
βββ arch
βΒ Β βββ Vagrantfile
βββ opensuse
βββ Vagrantfile
βββ init.sh
Run vagrant up --provision
in either arch
or opensuse
directory.
Ofcourse, vagrant
must be installed for this to work. Ansible does not have to, as
ansible_local
provisioner is used to provision the VMs.
To generate SSH keypair and add public key to GitHub set following environment
variables before running vagrant provison
(or vagrant up --provison
):
variable | contents |
---|---|
GITHUB_USERNAME |
self-explanatory |
GITHUB_TOKEN |
GitHub API token with permissions to manage SSH keys |
To remove generated key from GitHub account once again export above variables
and use varant destroy
- Vagrant should trigger github
role with delete
mode.
Default values can be found in roles' defaults
directories and can be overwritten on basically
any level: playbook
, inventory
, group/host vars
, extra-vars
etc.
- Installs
git
,base-devel
andpython-pip
packages which are required to build packages fromAUR
- Creates
aur_builder
user with privileges set to runsudo pacman
witbout providing password - Installs
yay
AUR
helper
Defaults
pacman
operation's timeout is set to 5 minutes which might sometimes be too short
Reference:
- Installs
bluez
,blueman
andpulseaudio-bluetooth
packages - Creates
wheel
group if it is nonexistant - Adds user to the group
- Creates
polkit
rule allowing aforementioned group's users access to bluetooth functions - starts and enables
bluetooth
service
Defaults:
wheel
as the group allowed to usebluetooth
- file containing polikit rule:
/etc/polkit-1/rules.d/51-blueman.rules
Reference:
- Generates specified locales
- Makes sure
libxkbcommon
package is installed (for setting x11 keymap) - Sets locale and keymap using
localectl
- Sets timezone
Defaults:
- locale
en_US.UTF-8
- keymap
pl
- timezone
Europe/Warsaw
- Installs
reflector
- creates
systemd
service and timer
Defaults:
- repositories are sorted once a week
- only HTTPS repositories are selected
- 100 most recently synchronized repositories are used
Reference:
- Installs
fontconfig
andunzip
- Creates user's fonts directory (different for
Mac OS
andLinux
) - Downloads and unarchives fonts
- Refreshes font cache
- Cleans up non-truetype fonts files
Defaults:
- Fonts:
Iosevka
,Mononoki
,Fantasque
andNoto
Vars:
- Linux font dir:
~/.local/share/fonts
- Mac OS font dir:
~/Library/Fonts
Reference:
- Installs git
- Creates git config file
- Places global gitignore in specified path
- Installs
neovim
andpython-neovim
ifnvim
is set asgit_core_editor
Defaults:
nvim
as core editor, diff and merge tools- global gitignore path
~/.gitglobalignore
Currently (as of Jul 3rd 2019) Ansible's meta tasks cannot be used as handlers, so
I added ignore_errors
to them. As soon as this
is implemented, that line can be deleted.
In case of below roles it is used primarely to reset SSH connection and allow new groups to be applied to the user.