6f005d48987c18ebc267676062037b852626428f
ansible_role_package
Manage package installation for a number of packages
that sometimes need special handling. Some are built from
source, some are appimages, some are special sources like
cargo, npm, go, etc.
When defining a workstation role, I had a lot of packages that needed special instructions to properly install and use. I decided to simplify the management of those packages by creating a role with special handling.
Order of precedence for package installation:
- System package manager (dnf, apt, homebrew, etc.)
- Appimage (Linux only)
- Flatpak (Linux only)
- Snap (Linux only), takes precedence over flatpak on Ubuntu based systems
- Language package manager (
cargo install,go install,npm install, etc.) - Build and install from source
This does not configure installed software, just installs it
Available Packages
- air
- alacritty
- ansible-language-server
- ansible-lint
- ansible
- bashls
- bat
- bitwarden
- blender
- broot
- btop
- buf
- bufls
- carapace
- cheat
- checkmake
- choose
- clangd
- cmake
- cmakelang
- commitlint-cli
- commitlint-config-conventional
- consul
- cssls
- curlie
- dbeaver
- dockerls
- dotenv-linter
- duf
- dust
- editorconfig
- eslint
- eza
- fd
- firefox
- flatpak
- fzf
- ghostty
- git
- glow
- go
- godot
- gopls
- gping
- heroic
- htmlls
- htmx-lsp
- httpie
- hugo
- hyperfine
- intelephense
- jinja-lsp
- jq
- jsonls
- kitty
- lazygit
- libreoffice
- lua-language-server
- markdownlint-cli
- mcfly
- neovide
- neovim
- nerdfonts
- nextcloud
- nginxls
- nodejs
- nomad
- nushell
- packer
- pandoc
- pgadmin
- pipx
- podman
- pyright
- python3-pip
- quobix-vacuum
- revive
- ripgrep
- rust
- sd
- sqlfluff
- sqlls
- starship
- stow
- tailscale
- tailwindcss-languageserver
- templ
- terra_repo
- terraform
- terraformls
- thunderbird
- tidy
- tldr
- tmux
- vault
- xh
- yamlls
- zfs
- zig
- zls
- zoxide
- zsh
Requirements
Role Variables
use_local: Boolean, defaulttrue- When
true, uses the following paths:$HOME/.localas the install prefix, placing binaries in$HOME/.local/bin$HOME/.local/appimagefor saved appimages, which are then linked to$HOME/.local/bin$HOME/.local/archivefor extracted archives linking binaries to$HOME/.local/bin$HOME/.cachefor caching downloads$HOME/.cargofor cargo installations, placing binaries in$HOME/.cargo/bin
- When
false, uses the following system wide paths:/usr/localas the install prefix, placing binaries in/usr/local/bin/opt/appimagefor saved appimages, which are then linked to/usr/local/bin/opt/archivefor extracted archives, linking binaries to/usr/local/bin/opt/cachefor caching downloads/opt/cargofor rust cargo installations, placing binaries in/opt/cargo/bin
- When
packages: List of strings- List of packages to install from the
Available Packageslist
- List of packages to install from the
prefer_method: String, defaultsystem- The preferred method of installation an application when multiple options exist
- Valid options are:
flatpak- Flatpak, Linux onlylangtool- Using language tools such ascargo,go,npmorpipxsnap- Snap, Linux onlysource- Prefer building from source. Not recommendedsystem- Default, system package manager (dnf, apt, homebrew, etc.)
Dependencies
Example Playbook
License
MIT
Author Information
- Matthew Stobbs matthew@stobbs.ca
Description
Ansible role to install various packages used on workstations and servers
https://git.sprouting.cloud/sprouting.cloud/ansible_role_package
Languages
Python
77.2%
Shell
12.2%
Jinja
10.6%