ansible-collection-devexp
An ansible collection for improved DEVelopment EXPerience.
This collections contains roles and plugins that I use for setting up my development workstations. You may also want to check out my ansible-ubuntu-workstation playbook that uses this collection for seting up Ubuntu-based workstations.
NB! This collection is still in early development, and while I do test things and it should mostly work fine, there could be breaking changes between versions until initial stable release
Roles
ansible
- installs ansible with some additional ansible-related packagesbase
- a base role that ensures some "default" system packagescli.dotfiles
- sets up my dotfilesdesktop.gnome
- configures the Gnome Desktop Environment- this role currently does not handle gnome extensions as I haven't found a good way to install most of the extensions I use programmatically
docker
- installs dockerlsp
- installs various language servers locallynpm
- installs nodejs via nvm or nfmnvim
- installs neovim with vim-plug and set it as a default alternative forex
,vi
,vim
, and similar commandspython
- installs python with some additional packagessdkman
- installs sdkman
It is worth noting that all roles can be used independently of each other and there are no dependencies between individual roles.
Configurable Variables
See each role's individual defaults/main.yml
file for a list of configurable variables
Supported OS
This collection currently supports the following operating systems:
- Ubuntu 20.04 (and derivatives)
- Ubuntu 22.04 (and derivatives)
If a given role has different support than the default mentioned above, this is will be noted in the role's readme file.
Development
The following things need to be kept in mind when developing a new role or modifying existing one:
- all role variables (both
defaults
andvars
) are prefixed with the role name, e.g.base_packages
,sdkman_dir
- "internal" (private) variables that shouldn't be exposed are additionally prefixed with
_
, e.g._sdkman_selfupdate
- "internal" (private) variables that shouldn't be exposed are additionally prefixed with
- a role should usually be tested with molecule, targeting all supported OSes
Testing
Requirements
- molecule>=4.0.4
molecule-plugins[docker]
To run tests for all roles: molecule test
To run tests only for certain roles, tags are used in the converge.yml
playbook. Tests for given role(s) can be filtered out with: ANSIBLE_RUN_TAGS='ansible,base' molecule test
or molecule test -- --tags 'ansible,base'
(requires molecule-plugins>=23.4.0
due to issue with tags which was fixed in molecule-plugins/#120)