Skip to content

filwie/ground-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ground Control

WIP This repository contains:

  • Ansible roles for configuring development environment
  • Vagrantfiles for setting up development VMs with a single command
  • Tests!
  • Outdated README 😒

#TODO

  • 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 and Ubuntu:18.04

Usage

Running tests

Execute ./test.sh script and wait for a couple of hoursminutes expecting wonderfull colorful output:

demo

Vagrant

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.

GitHub

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.

Table of Contents

Roles

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.

arch_aur

  • Installs git, base-devel and python-pip packages which are required to build packages from AUR
  • Creates aur_builder user with privileges set to run sudo 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:

arch_bluetooth

  • Installs bluez, blueman and pulseaudio-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 use bluetooth
  • file containing polikit rule: /etc/polkit-1/rules.d/51-blueman.rules

Reference:

arch_locale

  • 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

arch_reflector

  • 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:

fonts

  • Installs fontconfig and unzip
  • Creates user's fonts directory (different for Mac OS and Linux)
  • Downloads and unarchives fonts
  • Refreshes font cache
  • Cleans up non-truetype fonts files

Defaults:

  • Fonts: Iosevka, Mononoki, Fantasque and Noto

Vars:

  • Linux font dir: ~/.local/share/fonts
  • Mac OS font dir: ~/Library/Fonts

Reference:

git

  • Installs git
  • Creates git config file
  • Places global gitignore in specified path
  • Installs neovim and python-neovim if nvim is set as git_core_editor

Defaults:

  • nvim as core editor, diff and merge tools
  • global gitignore path ~/.gitglobalignore

Issues

Meta tasks as handlers

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.

About

Fly me to the πŸŒ–

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published