Files
ansible_role_package/README.md
2025-02-11 22:14:04 -07:00

172 lines
3.4 KiB
Markdown

# 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:
1. System package manager (dnf, apt, homebrew, etc.)
2. Appimage (Linux only)
3. Flatpak (Linux only)
4. Snap (Linux only), takes precedence over flatpak on Ubuntu based systems
5. Language package manager (`cargo install`, `go install`, `npm install`, etc.)
6. 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, default `true`
- When `true`, uses the following paths:
- `$HOME/.local` as the install prefix, placing binaries in `$HOME/.local/bin`
- `$HOME/.local/appimage` for saved appimages, which are then linked to `$HOME/.local/bin`
- `$HOME/.local/archive` for extracted archives linking binaries to `$HOME/.local/bin`
- `$HOME/.cache` for caching downloads
- `$HOME/.cargo` for cargo installations, placing binaries in `$HOME/.cargo/bin`
- When `false`, uses the following system wide paths:
- `/usr/local` as the install prefix, placing binaries in `/usr/local/bin`
- `/opt/appimage` for saved appimages, which are then linked to `/usr/local/bin`
- `/opt/archive` for extracted archives, linking binaries to `/usr/local/bin`
- `/opt/cache` for caching downloads
- `/opt/cargo` for rust cargo installations, placing binaries in `/opt/cargo/bin`
- `packages`: List of strings
- List of packages to install from the `Available Packages` list
- `prefer_method`: String, default `system`
- The preferred method of installation an application when multiple options exist
- Valid options are:
- `flatpak` - Flatpak, Linux only
- `langtool` - Using language tools such as `cargo`, `go`, `npm` or `pipx`
- `snap` - Snap, Linux only
- `source` - Prefer building from source. **Not recommended**
- `system` - Default, system package manager (dnf, apt, homebrew, etc.)
## Dependencies
## Example Playbook
## License
MIT
## Author Information
- Matthew Stobbs <matthew@stobbs.ca>