WIP: migrate every package to a single file style #1

Draft
stobbsm wants to merge 48 commits from move_to_single_file_pkgs into main
373 changed files with 3883 additions and 9963 deletions

0
.ansible/.lock Normal file
View File

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.galaxy_install_info .galaxy_install_info
.lock

View File

@@ -2,108 +2,140 @@
## Package definition ## Package definition
Package defintions are just `yaml` tasks in the directory A "package" is just a yaml task list that defines how to install a piece of software.
`tasks/pkgs`, which handle how a package is installed. It does this through the use of `helpers` that manage;
Most can be installed using the `syspkgs` list, and are simply - dependency installations
appending the package name to said list based on the system. - building from source
- linking binaries to a usable `PATH`
- calling external tools when required
- installation via package managers on the system
If a package can be installed via an entry to `syspkgs` for some, ## Anatomy of a Package Definition
but not all platforms, handling is done to either inform the user
that the package is not available, or to append the package name
to another installation method such as:
- `appimages` to install the appimage of a package It starts with package metadata, as a comment block above the installation steps.
- `cargopkgs` to install via the rust cargo package manager This should come after the line `# vim: set filetype=yaml.ansible :`, which sets
- `cargoversioned` to install version lockec cargo packages up the correct linter and language server when using neovim/vim.
- `caskpkgs` to install a homebrew cask
- `flatpkgs` to install flatpaks
- `gopkgs` to install using the `go install` command
- `npmpkgs` to install packages from npm
- `pipxpkgs` to install packages from Python pip
- `srcpkgs` to build packages from source
- `tappkgs` to install packages from home brew taps
Alternative sources of packages can be defined with entries to: ### Metadata
- `fpremotes` to add a flatpak remote The metadata consists of `key: value` pairs, at minimum requiring:
- `brewtaps` to add a homebrew tap
### Adding system level repositories
Many packages exist in their own external repository for the
given system, such as `/etc/yum.repos.d` for RedHat based linux
distros, `/etc/apt/sources.list.d` for Debian based distros and
others. Since you an add the package to `syspkgs` by enabling a
repo, the coresponding task in `tasks/pkgs` should take the
steps needed to enable the repository.
### Packages with multiple instllation methods
Many packages can be installed in different ways, like the
`bitwarden` package. `bitwarden` can be installed as a `syspkg`
on some machines, a `caskpkg` on macOS, an `appimage`, a `flatpak`
or even a `snap`.
For such packages, a default is chosen to install, in the following order
of precedence: `syspkgs`, `flatpkgs`, `snappkgs`, `appimages`.
In that order, `syspkgs` and `caskpkgs` have equal weight, as it applies
to macOS.
## Formatting rules
- Use indentation explicitness. Lists should be indented:
```yaml ```yaml
# Good # Package: <package name>
my_good_list: # Description: <package description>
- my_list_item # Version: <latest supported version of package. 'latest' is fine>
# Methods: <list of available methods for installation>
# Bad # Helpers: <list of helpers used by the package directly>
my_bad_list: # Maintainers: <list of maintainers for this package>
- my_list_item
``` ```
This list should match package defaults where it makes sense, for example,
the `Version:` should match the default installed version of the package.
- Variables should be in snake case, separating words ### Default configuration
- Short names are fine if they are explicit. ie `vers` can be used instead of `version`
- If more then one variable starts with the same words, put it into a dict if it makes sense: Default, non-computed configuration must exist in `vars/main.yml`, generally consisting of
the default version, urls, internal dependencies (internal to Ansible package manager) and
list of files installed after a build, without the `install_prefix`.
When adding default configuration, it MUST match the following:
- Surround the configuration in `# {{{ <package> configuration` and `# }}}`
- Where "package" is the name of the package
- Prefix the configuration with the name of the package, using snake case
- Example: `alacritty_version: v0.16.1`
- This keeps the configuration unique per package, and allows for the defaults
to be overridden where needed.
The things that should be in the default configuration, if relevant, are:
- Default version, as `<package>_version`
- Git repository for pulling the source as `<package>_git_repo`
- Archive URL as `<package>_archive_url`
- Internal dependecies as `<package>_pkg_deps: <list of internal dependencies>`
- Files installed when building from source as `<package>_build_files`
- Default compile flags for the build system.
- Example using cargo: `<package>_cargo_build_flags: <list of build flags>`
- Package build dependencies per ansible_os_family. These are only for system
packages that are required for building the package from source.
- Package runtime dependencies as `<package>_run_deps: <list of run dependencies>`
- These should only be system packages, not internal packages
### Configuration acknowledgement
The "Configuration acknowledgement" MUST be at the start of the yaml file,
and cover everything this package does. This is important for gating when
a package should be configured or not.
It looks like this, using the `air` package:
```yaml ```yaml
# variables that should be a dict - name: Start air configuration
cargo_locked: true
cargo_pkg: alacritty
# better to just be
cargo:
locked: true
pkg: alacritty
```
- Tasks **MUST** follow the convention in this example:
```yaml
- name: Capitalize first letter of name
when: when:
- each condition has it's own line - "'air' is not in __configured"
- (brackets around conditions with) or block:
(to show they are separate) - name: Configure air installation method
become: "{{ not use_local }}" # must be able to be used with use_local ...
become_user: # this should not be needed, but always follows become if it is
loop: "{{ my_loopable_list }}" - name: Finalize air configuration
loop_control: # **MUST** always use at least loop_var for any loop ansible.builtin.set_fact:
loop_var: my_item __configured: "{{ __configured | combine( { 'air': true } ) }}"
ansible.builtin.set_fact: # always use the full module name
...
``` ```
- `name`: Every task needs a name, and the first letter must be capitalized This way, if a package is included as part of another packages build, it only happens once.
- `when`: If a when clause exists, it follows the name
- Each clause must have it's own line, including and `or` clause, as seen above
- `become`: must follow the when clause if it exists, name otherwise
- Any other `become_` settings follow `become` in alphabetical order
- `loop`: must be defined just before the module invocation
- Every loop needs to rename the `loop_var` to something that makes sense
- `until` is consider the same as `loop` for the purposes of placement
- The last item must be the module invocation, using the fully qualified name
- For example, don't use `set_fact:`, use `ansible.builtin.set_fact:`
### Setting and adding package configuration to list
Adding the configuration for a package is done by appending the configuration to the
appropriate list. Each helper has it's own installation block in `tasks/main.yml`.
Depending on the package installation method, the package must be added to the
appropriate list.
#### Different lists, and when to use them
The following is a list of the different lists that are used, and the
order they are run.
##### System packages
pkg_sys: List of system package manager packages to install
- Installed using `ansible.builtin.package`
- Installs the entire gathered list of packages at once, instead of looping over single items.
- The package list is made unique by applying the `unique` filter to the list
##### Archive packages
Archive packages are binaries installed by extracting an archive and linking the files
in place (usually in `<install_prefix>/bin`).
- Archives are kept in a cache after download, unless `clean_cache` is `true`
- Extracted archives are placed in `<install_prefix>/archive/<name>`
- Archive files are linked to the appropriate place under `install_prefix`, as dictated by
the `pkg.links` list, where `pkg` is the top level dict object of the archive
2. pkg_archive: List of packages installed via archive, like `go`
- Loops over list of archives and downloads, extracts and links them before moving
on to the next.
3. Linux only packages. Flatpaks, appimages, and snapcraft packages.
- Flatpaks: use the lists `flatpak_remotes` and `pkg_flatpak`
- `flatpak_remotes` is a list of dicts containing the flatpak remote configurations
- Managed using `community.general.flatpak_remote` ansible module.
- Format is:
```yaml
remote:
name: <remote name>
url: <flatpakrepo url>
method: <optional. Default 'system'>
```
- `pkg_flatpak` is a list of dicts describing how to install a flatpak
- Managed using `community.general.flatpak` ansible module.
- Format is:
```yaml
flatpak:
name: <flatpak name>
remote: <remote to install from>
method: <optional. Default 'system'>
state: <optional. Default 'present'>
```

286
README.md
View File

@@ -1,4 +1,5 @@
# ansible_role_package # Ansible package manager
## _A ports like system for ansible_
Manage package installation for a number of packages Manage package installation for a number of packages
that sometimes need special handling. Some are built from that sometimes need special handling. Some are built from
@@ -10,14 +11,16 @@ special instructions to properly install and use. I decided to
simplify the management of those packages by creating a role with simplify the management of those packages by creating a role with
special handling. special handling.
_The following are for general use. Not all packages have a candidate for system package managers_
Order of precedence for package installation: Order of precedence for package installation:
1. System package manager (dnf, apt, homebrew, etc.) 1. System package manager (dnf, apt, homebrew, etc.)
2. Source built - only in some situations, like for fast moving software (neovim) 2. Source built - only in some situations, like for fast moving software (neovim, hyprland)
3. Appimage (Linux only) - Includes language package managers like `go install`, `cargo install`, and `npm install`
4. Flatpak (Linux only) 3. Flatpak (Linux only)
5. Snap (Linux only), takes precedence over flatpak on Ubuntu based systems 4. Snap (Linux only)
6. Language package manager (`cargo install`, `go install`, `npm install`, etc.) 5. Appimage (Linux only)
_This does not configure installed software, just installs it_ _This does not configure installed software, just installs it_
@@ -26,145 +29,144 @@ To install any of the available packages, they must be part of a list called
## Supported Operating Systems ## Supported Operating Systems
- Fedora Linux - Fedora Linux _first class support_
- MacOS - MacOS _best effort_
- RHEL based distributions *Experimental* *best effort* - RHEL based distributions _Experimental, best effort_
- Debian *Experimental* - Debian _Experimental, best effort_
- Alpine linux *Experimental* *best effort) - Alpine linux _Experimental, best effort_
## Available Packages ## Available Packages
- air: hot reload for go #development - air: hot reload for go _default method_ **source**
- alacritty: terminal built in rust #gui - alacritty: terminal built in rust _default method_ **source**
- ansible-lint: linting for yaml.ansible files #development #mangement - ansible-lint: linting for yaml.ansible files _default method_ **pipx**
- ansible: configuration management #management - ansible: configuration management _default method_ **system**
- ansible_ls: ansible language-server #development - ansible_ls: ansible language-server
- aquamarine: graphics library for hyrpland #hyprland #linux #gui - aquamarine: graphics library for hyrpland _default method_ **source**
- bashls: bash language server #development - bashls: bash language server
- bat: bat, an ehanced replacement for cat #cli - bat: bat, an ehanced replacement for cat
- bitwarden: password mananger #gui #security - bitwarden: password mananger
- blender: 3d modeling, video editing tools #gui #media - blender: 3d modeling, video editing tools
- broot: a file browser/manager for the cli #cli - broot: a file browser/manager for the cli
- btop: advanced top replacement #cli #management - btop: advanced top replacement
- buf: protocol buffer tooling in go #development - buf: protocol buffer tooling in go
- bufls: protocol buffer language server #development - bufls: protocol buffer language server
- carapace: universal command completion engine #cli - carapace: universal command completion engine
- cheat: cli cheatsheet creator and viewer #cli - cheat: cli cheatsheet creator and viewer
- checkmake: a linter and analyzer for makefiles #development - checkmake: a linter and analyzer for makefiles
- choose: an alternative to cut written in rust #cli - choose: an alternative to cut written in rust
- clangd: the LLVM based C/C++ compiler, langauge server and linter #development - clangd: the LLVM based C/C++ compiler, langauge server and linter
- cmake: build system for C/C++ projects #development - cmake: build system for C/C++ projects
- cmakelang: cmake linter and formatter #development - cmakelang: cmake linter and formatter
- cockpit: webui to managed linux systems #management - cockpit: webui to managed linux systems
- commitlint-cli: linting for git commit messages #development - commitlint-cli: linting for git commit messages
- commitlint-config-conventional: config for commitlint-cli #development - commitlint-config-conventional: config for commitlint-cli
- consul: service discovery by hashicorp #hashicorp #service - consul: service discovery by hashicorp
- cssls: css language server #development - cssls: css language server
- curlie: enhanced version of curl #cli #network - curlie: enhanced version of curl
- dbeaver: database manager gui #development #gui - dbeaver: database manager gui
- direnv: load .env files in the cli #development #mangement - direnv: load .env files in the cli
- dockerls: dockerfile lanaguage server #development - dockerls: dockerfile lanaguage server
- dotenv-linter: linter for .env files #development - dotenv-linter: linter for .env files
- duf: a good looking replacement for df #cli #management - duf: a good looking replacement for df
- dust: a better looking version of du #cli #management - dust: a better looking version of du
- editorconfig: common editor configuration system #development - editorconfig: common editor configuration system
- eslint: ECMA Script linting #development - eslint: ECMA Script linting
- eza: a modern ls replacement #cli - eza: a modern ls replacement
- fd: a modern replacement for find #cli - fd: a modern replacement for find
- firefox: a modern OSS web browser #gui - firefox: a modern OSS web browser
- firewalld: modern zone based firewall #cli #management #security - firewalld: modern zone based firewall
- flatpak: universal linux package management system #cli #linux #management - flatpak: universal linux package management system
- fzf: fuzzy find from a list given over stdin #cli - fzf: fuzzy find from a list given over stdin
- ghostty: a modern advanced terminal emulator #gui - ghostty: a modern advanced terminal emulator
- git: project versioning system #development #management - git: project versioning system _default method_ **system**
- glow: cli markdown parser and viewer #cli - glow: cli markdown parser and viewer
- go: the go programming language #development - go: the go programming language _default method_ **archive**
- godot: the best OSS game making studio/engine #development #gui - godot: the best OSS game making studio/engine
- gopls: the go language server #development - gopls: the go language server
- gping: graphical pinging on the cli #cli #management - gping: graphical pinging on the cli
- greetd: a simple system greeter #cli #linux #gui #hyprland - greetd: a simple system greeter
- heroic: heroic games launcher #gui #linux - heroic: heroic games launcher
- htmlls: html language server #development - htmlls: html language server
- htmx-lsp: htmx language server #developement - htmx-lsp: htmx language server
- httpie: a graphical REST client #development #gui - httpie: a graphical REST client
- hugo: static html site generator #cli #development - hugo: static html site generator
- hyperfine: a cli benchmarking tool #cli - hyperfine: a cli benchmarking tool
- hyprcursor: a hyprland support library #hyprland - hyprcursor: a hyprland support library
- hyprgraphics: a hyrpland graphics library #hyprland - hyprgraphics: a hyrpland graphics library
- hypridle: hyprland system idle monitor #hyprland - hypridle: hyprland system idle monitor
- hyprland: a pretty tiling window manager #hyprland #linux #gui - hyprland: a pretty tiling window manager
- hyprland_protocols: a hyprland wayland protocol library #hyprland - hyprland_protocols: a hyprland wayland protocol library
- hyprland_qt_support: hyprland qt libraries #hyprland - hyprland_qt_support: hyprland qt libraries
- hyprland_qtutils: hyrpland tools in qt: #hyprland - hyprland_qtutils: hyrpland tools in qt
- hyprlang: hyprland configuration language #hyrpland - hyprlang: hyprland configuration language
- hyprlock: hyprland screen locker #hyprland - hyprlock: hyprland screen locker
- hyprpaper: hyprland wallpaper manager #hyprland - hyprpaper: hyprland wallpaper manager
- hyprpicker: hyprland colour picker #hyprland - hyprpicker: hyprland colour picker
- hyprpolkitagent: hyprland policy kit agent #hyprland #management #security - hyprpolkitagent: hyprland policy kit agent
- hyprutils: hyprland utilities library #hyprland - hyprutils: hyprland utilities library
- hyprwayland_scanner: hyprland wayland library scanner #hyprland - hyprwayland_scanner: hyprland wayland library scanner
- intelephense: php language server, linter and formatter #development - intelephense: php language server, linter and formatter
- jinja-lsp: the jinja language server #development - jinja-lsp: the jinja language server
- jq: json cli parser #cli #development - jq: json cli parser
- jsonls: json language server #development - jsonls: json language server
- kitty: high perfomance terminal emulator #gui - kitty: high perfomance terminal emulator
- lazygit: git made easy #git #cli #development - lazygit: git made easy
- libreoffice: the free office suite #gui - libreoffice: the free office suite
- luals: lua language server #development - luals: lua language server
- markdownlint-cli: markdown linter #development - markdownlint-cli: markdown linter
- mcfly: cli history manager #cli #management - mcfly: cli history manager
- minio_client: cli S3 client #cli #management - minio_client: cli S3 client
- neovide: graphical interface for neovim in rust #development #gui - neovide: graphical interface for neovim in rust
- neovim: best vim fork ever #neovim #development #cli #development - neovim: best vim fork ever #neovim #development
- nerdfonts: fonts patched with icons and glyphs #cli #gui - nerdfonts: fonts patched with icons and glyphs
- nextcloud: nextcloud desktop sync client #gui #management - nfs_client: nfs client software
- nfs_client: nfs client software #management - nfs_server: nfs server software
- nfs_server: nfs server software #managment - nginxls: nginx configuration language server
- nginxls: nginx configuration language server #development - nodejs: javascript runtime engine
- nodejs: javascript runtime engine #javascript #cli #development - nomad: application orchestration by hashicorp
- nomad: application orchestration by hashicorp #hashicorp #management - nwg_hello: a greetd greeter
- nwg_hello: a greetd greeter #gui #linux #hyprland - packer: machine builder by hashicorp
- packer: machine builder by hashicorp #vm #development #hashicorp #management - pandoc: universal document translator
- pandoc: universal document translator #cli - pgadmin: postgresql administration gui
- pgadmin: postgresql administration gui #development #development #gui - pipx: install pip packages as self contained executables
- pipx: install pip packages as self contained executables #cli #management - podman: container runtime engine compatible with docker
- podman: container runtime engine compatible with docker #cli #mangement - pulumi: infrastructure as code via regular programming languages
- pulumi: infrastructure as code via regular programming languages #cli #development #manage - pyright: python language server, linter and formatter
- pyright: python language server, linter and formatter #development - python3: python3 language interpreter
- python3: python3 language interpreter #development - quobix-vacuum: openapi linter and sdk written in go
- quobix-vacuum: openapi linter and sdk written in go #development - restic: an advanced backup system
- restic: an advanced backup system #management - revive: a fast and strict linter for go
- revive: a fast and strict linter for go #development - ripgrep: fast modern grep replacement
- ripgrep: fast modern grep replacement #cli - rust: the rust programming language
- rust: the rust programming language #development #cli - samba_client: client software for samba
- samba_client: client software for samba #management - samba_server: server software for samba
- samba_server: server software for samba #management - sd: a modern replacement for sed
- sd: a modern replacement for sed #cli - sdbus_cpp_2: systemd dbus library version 2
- sdbus_cpp_2: systemd dbus library version 2 #development #hyprland - sqlfluff: sql linter
- sqlfluff: sql linter #development - sqlls: sql language server
- sqlls: sql language server #development - starship: command line prompt generator
- starship: command line prompt generator #cli - stow: manage dotfiles easily
- stow: manage dotfiles easily #cli #management - tailscale: p2p vpn with wireguard
- tailscale: p2p vpn with wireguard #security #cli #gui - tailwindcss-languageserver: tailwindcss language server
- tailwindcss-languageserver: tailwindcss language server #development - templ: generate HTML using go
- templ: generate HTML using go #go #html #development - terraform: infrastructre as code via configuration files
- terraform: infrastructre as code via configuration files #cli #hashicorp #management - terraformls: terraform language server
- terraformls: terraform language server #development #hashicorp - thunderbird: email client from mozilla
- thunderbird: email client from mozilla #gui - tidy: html linter and formatter
- tidy: html linter and formatter #development - tldr: manpage summarizer
- tldr: manpage summarizer #cli - tmux: terminal multiplexer
- tmux: terminal multiplexer #cli - uwsm: universal wayland system manager
- uwsm: universal wayland system manager #hyprland #linux #gui - vault: secrets management by hashicorp
- vault: secrets management by hashicorp #security #hashicorp - xdg_desktop_portal_hyprland: xdg portal for hyprland
- xdg_desktop_portal_hyprland: xdg portal for hyprland #hyprland #gui #linux - xh: cli curl replacement
- xh: cli curl replacement #cli #network - yamlls: yaml language server
- yamlls: yaml language server #development - yazi: terminal file manager in rust _default method_ **source**
- yazi: terminal file manager in rust #cli #management - zfs: the zetabyte filesystem
- zfs: the zetabyte filesystem #filesystem #cli - zig: the zig programming language
- zig: the zig programming language #development - zls: the zig language server
- zls: the zig language server #development - zoxide: easily jump between directories
- zoxide: easily jump between directories #cli #management - zsh: Z shell
- zsh: Z shell #cli
## Requirements ## Requirements

View File

@@ -1,13 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Depend terra repo
ansible.builtin.include_tasks:
file: repos/terra.yml
- name: Depend hashicorp repo
ansible.builtin.include_tasks:
file: repos/hashicorp.yml
- name: Depend zfs repo
ansible.builtin.include_tasks:
file: repos/zfs.yml

141
library/go_install.py Normal file
View File

@@ -0,0 +1,141 @@
#!/usr/bin/python
# Copyright: (c) 2026, Matthew Stobbs <matthew@sprouting.cloud>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
---
module: go_install
short_description: Manage the installation and removal of go packages
description: Manage the installation and removal of go packages using `go install`
options:
name:
description:
- Name of the go package without the module part.
- This is the name of the executable that is installed in `bin`.
required: true
type: str
module:
description:
- The full module name (example.org/path/to/module)
- Only required if state != 'absent'
required: false
type: str
version:
description:
- The version of the module to install.
- Do not set this to '/v2' if you are using a '/v2' module, normally just latest.
- Defaults to 'latest'
required: false
type: str
state:
description:
- One of either 'present', 'latest' or 'absent'.
- Defaults to 'present'
require: false
type: str
author:
- Matthew Stobbs <matthew@sprouting.cloud>
'''
EXAMPLES = r'''
# Install the 'air' package at the latest version
- name: Install package 'air'
go_install:
name: air
module: github.com/air-verse/air
state: latest
# Remove the 'air' package
- name: Install package 'air'
go_install:
name: air
state: absent
# Install the 'pgx' package of /v5
- name: Install package 'pgx'
go_install:
name: pgx
module: github.com/jackc/pgx/v5
# Install the 'templ' package at a specific version
- name: Install package 'templ' at version 0.3.906
go_install:
name: templ
module: github.com/a-h/templ/cmd/templ
version: v0.3.906
'''
RETURN = r'''
# After installing air
result: "installed github.com/air-verse/air@latest to /usr/local/bin/air"
# After removing air
result: "removed /usr/local/bin/air"
'''
from ansible.module_utils.basic import AnsibleModule
def run_module():
# define available arguments/parameters a user can pass to the module
module_args = dict(
name=dict(type='str', required=True),
module=dict(type='str', required=False, default="")
version=dict(type='str', required=False, default="latest")
state=dict(type='str', required=False, default="present")
)
# seed the result dict in the object
# we primarily care about changed and state
# changed is if this module effectively modified the target
# state will include any data that you want your module to pass back
# for consumption, for example, in a subsequent task
result = dict(
changed=False,
result=''
)
# the AnsibleModule object will be our abstraction working with Ansible
# this includes instantiation, a couple of common attr would be the
# args/params passed to the execution, as well as if the module
# supports check mode
module = AnsibleModule(
argument_spec=module_args,
supports_check_mode=True
)
# if the user is working with this module in only check mode we do not
# want to make any changes to the environment, just return the current
# state with no modifications
if module.check_mode:
module.exit_json(**result)
# manipulate or modify the state as needed (this is going to be the
# part where your module will do what it needs to do)
result['result'] = module.params['name']
# use whatever logic you need to determine whether or not this module
# made any modifications to your target
if module.params['new']:
result['changed'] = True
# during the execution of the module, if there is an exception or a
# conditional state that effectively causes a failure, run
# AnsibleModule.fail_json() to pass in the message and the result
if module.params['name'] == 'fail me':
module.fail_json(msg='You requested this to fail', **result)
# in the event of a successful module execution, you will want to
# simple AnsibleModule.exit_json(), passing the key/value results
module.exit_json(**result)
def main():
run_module()
if __name__ == '__main__':
main()

View File

@@ -5,37 +5,149 @@ argument_specs:
short_description: Install software using ansible short_description: Install software using ansible
description: description:
- Make the installation of packages consistent on each platform. - Make the installation of packages consistent on each platform.
- Installs for RedHat, Debian and MacOS based systems. - Will install via system package managers, source, or specific install tool. For example, a go package installed via source will run `go install`.
author: maintainers:
- Matthew Stobbs <matthew@stobbs.ca> - Matthew Stobbs
options: options:
use_local:
type: bool
default: true
required: false
description:
Install packages using the current users
`$HOME/.local` directory as the install prefix.
When `false`, uses the system wide `/usr/local`
as the install prefix, and stores other parts
(appimages, extracted archives, cache) in the
appropriate path starting with `/opt`.
packages: packages:
type: list type: list
elements: str elements: str
required: true required: true
description: | description:
The list of packages to install by name. - List of packages to install using this role's package name.
The list must contain only values that exist in - See README.md for the list of available packages.
`Available Packages` in `README.md` install_become:
prefer_method: type: bool
default: true
description:
- Install packages using privilege elevation.
install_become_user:
type: bool
default: root
description:
- User to become when install_become is true.
imethod:
type: str
default: system
description:
- Install packages using system package manager when available.
- When a package doesn't have a system install candidate for the host,
it uses it's default install method as defined in the pkglist variables called `<pkgname>_install_methods`
- Most packages will be either `system` or `source` installs.
- System installs default to using the system package manager, if possible.
- Source installs download, build and install the package via source code.
Source installs could be of different types based on the language.
For example; python packages installed using `source` are installed with either pipx (default) or system pip.
choices:
- system
- source
python_package_method:
type: str
default: pipx
description:
- How to install pip packages.
choices:
- pipx
- system
install_prefix:
type: str
required: false
default: /usr/local
description:
- The prefix to use for non-system package installs.
- All package files will be installed using the directory prefixed by this prefix.
extra_ldd_paths:
type: list
elements: path
required: false
default: []
description:
- Paths to add to the ld.so.conf path list. Will create a file in `/etc/ld.so.conf.d/` on most systems.
packages:
type: list
elements: str
required: true
description:
- The list of packages to install by name.
- The list must contain only values that exist in B(Available Packages) in README.md
packages_extra:
type: list
elements: str
required: false
default: []
description:
- Extra system packages by installation name to install using the system package manager
- These are installed directly using the system package manager
flatpak_default_remote:
type: str
required: false
default: flathub
description:
- the Default remote name to use with flatpak installation.
flatpak_method:
type: str type: str
required: false required: false
default: system default: system
choices: description:
- flatpak - Default installation method for flatpaks.
- langtool - Possible values are 'system' and 'user'.
- snap - Only applies to linux distros.
- source flatpak_remotes:
- system type: list
elements: dict
required: false
default:
- name: flathub
url: https://dl.flathub.org/repo/flathub.flatpakrepo
description:
- List of flatpak remotes to add to the system.
- Does not remove pre existing flatpak repos.
clean_install:
type: bool
default: false
description:
- Remove existing installation of package before installing.
path_appimage:
type: path
default: /usr/local/appimage
description:
- Where appimage files are stored.
path_archive:
type: path
default: /usr/local/archive
description:
- Where archives are extracted.
path_bin:
type: path
default: /usr/local/bin
description:
- Where binaries are installed or linked.
- Needs to be added to your PATH to be usable.
path_cargo:
type: path
default: /usr/local/cargo
description:
- Where cargo installs it's packages
path_go:
type: path
default: /usr/local/go
description:
- Where go is installed. Equivalent of GOROOT.
path_pipx:
type: path
default: /usr/local/pipx
description:
- Where pipx installs it's virtual environments
store_path:
type: path
default: /<ansible_user_dir>/.cache/ansible_role_package
required: false
description:
- Where cached files are kept, such as git repositories.
- Packages that are compiled have their source extracted here.
clean_cache:
type: bool
default: false
description:
- Clean the V(store_path) after completing package install.
- Removes source code, archives and git repositories

View File

@@ -12,12 +12,10 @@ galaxy_info:
platforms: platforms:
- name: Fedora - name: Fedora
versions: versions:
- all - "41+"
- "40"
- "41"
- name: EL - name: EL
versions: versions:
- "9" - "9+"
- name: macOS - name: macOS
version: version:
- ">=14.2" - ">=14.2"

0
molecule.yml Normal file
View File

View File

@@ -1,5 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: "Add include task for {{ pkg }}"
ansible.builtin.include_tasks:
file: "pkgs/{{ pkg }}.yml"

View File

@@ -1,26 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Install appimage {{ pkg }}
become: "{{ ext_become }}"
block:
- name: Ensure appimage path exists
ansible.builtin.file:
path: "{{ path.appimage }}/{{ pkg.link_name }}"
mode: '0755'
state: directory
- name: Fetch appimage
become: "{{ ext_become }}"
ansible.builtin.get_url:
mode: '0755'
decompress: false
backup: true
url: "{{ pkg.url }}"
dest: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}"
- name: Link appimage to bin
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}"
path: "{{ path.bindir }}/{{ pkg.link_name }}"

View File

@@ -1,29 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Install neovim appimage
become: true
block:
- name: Create install dir
ansible.builin.file:
state: directory
mode: "0755"
path: "{{ nvim.instdir }}"
owner: "{{ pkgconfig_neovim.owner }}"
group: "{{ pkgconfig_neovim.group }}"
- name: Get neovim appimage
ansible.builtin.get_url:
mode: "0755"
decompress: false
backup: true
url: "{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage"
checksum: "sha256:{{ pkgconfig_neovim.appimage_url_pfx }}/{{ pkgconfig_neovim.version }}/nvim.appimage.sha256sum"
dest: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}"
owner: "{{ pkgconfig_neovim.owner }}"
group: "{{ pkgconfig_neovim.group }}"
- name: Link neovim appimage
ansible.builtin.file:
state: link
src: "{{ pkgconfig_neovim.install_dir }}/nvim.appimage.{{ pkgconfig_neovim.version }}"
path: "{{ pkgconfig_neovim.install_prefix }}/bin/nvim"

View File

@@ -1,59 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if go is already installed
ansible.builtin.stat:
path: "{{ path.go }}/bin/go"
register: stat_path_go
- name: Check installed go version
when:
- stat_path_go.stat.exists
block:
- name: Get installed version
register: r_go_version
ansible.builtin.command:
argv:
- "{{ path.go }}/bin/go"
- version
- name: Check if go needs updating
ansible.builtin.set_fact:
go_do_update: "{{ r_go_version.stdout.find(go.vers) == -1 }}"
- name: Install/update go
when:
- not stat_path_go.stat.exists or
go_do_update
block:
- name: Remove existing go install
when:
- ansible_system == 'Linux'
become: "{{ ext_become }}"
ansible.builtin.file:
state: absent
path: "{{ path.go }}"
- name: Download go archive
register: get_url_go
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ go.archive }}"
url: "{{ go.base_url }}/{{ go.archive }}"
checksum: "{{ go.sum }}"
decompress: false
mode: '0644'
- name: Extract go package for Linux
become: "{{ ext_become }}"
when:
- ansible_system == 'Linux'
ansible.builtin.unarchive:
dest: "{{ go.prefix }}"
src: "{{ d_tempdir.path }}/{{ go.archive }}"
remote_src: true
- name: Install go macOS using pkg file
become: true
when:
- ansible_distribution == 'MacOSX'
ansible.builtin.command:
cmd: "installer -pkg {{ d_tempdir.path }}/{{ go.archive }} -target {{ go.prefix }}"

View File

@@ -1,30 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Get latest lua-language-server
become: "{{ ext_become }}"
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ luals.archive }}"
url: "{{ luals.url }}/{{ luals.archive }}"
mode: "0644"
decompress: false
- name: Create install_path
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
path: "{{ path.archive }}/luals"
mode: "0755"
- name: Extract lua language server archive
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}/luals"
src: "{{ d_tempdir.path }}/{{ luals.archive }}"
remote_src: true
- name: Link lua language server binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
path: "{{ path.bin }}/lua-language-server"
src: "{{ path.archive }}/luals/bin/lua-language-server"

View File

@@ -1,29 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Linux installation
when: ansible_system == 'Linux'
block:
- name: Create nerdfonts directories
become: "{{ ext_become }}"
loop: "{{ nerdfonts.fonts }}"
loop_control:
loop_var: font
register: nerdfont_result
ansible.builtin.file:
path: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}"
state: directory
mode: '0755'
- name: Download and extract nerdfonts
when:
- nerdfont_result is changed or
nerdfonts.force_install
become: "{{ ext_become }}"
loop: "{{ nerdfonts.fonts }}"
loop_control:
loop_var: font
ansible.builtin.unarchive:
creates: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}/README.md"
src: "{{ nerdfonts.base_url }}/{{ pkgconfig.nerdfonts.fonts[font].archive | default(font) }}.tar.xz"
dest: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}"
remote_src: true

View File

@@ -1,15 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Download packer archive
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ packer.archive.file }}"
url: "{{ packer.archive.url }}/{{ packer.archive.file }}"
decompress: false
mode: '0644'
- name: Extract packer archive
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}/packer"
src: "{{ d_tempdir.path }}/{{ packer.archive.file }}"
remote_src: true

View File

@@ -1,31 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if pulumi is installed
register: stat_pulumi_inst
ansible.builtin.stat:
path: "{{ path.bin }}/pulumi"
- name: Install pulumi if not installed
when:
- not stat_pulumi_inst.stat.exists
block:
- name: Download pulumi archive
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ pulumi.archive }}"
url: "{{ pulumi.dlurl }}"
decompress: false
mode: '0644'
- name: Extract pulumi archive
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}"
src: "{{ d_tempdir.path }}/{{ pulumi.archive }}"
remote_src: true
- name: Link pulumi executable
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.archive }}/pulumi/pulumi"
path: "{{ path.bin }}/pulumi"

View File

@@ -1,38 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if terraform is already installed
register: r_terraform_inst
ansible.builtin.stat:
path: "{{ terraform.bin }}"
- name: Download and install terraform
when:
- not r_terraform_inst.stat.exists
block:
- name: Download terraform archive
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ terraform.archive }}"
url: "{{ terraform.url }}/{{ terraform.archive }}"
mode: '0644'
decompress: false
- name: Ensure vault archive dir exists
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
path: "{{ terraform.path }}"
mode: '0755'
- name: Extract terraform archive
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ terraform.path }}"
src: "{{ d_tempdir.path }}/{{ terraform.archive }}"
remote_src: true
- name: Link terraform executable
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ terraform.path }}/terraform"
path: "{{ terraform.bin }}"

View File

@@ -1,38 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if vault is already installed
register: r_vault_inst
ansible.builtin.stat:
path: "{{ vault.bin }}"
- name: Download and install vault
when:
- not r_vault_inst.stat.exists
block:
- name: Download vault archive
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ vault.archive }}"
url: "{{ vault.url }}/{{ vault.archive }}"
mode: '0644'
decompress: false
- name: Ensure vault archive dir exists
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
path: "{{ vault.path }}"
mode: '0755'
- name: Extract vault archive
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ vault.path }}"
src: "{{ d_tempdir.path }}/{{ vault.archive }}"
remote_src: true
- name: Link vault executable
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ vault.path }}/vault"
path: "{{ vault.bin }}"

View File

@@ -1,38 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if zig exists
ansible.builtin.stat:
path: "{{ path.archive }}/zig/{{ zig.path }}/zig"
register: r_zig_stat
- name: Update/install zig
when:
- not r_zig_stat.stat.exists
block:
- name: Download zig archive
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ zig.pkg }}"
url: "{{ zig.base_url }}/{{ zig.vers }}/{{ zig.pkg }}"
decompress: false
mode: '0644'
- name: Create zig archive dir
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path.archive }}/zig"
- name: Extract zig package
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}/zig"
src: "{{ d_tempdir.path }}/{{ zig.pkg }}"
remote_src: true
- name: Link zig binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.archive }}/zig/{{ zig.path }}/zig"
path: "{{ path.bin }}/zig"

View File

@@ -1,37 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Check if zls exists
ansible.builtin.stat:
path: "{{ path.archive }}/zls/{{ zls.path }}/zls"
register: r_zls_stat
- name: Update/install zls
block:
- name: Download zls archive
register: get_url_zls
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ zls.pkg }}"
url: "{{ zls.base_url }}/{{ zls.pkg }}"
decompress: false
mode: '0644'
- name: Create zls archive dir
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path.archive }}/zls/{{ zls.path }}"
- name: Extract zls package
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}/zls/{{ zls.path }}"
src: "{{ d_tempdir.path }}/{{ zls.pkg }}"
remote_src: true
- name: Link zls binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.archive }}/zls/{{ zls.path }}/zls"
path: "{{ path.bin }}/zls"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible
---
- name: Install cargo {{ pkg }}
become: "{{ ext_become }}"
environment:
RUSTONIG_SYSTEM_LIBONIG: 1
community.general.cargo:
name: "{{ pkg.name | default(pkg) }}"
version: "{{ pkg.vers | default(omit) }}"
path: "{{ path.cargo | default(path.prefix) }}"
locked: "{{ pkg.locked | default(omit) }}"

View File

@@ -1,18 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set alacritty install method
ansible.builtin.set_fact:
alacritty:
method: "{{ pkgconfig.alacritty.method[ansible_os_family] | default(pkgconfig.alacritty.method.default) }}"
- name: Set alacritty configuration
when:
- alacritty.method == 'cargo'
ansible.builtin.set_fact:
alacritty:
method: "{{ alacritty.method }}"
build_deps: "{{ srcconfig.alacritty.deps[ansible_os_family] }}"
cargo:
vers: "{{ pkgconfig.alacritty.version }}"
locked: true
name: alacritty

View File

@@ -1,10 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set aquamarine config
ansible.builtin.set_fact:
aquamarine:
bin: aquamarine
build_deps: "{{ srcconfig.aquamarine.deps[ansible_os_family] }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"
pkg_deps: "{{ pkgconfig.aquamarine.pkg_deps }}"
vers: "{{ pkgconfig.aquamarine.version }}"

View File

@@ -1,31 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set bitwarden install method for Linux
when:
- ansible_system == 'Linux'
ansible.builtin.set_fact:
bitwarden:
method: "{{ pkgconfig.bitwarden.method[ansible_distribution] | default('flatpak') }}"
- name: Set bitwarden install method for MacOSX
when:
- ansible_system == 'Darwin'
ansible.builtin.set_fact:
bitwarden:
method: cask
- name: Set bitwarden config
ansible.builtin.set_fact:
bitwarden:
method: "{{ bitwarden.method }}"
pkg: "{{ pkgconfig.bitwarden[bitwarden.method] }}"
- name: Set bitwarden config for appimage install
when:
- bitwarden.method == 'appimage'
ansible.builtin.set_fact:
bitwarden:
method: appimage
file: "{{ pkgconfig.bitwarden.appimage.name }}"
link_name: "{{ pkgconfig.bitwarden.appimage.link_name }}"
url: "{{ pkgconfig.bitwarden.appimage.url }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set broot config
ansible.builtin.set_fact:
broot:
vers: "{{ pkgconfig.broot.version }}"
name: broot
locked: true
deps: "{{ pkgconfig.broot.build_deps[ansible_os_family] }}"

View File

@@ -1,7 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set carapace config
ansible.builtin.set_fact:
carapace:
pkgs: "{{ pkgconfig.carapace.pkgs[ansible_os_family] }}"
repo: "{{ pkgconfig.carapace.repo[ansible_os_family] }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Load cbfmt configuration
ansible.builtin.include_tasks:
file: config/cbfmt.yml
- name: Append cbfmt to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + cbfmt.pkgs }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set choose config
ansible.builtin.set_fact:
choose:
name: choose
vers: "{{ pkgconfig.choose.version }}"
locked: true
choose_configured: true

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set clangd config
ansible.builtin.set_fact:
clangd:
pkgs: "{{ pkgconfig.clangd.pkgs[ansible_os_family] }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Load cmake-format configuration
ansible.builtin.include_tasks:
file: config/cmake-format.yml
- name: Append cmake-format to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + cmake_format.pkgs }}"

View File

@@ -1,7 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set cockpit configuration
ansible.builtin.set_fact:
cockpit:
enabled: true
pkgs: "{{ pkgconfig.cockpit.pkgs[ansible_os_family] | default([]) }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set configuration for consul
ansible.builtin.set_fact:
consul:
pkgs: "{{ pkgconfig.consul.pkgs[ansible_system] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set fd config
ansible.builtin.set_fact:
fd:
pkgs: "{{ pkgconfig.fd.pkgs[ansible_os_family] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Load firefox pkgconfig
ansible.bulitin.set_fact:
firefox:
method: "{{ pkgconfig.firefox.method[ansible_os_family] | default(pkgconfig.firefox.method.default) }}"

View File

@@ -1,42 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set ghostty install method
ansible.builtin.set_fact:
ghostty:
method: "{{ pkgconfig.ghostty.methods[ansible_distribution] | default(pkgconfig.ghostty.methods.default) }}"
- name: Set ghostty config
when:
- ghostty.method == 'src'
ansible.builtin.set_fact:
ghostty:
method: "{{ ghostty.method }}"
arch: "{{ pkgconfig.ghostty.archmap[ansible_architecture] }}"
clean: "{{ pkgconfig_ghostty_clean | default(package_default_clean_src) }}"
deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}"
vers: "{{ pkgconfig.ghostty.version }}"
pkg: "{{ pkgconfig.ghostty[ghostty.method] }}"
repo: "{{ pkgconfig.ghostty.git_repo }}"
build_deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}"
optimize: "{{ pkgconfig.ghostty.optimize }}"
installed_files: "{{ pkgconfig.ghostty.build_installed_files }}"
- name: Set ghostty package manager install
when:
- ghostty.method == 'sys' or
ghostty.method == 'cask'
ansible.builtin.set_fact:
ghostty:
method: "{{ ghostty.method }}"
pkg: "{{ pkgconfig.ghostty[ghostty.method] }}"
pkg_repo: "{{ pkgconfig.ghostty.pkg_repo[ansible_distribution] | default(omit) }}"
- name: Set ghostty config for appimage install
when:
- ghostty.method == 'appimage'
ansible.builtin.set_fact:
ghostty:
method: "{{ ghostty.method }}"
file: "Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage"
link_name: "{{ pkgconfig.ghostty.appimage.link_name }}"
url: "{{ pkgconfig.ghostty.appimage.base_url }}/v{{ ghostty.vers }}/Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set git config
ansible.builtin.set_fact:
git:
pkgs: "{{ pkgconfig.git.pkgs[ansible_os_family] }}"

View File

@@ -1,21 +0,0 @@
# vim: set filetype=yaml.ansible #
---
- name: Set gitea server version
ansible.builtin.set_fact:
gitea_server:
vers: "{{ pkgconfig.gitea_server.version }}"
- name: Set gitea server url and filename
ansible.builtin.set_fact:
gitea_server:
vers: "{{ gitea_server.vers }}"
url: "{{ pkgconfig.gitea_server.baseurl }}/{{ gitea_server.vers }}"
file: "gitea-{{ gitea_server.vers }}-{{ pkgconfig.gitea_server.os[ansible_system] }}-{{ pkgconfig.gitea_server.arch[ansible_architecture] }}"
- name: Set gitea server sha256sum url
ansible.builtin.set_fact:
gitea_server:
vers: "{{ gitea_server.vers }}"
url: "{{ gitea_server.url }}"
file: "{{ gitea_server.file }}"
sha256url: "sha256:{{ pkgconfig.gitea_server.baseurl }}/{{ gitea_server.vers }}/{{ gitea_server.file }}.sha256"

View File

@@ -1,23 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set go configuration
ansible.builtin.set_fact:
go:
method: archive
arch: "{{ pkgconfig.go.archmap[ansible_architecture] }}"
ext: "{{ pkgconfig.go.extmap[ansible_system] }}"
sys: "{{ ansible_system | lower }}"
vers: "{{ pkgconfig.go.version }}"
- name: Set go composite facts
ansible.builtin.set_fact:
go:
method: archive
arch: "{{ go.arch }}"
archive: "go{{ go.vers }}.{{ go.sys }}-{{ go.arch }}.{{ pkgconfig.go.extmap[ansible_system] }}"
ext: "{{ go.ext }}"
prefix: "{% if ansible_distribution == 'MacOSX' %}/{% else %}{{ path.prefix }}{% endif %}"
sum: "{{ pkgconfig.go.sums[go.vers][ansible_system][go.arch] }}"
sys: "{{ go.sys }}"
base_url: "{{ pkgconfig.go.base_url }}"
vers: "{{ go.vers }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set config for greetd
ansible.builtin.set_fact:
greetd:
pkgs: "{{ pkgconfig.greetd.pkgs[ansible_os_family] }}"

View File

@@ -1,15 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set OS name for RedHat family
when:
- ansible_os_family == 'RedHat'
ansible.builtin.set_fact:
hashicorp:
repo: "{{ pkgconfig.hashicorp.Linux[rpm_dist.stdout].repo }}"
- name: Set repo for debian
when:
- ansible_os_family == 'Debian'
ansible.builtin.set_fact:
hashicorp:
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set method for httpie
ansible.builtin.set_fact:
httpie:
method: "{{ pkgconfig.httpie.method[ansible_distribution] | default(pkgconfig.httpie.method.default) }}"
- name: Set config for httpie
ansible.builtin.set_fact:
httpie:
method: "{{ httpie.method }}"
pkg: "{{ pkgconfig.httpie[httpie.method] }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprcursor config
ansible.builtin.set_fact:
hyprcursor:
vers: "{{ pkgconfig.hyprcursor.version }}"
pkg_deps: "{{ pkgconfig.hyprcursor.pkg_deps }}"
build_deps: "{{ srcconfig.hyprcursor.deps[ansible_os_family] }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,8 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprgraphics config
ansible.builtin.set_fact:
hyprgraphics:
vers: "{{ pkgconfig.hyprgraphics.version }}"
build_deps: "{{ srcconfig.hyprgraphics.deps[ansible_os_family] }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hypridle config
ansible.builtin.set_fact:
hypridle:
vers: "{{ pkgconfig.hypridle.version }}"
repo: "{{ pkgconfig.hypridle.repo }}"
pkg_deps: "{{ pkgconfig.hypridle.pkg_deps }}"
build_deps: "{{ pkgconfig.hypridle.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hypridle.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hypridle"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,13 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprland config
ansible.builtin.set_fact:
hyprland:
vers: "{{ pkgconfig.hyprland.version }}"
repo: "{{ pkgconfig.hyprland.repo }}"
pkg_deps: "{{ pkgconfig.hyprland.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprland.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprland.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/Hyprland"
prefix: "/usr/local"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprland-protocols config
ansible.builtin.set_fact:
hyprland_protocols:
vers: "{{ pkgconfig.hyprland_protocols.version }}"
repo: "{{ pkgconfig.hyprland_protocols.repo }}"
build_deps: "{{ pkgconfig.hyprland_protocols.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprland_protocols.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprland-protocols"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprland_qt_support config
ansible.builtin.set_fact:
hyprland_qt_support:
vers: "{{ pkgconfig.hyprland_qt_support.version }}"
repo: "{{ pkgconfig.hyprland_qt_support.repo }}"
pkg_deps: "{{ pkgconfig.hyprland_qt_support.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprland_qt_support.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprland_qt_support.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprland_qt_support"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprland_qtutils config
ansible.builtin.set_fact:
hyprland_qtutils:
vers: "{{ pkgconfig.hyprland_qtutils.version }}"
repo: "{{ pkgconfig.hyprland_qtutils.repo }}"
pkg_deps: "{{ pkgconfig.hyprland_qtutils.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprland_qtutils.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprland_qtutils.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprland_qtutils"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprlang config
ansible.builtin.set_fact:
hyprlang:
vers: "{{ pkgconfig.hyprlang.version }}"
repo: "{{ pkgconfig.hyprlang.repo }}"
pkg_deps: "{{ pkgconfig.hyprlang.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprlang.build_deps[ansible_os_family] }}"
git_path: "{{ d_tempdir.path }}/hyprlang"
installed_files: "{{ pkgconfig.hyprlang.build_installed_files }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprlock config
ansible.builtin.set_fact:
hyprlock:
vers: "{{ pkgconfig.hyprlock.version }}"
repo: "{{ pkgconfig.hyprlock.repo }}"
pkg_deps: "{{ pkgconfig.hyprlock.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprlock.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprlock.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprlock"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprpaper config
ansible.builtin.set_fact:
hyprpaper:
vers: "{{ pkgconfig.hyprpaper.version }}"
repo: "{{ pkgconfig.hyprpaper.repo }}"
pkg_deps: "{{ pkgconfig.hyprpaper.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprpaper.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprpaper.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprpaper"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprpicker config
ansible.builtin.set_fact:
hyprpicker:
vers: "{{ pkgconfig.hyprpicker.version }}"
repo: "{{ pkgconfig.hyprpicker.repo }}"
pkg_deps: "{{ pkgconfig.hyprpicker.pkg_deps }}"
build_deps: "{{ pkgconfig.hyprpicker.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprpicker.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprpicker"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprpolkitagent config
ansible.builtin.set_fact:
hyprpolkitagent:
vers: "{{ pkgconfig.hyprpolkitagent.version }}"
repo: "{{ pkgconfig.hyprpolkitagent.repo }}"
build_deps: "{{ pkgconfig.hyprpolkitagent.build_deps[ansible_os_family] }}"
installed_files: "{{ pkgconfig.hyprpolkitagent.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/hyprpolkitagent"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyprutils config
ansible.builtin.set_fact:
hyprutils:
vers: "{{ pkgconfig.hyprutils.version }}"
repo: "{{ pkgconfig.hyprutils.repo }}"
git_path: "{{ d_tempdir.path }}/hyprutils"
installed_files: "{{ pkgconfig.hyprutils.build_installed_files }}"
build_deps: "{{ pkgconfig.hyprutils.build_deps[ansible_os_family] }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set hyperwayland-scanner config
ansible.builtin.set_fact:
hyprwayland_scanner:
vers: "{{ pkgconfig.hyprwayland_scanner.version }}"
repo: "{{ pkgconfig.hyprwayland_scanner.repo }}"
build_deps: "{{ pkgconfig.hyprwayland_scanner.build_deps[ansible_os_family] }}"
git_path: "{{ d_tempdir.path }}/hyprwayland-scanner"
installed_files: "{{ pkgconfig.hyprwayland_scanner.build_installed_files }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set kitty config
ansible.builtin.set_fact:
kitty:
pkgs: "{{ pkgconfig.kitty.pkgs[ansible_system] }}"

View File

@@ -1,8 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set libreoffice config
ansible.builtin.set_fact:
libreoffice:
method: "{{ pkgconfig.libreoffice.methods[ansible_distribution] | default(pkgconfig.libreoffice.methods.default) }}"
flatpak: "{{ pkgconfig.libreoffice.flatpak }}"
pkgs: "{{ pkgconfig.libreoffice.pkgs[ansible_os_family] }}"

View File

@@ -1,17 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set luals config
ansible.builtin.set_fact:
luals:
vers: "{{ pkgconfig.luals.version }}"
sys: "{{ pkgconfig.luals.sysmap[ansible_system] }}"
arch: "{{ pkgconfig.luals.archmap[ansible_architecture] }}"
- name: Set luals config
ansible.builtin.set_fact:
luals:
vers: "{{ luals.vers }}"
sys: "{{ luals.sys }}"
arch: "{{ luals.arch }}"
archive: "lua-language-server-{{ luals.vers }}-{{ luals.sys }}-{{ luals.arch }}.tar.gz"
url: "{{ pkgconfig.luals.base_url }}/{{ luals.vers }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set neovide config
ansible.builtin.set_fact:
neovide:
name: neovide
build_deps: "{{ pkgconfig.neovide.build_deps[ansible_os_family] }}"
vers: "{{ pkgconfig.neovide.version }}"
locked: true

View File

@@ -1,39 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set neovim install method
ansible.builtin.set_fact:
neovim:
method: "{{ pkgconfig.neovim.methods[ansible_distribution] | default(pkgconfig.neovim.methods.default) }}"
- name: Set neovim sys package manager config
when:
- neovim.method == 'sys'
ansible.builtin.set_fact:
neovim:
method: "{{ neovim.method }}"
pkgs: "{{ pkgconfig.neovim.pkgs[ansible_distribution] | default(pkgconfig.neovim.pkgs.default) }}"
- name: Set neovim src build config
when:
- neovim.method == 'src'
ansible.builtin.set_fact:
neovim:
method: "{{ neovim.method }}"
vers: "{{ pkgconfig.neovim.git_branch }}"
build_deps: "{{ pkgconfig.neovim.build_deps[ansible_os_family] }}"
git_repo: "{{ pkgconfig.neovim.git_repo }}"
git_path: "{{ d_tempdir.path }}/neovim"
git_branch: "{{ pkgconfig.neovim.git_branch }}"
build_type: "{{ pkgconfig.neovim.build_type }}"
clean: "{{ pkgconfig_neovim.clean | default(_pkgconfig_force_rebuild) }}"
installed_files: "{{ pkgconfig.neovim.build_installed_files }}"
- name: Set neovim config for appimage install
when:
- neovim.method == 'appimage'
ansible.builtin.set_fact:
neovim:
method: "{{ neovim.method }}"
file: "nvim-linux-{{ ansible_architecture }}.appimage"
link_name: nvim
url: "{{ pkgconfig.neovim.appimage.base_url }}/{{ neovim.vers }}/nvim-linux-{{ ansible_architecture }}.appimage"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set facts for nerdfonts
ansible.builtin.set_fact:
nerdfonts:
fonts: "{{ nerdfonts_install | default(pkgconfig.nerdfonts.default_install) }}"
path: "{{ pkgconfig.nerdfonts.path }}"
base_url: "{{ pkgconfig.nerdfonts.base_url }}"
force_install: "{{ pkgconfig.force_install_nerdfonts | default(false) }}"

View File

@@ -1,15 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set nextcloud install method
ansible.builtin.set_fact:
nextcloud:
method: "{{ pkgconfig.nextcloud.method | default('flatpak') }}"
- name: Set nextcloud config
when:
- nextcloud.method == 'flatpak'
ansible.builtin.set_fact:
nextcloud:
method: "{{ nextcloud.method }}"
name: "{{ pkgconfig.nextcloud.flatpak.name }}"
remote: "{{ pkgconfig.nextcloud.flatpak.remote }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure nfs_client
ansible.builtin.set_fact:
nfs_client:
pkgs: "{{ pkgconfig.nfs_client.pkgs[ansible_os_family] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure nfs_server
ansible.builtin.set_fact:
nfs_server:
pkgs: "{{ pkgconfig.nfs_server.pkgs[ansible_os_family] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set nodejs config
ansible.builtin.set_fact:
nodejs:
pkgs: "{{ pkgconfig.nodejs.pkgs[ansible_system] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set nomad config
ansible.builtin.set_fact:
nomad:
pkgs: "{{ pkgconfig.nomad.pkgs[ansible_system] }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set nwg-hello configuration
ansible.builtin.set_fact:
nwg_hello:
vers: "{{ pkgconfig.nwg_hello.version }}"
git_repo: "{{ pkgconfig.nwg_hello.git_repo }}"
installed_files: "{{ pkgconfig.nwg_hello.build_installed_files }}"
git_path: "{{ d_tempdir.path }}/nwg-hello"
build_deps: "{{ pkgconfig.nwg_hello.bulid_deps[ansible_os_family] }}"
clean: "{{ pkgconfig_nwg_hello_clean | default(package_default_clean_src) }}"

View File

@@ -1,25 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set packer config
ansible.builtin.set_fact:
packer:
method: "{{ pkgconfig.packer.method[ansible_system] | default(pkgconfig.packer.method.default) }}"
- name: Set packer config for system install
when:
- packer.method == 'sys' or
packer.method == 'tap'
ansible.builtin.set_fact:
packer:
method: "{{ packer.method }}"
pkgs: "{{ pkgconfig.packer.pkgs[ansible_system] }}"
- name: Set packer config for archive install
when:
- packer.method == 'archive'
ansible.builtin.set_fact:
packer:
method: "{{ packer.method }}"
archive:
file: "packer_{{ pkgconfig.packer.version }}_linux_amd64.zip"
url: "{{ pkgconfig.packer.archive.baseurl }}/packer/{{ pkgconfig.packer.version }}"

View File

@@ -1,8 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set pgadmin config
ansible.builtin.set_fact:
pgadmin:
method: "{{ pkgconfig.pgadmin.methods[ansible_distribution] | default(pkgconfig.pgadmin.methods.default) }}"
pkgs: "{{ pkgconfig.pgadmin.pkgs[ansible_system] }}"
flatpak: "{{ pkgconfig.pgadmin.flatpak }}"

View File

@@ -1,15 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set postgresql server install method
ansible.builtin.set_fact:
postgresql_server:
method: "{{ pkgconfig.postgresql_server.method[ansible_os_family] | default(pkgconfig.postgresql_server.method.default) }}"
vers: "{{ pkgconfig.postgresql_server.version }}"
- name: Set postgresql server config
when:
- postgresql_server.method == 'sys'
ansible.builtin.set_fact:
postgresql_server:
method: "{{ postgresql_server.method }}"
pkgs: "{{ pkgconfig.postgresql_server.pkgs[ansible_os_family][postgresql_server.vers] }}"

View File

@@ -1,14 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set pulumi config
ansible.builtin.set_fact:
pulumi:
vers: "{{ pkgconfig.pulumi.version }}"
archive: "pulumi-{{ pkgconfig.pulumi.version }}-{{ ansible_system | lower }}-{{ pkgconfig.pulumi.archmap[ansible_architecture] }}.tar.gz"
- name: Set pulumi config
ansible.builtin.set_fact:
pulumi:
vers: "{{ pulumi.vers }}"
archive: "{{ pulumi.archive }}"
dlurl: "{{ pkgconfig.pulumi.url_base }}/{{ pulumi.archive }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set python3 config
ansible.builtin.set_fact:
python3:
pkgs: "{{ pkgconfig.python3.pkgs[ansible_os_family] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set rust config
ansible.builtin.set_fact:
rust:
pkgs: "{{ pkgconfig.rust.pkgs[ansible_os_family] }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure samba_client
ansible.builtin.set_fact:
samba_client:
pkgs: "{{ pkgconfig.samba_client.pkgs[ansible_os_family] | default([]) }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure samba_server
ansible.builtin.set_fact:
samba_server:
pkgs: "{{ pkgconfig.samba_server.pkgs[ansible_os_family] }}"

View File

@@ -1,11 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set sdbus-cpp-2 config
ansible.builtin.set_fact:
sdbus_cpp_2:
vers: "{{ pkgconfig.sdbus_cpp_2.version }}"
repo: "{{ pkgconfig.sdbus_cpp_2.repo }}"
build_deps: "{{ pkgconfig.sdbus_cpp_2.build_deps[ansible_os_family] }}"
git_path: "{{ d_tempdir.path }}/sdbus-cpp"
prefix: "/usr/local"
clean: "{{ pkgconfig_sdbus_cpp_2_clean | default(package_default_clean_src) }}"

View File

@@ -1,7 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set tailscale config
ansible.builtin.set_fact:
tailscale:
url_base: "{{ pkgconfig.tailscale.url_base }}"
release: "{{ pkgconfig.tailscale.release[ansible_distribution_release] | default({}) }}"

View File

@@ -1,7 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure targetcli
ansible.builtin.set_fact:
targetcli:
pkgs: "{{ pkgconfig.targetcli.pkgs[ansible_os_family] | default([]) }}"
services: "{{ pkgconfig.targetcli.services[ansible_os_family] | default([]) }}"

View File

@@ -1,25 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set terraform install method
ansible.builtin.set_fact:
terraform:
method: "{{ pkgconfig.terraform.method[ansible_os_family] | default(pkgconfig.terraform.method.default) }}"
- name: Set terraform config
when:
- terraform.method == 'sys'
ansible.builtin.set_fact:
terraform:
method: "{{ terraform.method }}"
pkgs: "{{ pkgconfig.terraform.pkgs[ansible_system] }}"
- name: Set terraform archive config
when:
- terraform.method == 'archive'
ansible.builtin.set_fact:
terraform:
method: "{{ terraform.method }}"
archive: "terraform_{{ pkgconfig.terraform.version }}_{{ pkgconfig.terraform[sysmap] }}_{{ pkgconfig.terraform[archmap] }}.zip"
url: "{{ pkgconfig.terraform.archive.baseurl }}/{{ pkgconfig.terraform.version }}"
path: "{{ path.archive }}/terraform"
bin: "{{ path.bin }}/terraform"

View File

@@ -1,22 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set terraformls install method
ansible.builtin.set_fact:
terraformls:
method: "{{ pkgconfig.terraformls.method[ansible_os_family] | default(pkgconfig.terraformls.method.default) }}"
- name: Set terraformls config
when:
- terraformls.method == 'sys'
ansible.builtin.set_fact:
terraformls:
method: "{{ terraformls.method }}"
pkgs: "{{ pkgconfig.terraformls.pkgs[ansible_system] }}"
- name: Set terraformls config
when:
- terraformls.method == 'gosrc'
ansible.builtin.set_fact:
terraformls:
method: "{{ terraformls.method }}"
gopkg: "{{ pkgconfig.terraformls.gobase }}@{{ pkgconfig.terraformls.version }}"

View File

@@ -1,6 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set tidy config
ansible.builtin.set_fact:
tidy:
pkgs: "{{ pkgconfig.tidy.pkgs[ansible_os_family] }}"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set uwsm config
ansible.builtin.set_fact:
uwsm:
vers: "{{ pkgconfig.uwsm.version }}"
repo: "{{ pkgconfig.uwsm.repo }}"
build_deps: "{{ pkgconfig.uwsm.build_deps[ansible_os_family] }}"
deps: "{{ pkgconfig.uwsm.deps[ansible_os_family] }}"
clean: "{{ pkgconfig_uwsm_clean | default(package_default_clean_src) }}"
installed_files: "{{ pkgconfig.uwsm.build_installed_files }}"
prefix: "/usr/local"

View File

@@ -1,25 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set vault install method
ansible.builtin.set_fact:
vault:
method: "{{ pkgconfig.vault.method[ansible_os_family] | default(pkgconfig.vault.method.default) }}"
- name: Set vault config
when:
- vault.method == 'sys'
ansible.builtin.set_fact:
vault:
method: "{{ vault.method }}"
pkgs: "{{ pkgconfig.vault.pkgs[ansible_system] }}"
- name: Set vault config
when:
- vault.method == 'archive'
ansible.builtin.set_fact:
vault:
method: "{{ vault.method }}"
archive: "vault_{{ pkgconfig.vault.version }}_{{ pkgconfig.vault.sysmap[ansible_system] }}_{{ pkgconfig.vault.archmap[ansible_architecture] }}.zip"
url: "{{ pkgconfig.vault.archive.baseurl }}/{{ pkgconfig.vault.version }}"
path: "{{ path.archive }}/vault"
bin: "{{ path.bin }}/vault"

View File

@@ -1,12 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set xdg-desktop-portal-hyprland config
ansible.builtin.set_fact:
xdg_desktop_portal_hyprland:
vers: "{{ pkgconfig.xdg_desktop_portal_hyprland.version }}"
repo: "{{ pkgconfig.xdg_desktop_portal_hyprland.repo }}"
pkg_deps: "{{ pkgconfig.xdg_desktop_portal_hyprland.pkg_deps }}"
build_deps: "{{ pkgconfig.xdg_desktop_portal_hyprland.build_deps[ansible_os_family] }}"
git_path: "{{ d_tempdir.path }}/xdg-desktop-portal-hyprland"
installed_files: "{{ pkgconfig.xdg_desktop_portal_hyprland.build_installed_files }}"
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"

View File

@@ -1,8 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set xh config
ansible.builtin.set_fact:
xh:
vers: "{{ pkgconfig.xh.version }}"
name: xh
locked: true

View File

@@ -1,8 +0,0 @@
# vim: set filetype=yaml.ansible
---
- name: Set yazi vars
ansible.builtin.set_fact:
yazi:
pkgs: "{{ pkgconfig.yazi.pkgs }}"
deps: "{{ pkgconfig.yazi.depends[ansible_os_family] }}"
pkg_deps: "{{ pkgconfig.yazi.pkg_depends }}"

View File

@@ -1,23 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set distro name
when:
- ansible_os_family == 'RedHat'
ansible.builtin.set_fact:
rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}"
- name: Set deps for distros
ansible.builtin.set_fact:
zfs:
deps: "{% if ansible_distribution == 'Fedora' %}{{ pkgconfig.zfs.build_deps.Fedora }}{% else %}{{ pkgconfig.zfs.build_deps[ansible_os_family] }}{% endif %}"
- name: Set ZFS config
ansible.builtin.set_fact:
zfs:
repo_pkg: "{{ pkgconfig.zfs.repo_base }}/{{ rhname }}/zfs-release-{{ pkgconfig.zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm"
deps: "{{ zfs.deps }}"
pkgs: "{{ pkgconfig.zfs.pkgs[ansible_os_family] }}"
skip_gpg_check: "{{ rhname == 'fedora' }}"
release: "{{ ansible_distribution_release }}"
gpg_key: "{{ pkgconfig.zfs.gpg_key }}"
gpg_fp: "{{ pkgconfig.zfs.gpg_key_fingerprint }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set zig configuration
ansible.builtin.set_fact:
zig:
vers: "{{ pkgconfig.zig.version }}"
path: "zig-{{ pkgconfig.zig.sysmap[ansible_system] }}-{{ pkgconfig.zig.archmap[ansible_architecture] }}-{{ pkgconfig.zig.version }}"
pkg: "zig-{{ pkgconfig.zig.sysmap[ansible_system] }}-{{ pkgconfig.zig.archmap[ansible_architecture] }}-{{ pkgconfig.zig.version }}.tar.xz"
base_url: "{{ pkgconfig.zig.base_url }}"

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set zls config
ansible.builtin.set_fact:
zls:
path: "zls-{{ pkgconfig.zls.sysmap[ansible_system] }}-{{ pkgconfig.zls.archmap[ansible_architecture] }}-{{ pkgconfig.zls.version }}"
pkg: "zls-{{ pkgconfig.zls.sysmap[ansible_system] }}-{{ pkgconfig.zls.archmap[ansible_architecture] }}-{{ pkgconfig.zls.version }}.tar.xz"
vers: "{{ pkgconfig.zls.version }}"
base_url: "{{ pkgconfig.zls.base_url }}"

View File

@@ -1,68 +1,68 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Set common facts
ansible.builtin.set_fact:
distribution: "{{ ansible_facts['distribution'] }}"
system: "{{ ansible_facts['system'] }}"
os_family: "{{ ansible_facts['os_family'] }}"
user_dir: "{{ ansible_facts['user_dir'] }}"
user_id: "{{ ansible_facts['user_id'] }}"
user_gid: "{{ ansible_facts['user_gid'] }}"
os_version:
major: "{{ ansible_facts['distribution_major_version'] }}"
version: "{{ ansible_facts['distribution_version'] }}"
release: "{{ ansible_facts['distribution_release'] }}"
- name: Set package_home_base for Darwin - name: Set package_home_base for Darwin
when: when:
- ansible_system == 'Darwin' - system == 'Darwin'
ansible.builtin.set_fact: ansible.builtin.set_fact:
package_home_base: /Users package_home_base: /Users
- name: Set package_home_base for Linux - name: Set package_home_base for Linux
when: when:
- ansible_system == 'Linux' - system == 'Linux' or
os_family == 'FreeBSD'
ansible.builtin.set_fact: ansible.builtin.set_fact:
package_home_base: /home package_home_base: /home
- name: Set local path prefix - name: Set default paths
when:
- use_local
ansible.builtin.set_fact: ansible.builtin.set_fact:
path: path_appimage: "{{ install_prefix }}/appimage"
prefix: "{{ package_home_base }}/{{ ansible_ssh_user }}/.local" path_archive: "{{ install_prefix }}/archive"
path_bin: "{{ install_prefix }}/bin"
path_cargo: "{{ install_prefix }}/cargo"
path_source: "{{ install_prefix }}/source"
path_go: "{{ install_prefix }}/go"
path_zig: "{{ install_prefix }}/zig"
path_pipx: "{{ install_prefix }}/pipx"
store_path: "{{ user_dir }}/.cache/ansible_role_package"
path_lib: "{{ install_prefix }}/lib"
- name: Set non-local path prefix - name: Set install_become_group from install_become_user
when: block:
- not use_local - name: Get install_become_user userinfo
ansible.builtin.set_fact: ansible.builtin.getent:
path: database: passwd
prefix: "{{ defaults.path.prefix }}" key: "{{ install_become_user }}"
- name: Set install variables
ansible.builtin.set_fact:
ext_become: "{{ not use_local }}"
path:
prefix: "{{ path.prefix }}"
appimage: "{{ path.appimage | default(path.prefix ~ defaults.path.suffix.appimage) }}"
archive: "{{ path.archive | default(path.prefix ~ defaults.path.suffix.archive) }}"
bin: "{{ path.bin | default(path.prefix ~ defaults.path.suffix.bin) }}"
cargo: "{{ path.cargo | default(path.prefix ~ defaults.path.suffix.cargo) }}"
go: "{% if ansible_distribution == 'MacOSX' %}/usr/local/go{% else %}{{ path.go | default(path.prefix ~ defaults.path.suffix.go) }}{% endif %}"
pipx: "{{ path.pipx | default(path.prefix ~ defaults.path.suffix.pipx) }}"
- name: Set Linux specific facts - name: Set Linux specific facts
when: when:
- ansible_system == 'Linux' - system == 'Linux'
ansible.builtin.set_fact: ansible.builtin.set_fact:
flatpak_remote: # flatpak remotes, includes flathub by default
- name: flathub
url: https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak_method: "{% if use_local %}user{% else %}system{% endif %}"
pkg_appimage: [] # appimages to install
pkg_flatpak: [] # flatpak packages to install
pkg_snap: [] # snpacraft.io packages
pipx_exec: "/usr/bin/pipx" pipx_exec: "/usr/bin/pipx"
sys_pkg_become: true # Linux package managers require sudo access path_lib: lib64
lib_path: lib64
root_prefix: /usr/local root_prefix: /usr/local
- name: Set alpine linux specific facts - name: Set alpine linux specific facts
when: when:
- ansible_os_family == 'Alpine' - os_family == 'Alpine'
ansible.builtin.set_fact: ansible.builtin.set_fact:
lib_path: lib path_lib: lib
- name: Set rpm dist if RedHat based - name: Set dist code if RedHat based
when: when:
- ansible_os_family == 'RedHat' - os_family == 'RedHat'
changed_when: false changed_when: false
register: rpm_dist register: rpm_dist
ansible.builtin.command: ansible.builtin.command:
@@ -70,22 +70,11 @@
- name: Set macOS specific facts - name: Set macOS specific facts
when: when:
- ansible_distribution == 'MacOSX' - distribution == 'MacOSX' or
distribution == 'MacOS'
ansible.builtin.set_fact: ansible.builtin.set_fact:
brewtap: [] # homebrew taps to add brewtap: [] # homebrew taps to add
pipx_exec: "/opt/homebrew/bin/pipx" pipx_exec: "/opt/homebrew/bin/pipx" # pipx executable
pkg_cask: [] # homebrew casks pkg_cask: [] # homebrew casks
pkg_tap: [] # homebrew tap packages pkg_tap: [] # homebrew tap packages
sys_pkg_become: false # homebrew doesn't require sudo access path_lib: lib # macos shared library path
lib_path: lib
- name: Set OS independant facts
ansible.builtin.set_fact:
pkg_archive: [] # packages installed via prebuilt archive
pkg_cargo: [] # rust packages from cargo
pkg_go: [] # go applications
pkg_npm: [] # npm commands
pkg_pipx: [] # pipx packages
pkg_zig: []
pkg_src: [] # packages built from source
pkg_sys: [] # system package manager packages, homebrew on macOS, dnf for RedHat based, apt for Debian Based

View File

@@ -1,9 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Install go package {{ pkg }}
become: "{{ ext_become }}"
environment:
GOBIN: "{{ path.bin }}"
PATH: "{{ path.go }}/bin:$PATH"
ansible.builtin.command:
cmd: go install {{ pkg }}

View File

@@ -0,0 +1,22 @@
# vim: set filetype=yaml.ansible :
# Helper: external repository
---
- name: Add copr repository
when:
- ansible_os_family == 'RedHat'
community.general.copr:
host: "{{ repo.host | default('copr.fedorainfracloud.org') }}"
state: "{{ repo.state | default('enabled') }}"
name: "@{{ repo.name }}"
include: "{{ repo.include | default(omit) }}"
exclude: "{{ repo.exclude | default(omit) }}"
- name: Add apt ppa
when:
- ansible_os_family == 'Debian'
ansible.builtin.apt_repository:
codename: "{{ repo.codename | default(omit) }}"
filename: "{{ repo.filename | default(omit) }}"
install_python_apt: true
repo: "{{ repo.name }}"
state: "{{ repo.state | default('present') }}"

View File

@@ -0,0 +1,31 @@
# vim: set filetype=yaml.ansible :
---
- name: Install appimages {{ appimage.name }}
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
block:
- name: Ensure appimage path exists {{ appimage.name }}
ansible.builtin.file:
path: "{{ path_appimage }}/{{ appimage.name }}"
mode: "{{ appimage.mode | default('0755') }}"
owner: "{{ appimage.owner | default(ansible_user_id) }}"
group: "{{ appimage.group | default(ansible_user_gid) }}"
state: directory
- name: Fetch appimage {{ appimage.name }}
ansible.builtin.get_url:
mode: "{{ appimage.mode | default('0755') }}"
owner: "{{ appimage.owner | default(ansible_user_id) }}"
group: "{{ appimage.group | default(ansible_user_gid) }}"
url: "{{ appimage.url }}"
dest: "{{ path_appimage }}/{{ appimage.name }}/{{ appimage.filename }}"
checksum: "{{ appimage.checksum | default(omit) }}"
decompress: false
backup: false
- name: Link appimage to bin {{ appimage.name }}
vars:
links:
- from: "{{ path_appimage }}/{{ appimage.name }}/{{ appimage.filename }}"
to: "{{ path_bin }}/{{ appimage.name }}"
ansible.builtin.include_tasks: helpers/symlink.yml

52
tasks/helpers/archive.yml Normal file
View File

@@ -0,0 +1,52 @@
# vim: set filetype=yaml.ansible :
#
## Helpers: archive.yml
## Description: extract and symlink archives
## Variables: dict of key:value pairs
## extract_to: path to extract archive to
## name: filename of the archive
## url: download url of the archive
---
- name: Ensure requirements met
when:
- archive.extract_to is defined
- archive.name is defined
- archive.url is defined
block:
- name: Extract archive to given path {{ archive.name }}
block:
- name: Ensure directory exists
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
ansible.builtin.file:
state: directory
path: "{{ archive.extract_to }}"
mode: "{{ archive.mode | default('0755') }}"
owner: "{{ archive.owner | default(ansible_facts['user_id']) }}"
group: "{{ archive.group | default(ansible_facts['user_gid']) }}"
- name: Download archive to cache {{ archive.name }}
ansible.builtin.get_url:
dest: "{{ d_cache.path }}/{{ archive.name }}"
url: "{{ archive.url }}"
checksum: "{{ archive.checksum | default(omit) }}"
decompress: false
mode: '0644'
- name: Extract archive {{ archive.name }}
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
ansible.builtin.unarchive:
dest: "{{ archive.extract_to }}"
src: "{{ d_cache.path }}/{{ archive.name }}"
remote_src: true
include: "{{ archive.include | default(omit) }}"
exclude: "{{ archive.exclude | default(omit) }}"
- name: Symlink archive files {{ archive.name }}
when:
- archive.links is defined
- archive.links | length > 0
vars:
links: "{{ archive.links }}"
ansible.builtin.include_tasks: helpers/symlink.yml

17
tasks/helpers/cargo.yml Normal file
View File

@@ -0,0 +1,17 @@
# vim: set filetype=yaml.ansible :
#
## Helper: cargo.yml
## Description: Install packages using the cargo command
## Variables: top level 'dict'
## name: package name on cargo
## version: cargo version, omitted if empty
## locked: _bool_, optional. Default false
---
- name: Install with cargo {{ pkg.name }}
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
community.general.cargo:
name: "{{ pkg.name }}"
version: "{{ pkg.version | default(omit) }}"
locked: "{{ pkg.locked | default(false) }}"
path: "{{ install_prefix }}"

View File

@@ -0,0 +1,64 @@
# vim: set filetype=yaml.ansible :
#
## Helper: cargo_buil.yml
## Description: download source, build and install using cargo
## Variables: top level 'dict'
## source_dir: git source directory
## repo: git repository url
## depth: _int_ optional, Default 1. Git depth to clone
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
## recursive: _bool_ optional, default true. Do a recursive clone
## version: _string_ optional, default 'latest'. Version to checkout and build
## build_flags: _list[str]_ optional. If set, will append these to the build command
---
- name: Cargo source install helper
block:
- name: Fetch git repo
vars:
path: "{{ pkg.source_dir }}"
repo: "{{ pkg.git.repo }}"
depth: "{{ pkg.depth | default(1) }}"
force: "{{ pkg.force_git | default(true) }}"
recursive: "{{ pkg.recursive | default(true) }}"
version: "{{ pkg.git.version | default(omit) }}"
ansible.builtin.include_tasks: helpers/git.yml
- name: Build cargo release
ansible.builtin.command:
chdir: "{{ pkg.source_dir }}"
argv: "{{ ['cargo', 'build'] + pkg.build_flags }}"
- name: Clean existing install
vars:
files: "{{ pkg.files }}"
ansible.builtin.include_tasks: helpers/clean_install.yml
- name: Install cargo release
block:
# - name: Install files
# vars:
# source_dir: "{{ pkg.source_dir }}"
# pkg: "{{ pkg }}"
# ansible.builtin.include_tasks: helpers/install.yml
- name: Create directories
become: "{{ install_become }}"
become_user: "{{ install_become_user | default(omit) }}"
loop: "{{ pkg.files }}"
loop_control:
loop_var: file
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ [install_prefix, file.to] | path_join | dirname }}"
- name: Copy installable files
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
loop: "{{ pkg.files }}"
loop_control:
loop_var: file
ansible.builtin.copy:
dest: "{{ install_prefix }}/{{ file.to }}"
mode: "{{ file.mode | default('0644') }}"
src: "{{ pkg.source_dir }}/{{ file.from }}"

View File

@@ -1,10 +1,21 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Remove file list - name: Remove file list
become: true become: "{{ install_become }}"
loop: "{{ file_list }}" become_user: "{{ install_become_user }}"
loop: "{{ files }}"
loop_control: loop_control:
loop_var: file loop_var: file
when:
- file.to is defined
ansible.builtin.file: ansible.builtin.file:
state: absent state: absent
path: "{{ file }}" path: "{{ install_prefix }}/{{ file.to }}"
- name: Check for and remove empty directories
loop: "{{ files }}"
loop_control:
loop_var: dir
when:
- file.directory is defined
ansible.builtin.include_tasks: internal/remove_empty_dir.yml

10
tasks/helpers/flatpak.yml Normal file
View File

@@ -0,0 +1,10 @@
# vim: set filetype=yaml.ansible :
---
- name: Install flatpak
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
community.general.flatpak:
name: "{{ flatpak.name }}"
remote: "{{ flatpak.remote }}"
method: "{{ flatpak.method | default('system') }}"
state: "{{ flatpak.state | default('present') }}"

View File

@@ -0,0 +1,11 @@
# vim: set filetype=yaml.ansible :
---
- name: Add flatpak remote
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
community.general.flatpak_remote:
name: "{{ remote.name }}"
flatpakrepo_url: "{{ remote.url }}"
enabled: "{{ remote.enabled | default(true) }}"
method: "{{ remote.method | default('system') }}"
state: "{{ remote.state | default('present') }}"

Some files were not shown because too many files have changed in this diff Show More