finished with a bunch more

This commit is contained in:
Matthew Stobbs
2026-03-03 15:08:15 -07:00
parent 24a4ec17ec
commit 065031b77f
27 changed files with 364 additions and 208 deletions

View File

@@ -11,7 +11,7 @@
os_version: os_version:
major: "{{ ansible_facts['distribution_major_version'] }}" major: "{{ ansible_facts['distribution_major_version'] }}"
version: "{{ ansible_facts['distribution_version'] }}" version: "{{ ansible_facts['distribution_version'] }}"
release: "{{ ansible_facts['release'] }}" release: "{{ ansible_facts['distribution_release'] }}"
- name: Set package_home_base for Darwin - name: Set package_home_base for Darwin
when: when:

View File

@@ -1,10 +1,14 @@
# vim: set filetype=yaml.ansible # vim: set filetype=yaml.ansible
--- ---
- name: Install cargo - name: Dump install vars
ansible.builtin.debug:
var: pkg
- name: Install with cargo
become: "{{ install_become }}" become: "{{ install_become }}"
become_user: "{{ install_become_user }}" become_user: "{{ install_become_user }}"
community.general.cargo: community.general.cargo:
name: "{{ cargo.name }}" name: "{{ pkg.name }}"
version: "{{ cargo.version | default(omit) }}" version: "{{ pkg.version | default(omit) }}"
locked: "{{ cargo.locked | default(false) }}" locked: "{{ pkg.locked | default(false) }}"
path: "{{ install_prefix }}" path: "{{ install_prefix }}"

View File

@@ -4,22 +4,22 @@
block: block:
- name: Fetch git repo - name: Fetch git repo
vars: vars:
path: "{{ path_source }}/{{ cargo_build.source_dir }}" path: "{{ path_source }}/{{ pkg.source_dir }}"
repo: "{{ cargo_build.repo }}" repo: "{{ pkg.repo }}"
depth: "{{ cargo_build.depth | default(1) }}" depth: "{{ pkg.depth | default(1) }}"
force: "{{ cargo_build.force_git | default(true) }}" force: "{{ pkg.force_git | default(true) }}"
recursive: "{{ cargo_build.recursive | default(true) }}" recursive: "{{ pkg.recursive | default(true) }}"
version: "{{ cargo_build.version | default(omit) }}" version: "{{ pkg.version | default(omit) }}"
ansible.builtin.include_tasks: helpers/git.yml ansible.builtin.include_tasks: helpers/git.yml
- name: Build cargo release - name: Build cargo release
ansible.builtin.command: ansible.builtin.command:
chdir: "{{ path_source }}/{{ cargo_build.source_dir }}" chdir: "{{ path_source }}/{{ pkg.source_dir }}"
argv: "{{ [cargo, build] + cargo_build.build_flags }}" argv: "{{ [cargo, build] + pkg.build_flags }}"
- name: Clean existing install - name: Clean existing install
vars: vars:
files: "{{ cargo_build.files }}" files: "{{ pkg.files }}"
ansible.builtin.include_tasks: helpers/clean.yml ansible.builtin.include_tasks: helpers/clean.yml
- name: Install cargo release - name: Install cargo release
@@ -28,5 +28,5 @@
become: "{{ install_become }}" become: "{{ install_become }}"
become_user: "{{ install_become_user }}" become_user: "{{ install_become_user }}"
vars: vars:
source_dir: "{{ cargo_build.source_dir }}" source_dir: "{{ pkg.source_dir }}"
ansible.builtin.include_tasks: helpers/install.yml ansible.builtin.include_tasks: helpers/install.yml

View File

@@ -1,4 +1,14 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
#
## Helper: git.yml
## Description: pull git repositories
## Variables:
## path: Destination path when cloning
## repo: url to git repo
## depth: _optional_ (default: 1) set git clone depth
## force: _optional_ (default: true) force cloning to given path
## recursive: _optional_ (default: true) do a recursive clone
## version: _optional_ (default: empty) git branch/tag to clone
--- ---
- name: Clone git repository - name: Clone git repository
ansible.builtin.git: ansible.builtin.git:

23
tasks/helpers/make.yml Normal file
View File

@@ -0,0 +1,23 @@
# vim: set filetype=yaml.ansible :
#
## Helper: make.yml
## Description: run make to build packages
## Variables:
##
---
- name: Fetch source code
vars:
path: "{{ pkg.path }}"
repo: "{{ pkg.repo }}"
version: "{{ pkg.version | default(omit) }}"
ansible.builtin.include_tasks: helpers/git.yml
- name: Run make targets
loop: "{{ pkg.targets }}"
loop_control:
loop_var: target
become: "{{ target.do_become }}"
community.general.make:
chdir: "{{ pkg.path }}"
target: "{{ target.name }}"
params: "{{ target.params | default(omit) }}"

View File

@@ -1,5 +1,8 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Dump npm pkg
ansible.builtin.debug:
var: pkg
- name: Install npm - name: Install npm
become: "{{ install_become }}" become: "{{ install_become }}"
become_user: "{{ install_become_user }}" become_user: "{{ install_become_user }}"

View File

@@ -76,23 +76,20 @@
- name: Install go if required - name: Install go if required
when: when:
- pkg_go|length > 0 - pkg_go|length > 0
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/go.yml
file: pkgs/go.yml
- name: Install rust and cargo if required - name: Install rust and cargo if required
when: when:
- pkg_cargo|length > 0 or - pkg_cargo|length > 0 or
pkg_cargo_build|length > 0 pkg_cargo_build|length > 0
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/rust.yml
file: pkgs/rust.yml
- name: Ensure pipx is installed - name: Ensure pipx is installed
when: when:
- pkg_pipx|length > 0 - pkg_pipx|length > 0
block: block:
- name: Queue pipx install - name: Queue pipx install
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/pipx.yml
file: pkgs/pipx.yml
- name: Ensure pipx path exists - name: Ensure pipx path exists
become: "{{ install_become }}" become: "{{ install_become }}"
@@ -105,15 +102,13 @@
- name: Ensure nodejs and npm are installed - name: Ensure nodejs and npm are installed
when: when:
- pkg_npm|length > 0 - pkg_npm|length > 0
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/nodejs.yml
file: pkgs/nodejs.yml
- name: Ensure flatpak is installed - name: Ensure flatpak is installed
when: when:
- pkg_flatpak is defined - pkg_flatpak is defined
- pkg_flatpak|length > 0 - pkg_flatpak|length > 0
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/flatpak.yml
file: pkgs/flatpak.yml
- name: Ensure appimage path exists - name: Ensure appimage path exists
when: when:
@@ -139,8 +134,7 @@
- name: Depend zig - name: Depend zig
when: when:
- pkg_zig|length > 0 - pkg_zig|length > 0
ansible.builtin.include_tasks: ansible.builtin.include_tasks: pkgs/zig.yml
file: pkgs/zig.yml
- name: Install pkg_sys list using system package manager - name: Install pkg_sys list using system package manager
when: when:
@@ -157,50 +151,34 @@
loop: "{{ pkg_archive }}" loop: "{{ pkg_archive }}"
loop_control: loop_control:
loop_var: archive loop_var: archive
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/archive.yml
file: helpers/archive.yml
- name: Linux specific tasks - name: Linux specific tasks
when: when:
- system == 'Linux' - system == 'Linux'
ansible.builtin.include_tasks: ansible.builtin.include_tasks: linux.yml
file: linux.yml
- name: MacOS specific tasks - name: MacOS specific tasks
when: when:
- distribution == 'MacOSX' - distribution == 'MacOSX'
ansible.builtin.include_tasks: ansible.builtin.include_tasks: macos.yml
file: macos.yml
- name: Install cargo packages - name: Install cargo packages
when: when:
- pkg_cargo|length > 0 - pkg_cargo|length > 0 or
pkg_cargo_build|length > 0
block: block:
- name: Ensure cargo path exists
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path_cargo }}"
- name: Install cargo packages - name: Install cargo packages
loop: "{{ pkg_cargo | unique }}" loop: "{{ pkg_cargo | unique }}"
loop_control: loop_control:
loop_var: cargo loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/cargo.yml
file: helpers/cargo.yml
- name: Build and install rust apps - name: Install cargo_build packages
when: loop: "{{ pkg_cargo_build }}"
- pkg_cargo_build|length > 0
block:
- name: Run cargo build and install
loop: "{{ cargo_pkg_build }}"
loop_control: loop_control:
loop_var: cargo_build loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/cargo_build.yml
file: helpers/cargo_build.yml
- name: Install go packages - name: Install go packages
when: when:
@@ -210,8 +188,7 @@
loop: "{{ pkg_go }}" loop: "{{ pkg_go }}"
loop_control: loop_control:
loop_var: pkg loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/go_install.yml
file: helpers/go_install.yml
- name: Install local npm packages - name: Install local npm packages
when: when:
@@ -219,8 +196,7 @@
loop: "{{ pkg_npm | unique }}" loop: "{{ pkg_npm | unique }}"
loop_control: loop_control:
loop_var: pkg loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/npm.yml
file: npm.yml
- name: Install python pipx packages for user - name: Install python pipx packages for user
when: when:
@@ -228,14 +204,16 @@
loop: "{{ pkg_pipx | unique }}" loop: "{{ pkg_pipx | unique }}"
loop_control: loop_control:
loop_var: pkg loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/pipx.yml
file: pipx.yml
- name: Build and install source packages - name: Build and install make packages
when: when:
- pkg_src|length > 0 - pkg_make|length > 0
loop: "{{ pkg_src | unique }}" loop: "{{ pkg_make | unique }}"
loop_control: loop_control:
loop_var: pkg loop_var: pkg
ansible.builtin.include_tasks: ansible.builtin.include_tasks: helpers/make.yml
file: "src/{{ pkg }}.yml"
- name: Dump __configured
ansible.builtin.debug:
var: __configured

View File

@@ -8,7 +8,6 @@
# Helpers: # Helpers:
# - cargo_build # - cargo_build
--- ---
# {{{ Configure alacritty
- name: Start alacritty configuration - name: Start alacritty configuration
when: when:
- "'alacritty' not in __configured" - "'alacritty' not in __configured"
@@ -19,7 +18,7 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
alacritty_install_method: "{{ install_method if install_method in alacritty.install_methods else alacritty.install_methods[0] }}" alacritty_install_method: "{{ install_method if install_method in alacritty.install_methods else alacritty.install_methods[0] }}"
- name: Configure alacritty source install - name: Configure alacritty source install # {{{
when: when:
- alacritty_install_method == "source" - alacritty_install_method == "source"
block: block:
@@ -50,29 +49,24 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
alacritty_build_deps: "{{ build_deps + ['@Development Tools'] }}" alacritty_build_deps: "{{ build_deps + ['@Development Tools'] }}"
# }}} - name: Configure pkg dependencies
- name: Append alacritty installation loop: "{{ alacritty.pkg_deps }}"
block: loop_control:
- name: Append alacritty to pkg_cargo_build loop_var: dep
when: ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- alacritty_method == 'source'
block:
- name: Configure pkg dependencies
loop: "{{ alacritty.pkg_deps }}"
loop_control:
loop_var: dep
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- name: Append build dependencies and cargo config - name: Append build dependencies and cargo config
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + alacritty_build_deps }}" pkg_sys: "{{ pkg_sys + alacritty_build_deps }}"
pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}" pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}"
# }}}
- name: Append alacritty to pkg_sys - name: Configure alacritty system install
when: when:
- alacritty_method == 'system' - alacritty_install_method == 'system'
ansible.builtin.set_fact: block:
pkg_sys: "{{ pkg_sys + [alacritty_pkgname] }}" - name: Queue alacritty for installation
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [alacritty_pkgname] }}"
- name: Complete alacritty configuration - name: Complete alacritty configuration
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@@ -8,7 +8,7 @@
when: when:
- ansible_install_method is undefined - ansible_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_install_method: "{% if install_method in ansible_install_methods %}{{ install_method }}{% else %}{{ ansible_install_methods[0] }}{% endif %}" ansible_install_method: "{{ install_method if install_method in ansible_install_methods else ansible_install_methods[0] }}"
- name: Append ansible to system package manager install list - name: Append ansible to system package manager install list
when: when:

View File

@@ -30,4 +30,4 @@
- name: Complete ansible_lint configuration - name: Complete ansible_lint configuration
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'ansible_lint': true } ) }}" __configured: "{{ __configured | combine( { 'ansible_lint': ansible_lint_install_method } ) }}"

View File

@@ -8,22 +8,22 @@
when: when:
- ansible_ls_install_method is undefined - ansible_ls_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_ls_install_method: "{{ install_method if install_method in ansible_ls_install_methods else ansible_ls_install_methods[0] }}" ansible_ls_install_method: "{{ install_method if install_method in ansible_ls.install_methods else ansible_ls.install_methods[0] }}"
- name: Append ansible-language-server to pkg_npm - name: Configure ansible_ls source install
when: when:
- ansible_ls_install_method == 'source' - ansible_ls_install_method == 'source'
block: block:
- name: Load required installation dependencies - name: Load required installation dependencies
loop: "{{ ansible_ls_pkg_deps }}" loop: "{{ ansible_ls_pkg_deps }}"
loop_control: loop_control:
loop_var: pkgdep loop_var: dep
ansible.builtin.include_tasks: "{{ pkgdep }}" ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- name: Append ansible ls to pkg_npm - name: Append ansible ls to pkg_npm
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_npm: "{{ pkg_npm + [ansible_npm_pkg] }}" pkg_npm: "{{ pkg_npm + [ansible_ls.npm_pkg] }}"
- name: Set ansible_ls_configured - name: Set ansible_ls_configured
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'ansible_ls': true } ) }}" __configured: "{{ __configured | combine( { 'ansible_ls': ansible_ls_install_method } ) }}"

View File

@@ -8,14 +8,16 @@
when: when:
- bashls_install_method is undefined - bashls_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
bashls_install_method: "{{ install_method if install_method in bashls_install_methods else bashls_install_methods[0] }}" bashls_install_method: "{{ install_method if install_method in bashls.install_methods else bashls.install_methods[0] }}"
- name: Append bash-language-server to pkg_npm - name: Configure bashls source install
when: when:
- bashls_install_method == 'source' - bashls_install_method == 'source'
ansible.builtin.set_fact: block:
pkg_npm: "{{ pkg_npm + [bashls_npm_pkgname] }}" - name: Append bashls to pkg_npm
ansible.builtin.set_fact:
pkg_npm: "{{ pkg_npm + [bashls.npm_pkg] }}"
- name: Set bashls_configured - name: Set bashls_configured
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'bashls': true } ) }}" __configured: "{{ __configured | combine( { 'bashls': bashls_install_method } ) }}"

View File

@@ -1,5 +1,23 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Append cmake to pkg_sys - name: Configure cmake
ansible.builtin.set_fact: when:
pkg_sys: "{{ pkg_sys + ['cmake'] }}" - "'cmake' not in __configured"
block:
- name: Set cmake install method
when:
- cmake_install_method is undefined
ansible.builtin.set_fact:
cmake_install_method: "{{ install_method if install_method in cmake.install_methods else cmake.install_methods[0] }}"
- name: Configure cmake system install
when:
- cmake_install_method == "system"
block:
- name: Append cmake to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['cmake'] }}"
- name: Finalize cmake configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'cmake': cmake_install_method } ) }}"

View File

@@ -8,7 +8,7 @@
when: when:
- direnv_install_method is undefined - direnv_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
direnv_install_method: "{{ install_method if install_method in direnv_install_methods else direnv_install_methods[0] }}" direnv_install_method: "{{ install_method if install_method in direnv.install_methods else direnv.install_methods[0] }}"
- name: Append direnv to pkg_sys - name: Append direnv to pkg_sys
when: when:
@@ -18,4 +18,4 @@
- name: Finalize direnv configuration - name: Finalize direnv configuration
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'direnv': true } ) }}" __configured: "{{ __configured | combine( { 'direnv': direnv_install_method } ) }}"

View File

@@ -1,13 +1,28 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Add eza - name: Configure eza
when: when:
- eza_configured is undefined - "'eza' not in __configured"
block: block:
- name: Append eza to pkg_cargo - name: Set eza install method
when:
- eza_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + ['eza'] }}" eza_install_method: "{{ install_method if install_method in eza.install_methods else eza.install_methods[0] }}"
- name: Set eza_configured - name: Configure eza source install
when:
- eza_install_method == "source"
block:
- name: Configure eza cargo facts
ansible.builtin.set_fact:
eza_cargo_install:
name: eza
- name: Append eza to pkg_cargo
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [eza_cargo_install] }}"
- name: Finalized eza configuration
ansible.builtin.set_fact: ansible.builtin.set_fact:
eza_configured: true __configured: "{{ __configured | combine( { 'eza': eza_install_method} ) }}"

View File

@@ -1,5 +1,23 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Append fzf to pkg_sys - name: Configure fzf
ansible.builtin.set_fact: when:
pkg_sys: "{{ pkg_sys + ['fzf'] }}" - "'fzf' not in __configured"
block:
- name: Set fzf install method
when:
- fzf_install_method is undefined
ansible.builtin.set_fact:
fzf_install_method: "{{ install_method if install_method in fzf.install_methods else fzf.install_methods[0] }}"
- name: Configure fzf system install
when:
- fzf_install_method == "system"
block:
- name: Append fzf to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['fzf'] }}"
- name: Finalize fzf configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'fzf': fzf_install_method } ) }}"

View File

@@ -1,9 +1,23 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Load git config - name: Configure git
ansible.builtin.include_tasks: when:
file: config/git.yml - "'git' not in __configured"
block:
- name: Set git install method
when:
- git_install_method is undefined
ansible.builtin.set_fact:
git_install_method: "{{ install_method if install_method in git.install_methods else git.install_methods[0] }}"
- name: Append git to pkg_sys - name: Configure git system install
ansible.builtin.set_fact: when:
pkg_sys: "{{ pkg_sys + git.pkgs }}" - git_install_method == "system"
block:
- name: Append git to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['git'] }}"
- name: Finalize git configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'git': git_install_method } ) }}"

View File

@@ -8,7 +8,7 @@
when: when:
- go_install_method is undefined - go_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
go_install_method: "{% if install_method in go_install_methods %}{{ install_method }}{% else %}{{ go_install_methods[0] }}{% endif %}" go_install_method: "{{ install_method if install_method in go.install_methods else go.install_methods[0] }}"
- name: Configure go system installation - name: Configure go system installation
when: when:

View File

@@ -8,26 +8,38 @@
when: when:
- neovim_install_method is undefined - neovim_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
neovim_install_method: "{{ install_method if install_method in neovim_install_methods else neovim_install_methods[0] }}" neovim_install_method: "{{ install_method if install_method in neovim.install_methods else neovim.install_methods[0] }}"
- name: Load neovim config
ansible.builtin.include_tasks:
file: config/neovim.yml
- name: Append neovim to pkg_appimage - name: Configure neovim source install
when: when:
- neovim.method == 'appimage' - neovim_install_method == "source"
ansible.builtin.set_fact: block:
pkg_appimage: "{{ pkg_appimage + ['neovim'] }}" - name: Queue pkg build deps
when:
- neovim.build_pkgdeps is defined
loop: "{{ neovim.build_pkgdeps }}"
loop_control:
loop_var: dep
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- name: Append neovim to pkg_sys - name: Set helper facts
when: ansible.builtin.set_fact:
- neovim.method == 'sys' neovim_src_install:
ansible.builtin.set_fact: path: "{{ d_cache.path }}/neovim"
pkg_sys: "{{ pkg_sys + ['neovim'] }}" repo: "{{ neovim.git_repo }}"
version: "{{ neovim_version }}"
targets:
- name: ""
do_become: false
params:
CMAKE_BUILD_TYPE: Release
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ install_prefix }}"
- name: install
do_become: true
- name: Append neovim to source install list
ansible.builtin.set_fact:
pkg_make: "{{ pkg_make + [neovim_src_install] }}"
- name: Append neovim to pkg_src - name: Finalized neovim configuration
when: ansible.builtin.set_fact:
- neovim.method == 'src' __configured: "{{ __configured | combine( { 'neovim': neovim_install_method } ) }}"
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + neovim.build_deps }}"
pkg_src: "{{ pkg_src + ['neovim'] }}"

View File

@@ -1,9 +1,27 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Load nodejs config - name: Configure nodejs
ansible.builtin.include_tasks: when:
file: config/nodejs.yml - "'nodejs' not in __configured"
block:
- name: Set nodejs install method
when:
- nodejs_install_method is undefined
ansible.builtin.set_fact:
nodejs_install_method: "{{ install_method if install_method in nodejs.install_methods else nodejs.install_methods[0] }}"
- name: Append nodejs to pkg_sys - name: Configure nodejs system install
ansible.builtin.set_fact: when:
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}" - nodejs_install_method == "system"
block:
- name: Set nodejs package name
ansible.builtin.set_fact:
nodejs_pkgname: "{{ nodejs.pkgname[system] }}"
nodejs_deps: "{{ nodejs.pkg_deps[system] | default([]) }}"
- name: Append nodejs to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [nodejs_pkgname] + nodejs_deps }}"
- name: Finalize nodejs configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'nodejs': nodejs_install_method } ) }}"

3
tasks/pkgs/npm.yml Normal file
View File

@@ -0,0 +1,3 @@
---
- name: Include nodejs to satisfy npm
ansible.builtin.include_tasks: pkgs/nodejs.yml

View File

@@ -8,13 +8,7 @@
when: when:
- rust_install_method is undefined - rust_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
rust_install_method: "{{ install_method if install_method in rust_install_methods else rust_install_methods[0] }}" rust_install_method: "{{ install_method if install_method in rust.install_methods else rust.install_methods[0] }}"
- name: Add dependencies
loop: rust_pkgdeps
loop_control:
loop_var: dep
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- name: Append rust to install list - name: Append rust to install list
when: when:

View File

@@ -4,10 +4,26 @@
when: when:
- "'starship' not in __configured" - "'starship' not in __configured"
block: block:
- name: Append starship to pkg_cargo - name: Set starship install method
when:
- starship_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}" starship_install_method: "{{ install_method if install_method in starship.install_methods else starship.install_methods[0] }}"
- name: Finalize startship configuration - name: Configure starship source install
when:
- starship_install_method == "source"
block:
- name: Set cargo build options
ansible.builtin.set_fact:
starship_cargo_install:
name: starship
locked: true
version: "{{ starship_version | default(omit) }}"
- name: Append starship to pkg_cargo
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}"
- name: Finalize starship configuration
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'starship': true } ) }}" __configured: "{{ __configured | combine( { 'starship': starship_install_method } ) }}"

View File

@@ -8,7 +8,7 @@
when: when:
- zoxide_install_method is undefined - zoxide_install_method is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
zoxide_install_method: "{{ install_method if intall_method in zoxide_install_methods else zoxide_install_methods[0] }}" zoxide_install_method: "{{ install_method if install_method in zoxide.install_methods else zoxide.install_methods[0] }}"
- name: Append zoxide to pkg_sys - name: Append zoxide to pkg_sys
ansible.builtin.set_fact: ansible.builtin.set_fact:
@@ -16,4 +16,4 @@
- name: Set zoxide_configured - name: Set zoxide_configured
ansible.builtin.set_fact: ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'zoxide': true } ) }}" __configured: "{{ __configured | combine( { 'zoxide': zoxide_install_method } ) }}"

View File

@@ -7,8 +7,8 @@
- name: Set zsh install method - name: Set zsh install method
when: when:
- zsh_install_method is undefined - zsh_install_method is undefined
ansible.bulitin.set_fact: ansible.builtin.set_fact:
zsh_install_method: "{{ install_method if install_method in zsh_install_methods else zsh_install_methods[0] }}" zsh_install_method: "{{ install_method if install_method in zsh.install_methods else zsh.install_methods[0] }}"
- name: Append zsh to pkg_sys - name: Append zsh to pkg_sys
when: when:

View File

@@ -31,6 +31,7 @@ pkg_cargo_build: [] # rust packages using `cargo build` before install
pkg_clean: [] # list of files to remove before running archive and source installations pkg_clean: [] # list of files to remove before running archive and source installations
pkg_flatpak: [] # flatpak packages to install pkg_flatpak: [] # flatpak packages to install
pkg_go: [] # go applications pkg_go: [] # go applications
pkg_make: [] # use gnu make to build/install
pkg_npm: [] # npm commands pkg_npm: [] # npm commands
pkg_pipx: [] # pipx packages pkg_pipx: [] # pipx packages
pkg_sh: [] # use shell commands to install a package pkg_sh: [] # use shell commands to install a package
@@ -84,8 +85,6 @@ ansible_ls_version: latest
ansible_npm_pkg: ansible_npm_pkg:
name: '@ansible/ansible-language-server' name: '@ansible/ansible-language-server'
global: true global: true
ansible_ls_pkg_deps:
- pkgs/npm.yml
# }}} # }}}
# {{{ bashls # {{{ bashls
bashls_install_methods: bashls_install_methods:
@@ -130,48 +129,6 @@ go_pkgname:
# neovim {{{ # neovim {{{
neovim_version: master neovim_version: master
neovim_build_type: Release neovim_build_type: Release
neovim_git_repo: https://github.com/neovim/neovim
neovim_appimage:
base_url: https://github.com/neovim/neovim/releases/download
link_name: nvim
neovim_pkgname:
RedHat: neovim
Debian: neovim
Darwin: neovim
FreeBSD: neovim
neovim_build_deps:
RedHat:
- cmake
- curl
- gcc
- gettext
- glibc-gconv-extra
- make
- ninja-build
Debian:
- build-essential
- cmake
- curl
- gettext
- ninja-build
Darwin:
- cmake
- curl
- gettext
- ninja
Alpine:
- build-base
- cmake
- coreutils
- curl
- gettext-dev
neovim_build_files:
- lib64/nvim
- bin/nvim
- share/nvim
- share/applications/nvim.desktop
- share/icons/hicolor/128x128/apps/nvim.png
- share/man/man1/nvim.1
# }}} # }}}
# {{{ nerdfonts # {{{ nerdfonts
nerdfonts_install_list: nerdfonts_install_list:
@@ -186,8 +143,6 @@ nerdfonts_install_path: share/fonts
# }}} # }}}
# rust {{{ # rust {{{
rust_pkgname: rust rust_pkgname: rust
rust_pkgdeps:
- cargo
# }}} # }}}
# {{{ zsh # {{{ zsh
zsh_base_url: git://git.code.sf.net/p/zsh/code zsh_base_url: git://git.code.sf.net/p/zsh/code

View File

@@ -91,10 +91,32 @@ ansible_ls:
install_methods: install_methods:
- source - source
- system - system
npm_pkg:
name: '@ansible/ansible-language-server'
global: true
pkg_deps:
- nodejs
# {{{ bashls
bashls:
install_methods:
- source
npm_pkg:
name: bash-language-server
global: true
# }}}
cargo:
install_methods:
- system
cmake:
install_methods:
- system
direnv: direnv:
install_methods: install_methods:
- system - system
cargo: eza:
install_methods:
- source
fzf:
install_methods: install_methods:
- system - system
git: git:
@@ -107,19 +129,77 @@ go:
hyprland: hyprland:
install_methods: install_methods:
- source - source
neovim: neovim: # {{{
git_repo: https://github.com/neovim/neovim
appimage:
base_url: https://github.com/neovim/neovim/releases/download
pkgname:
RedHat: neovim
Debian: neovim
Darwin: neovim
FreeBSD: neovim
build_files:
- lib64/nvim
- bin/nvim
- share/nvim
- share/applications/nvim.desktop
- share/icons/hicolor/128x128/apps/nvim.png
- share/man/man1/nvim.1
build_pkgdeps:
- cmake
- git
build_deps:
RedHat:
- cmake
- curl
- gcc
- gettext
- glibc-gconv-extra
- make
- ninja-build
Debian:
- build-essential
- cmake
- curl
- gettext
- ninja-build
Darwin:
- cmake
- curl
- gettext
- ninja
Alpine:
- build-base
- cmake
- coreutils
- curl
- gettext-dev
install_methods: install_methods:
- source - source
- system - system
- appimage - appimage
- archive - archive
# }}}
nerdfonts: nerdfonts:
install_methods: install_methods:
- archive - archive
- system - system
nodejs:
install_methods:
- system
pkgname:
Linux: nodejs
Darwin: node
pkg_deps:
Linux:
- npm
- sqlite
rust: rust:
install_methods: install_methods:
- system - system
starship:
install_methods:
- source
yazi: yazi:
install_methods: install_methods:
- source - source
@@ -130,7 +210,6 @@ zoxide:
zsh: zsh:
install_methods: install_methods:
- system - system
- source
## Package specific configuration that never need to be set by the installer ## Package specific configuration that never need to be set by the installer
__nerdfonts: # {{{ __nerdfonts: # {{{