finished with a bunch more
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
os_version:
|
||||
major: "{{ ansible_facts['distribution_major_version'] }}"
|
||||
version: "{{ ansible_facts['distribution_version'] }}"
|
||||
release: "{{ ansible_facts['release'] }}"
|
||||
release: "{{ ansible_facts['distribution_release'] }}"
|
||||
|
||||
- name: Set package_home_base for Darwin
|
||||
when:
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# 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_user: "{{ install_become_user }}"
|
||||
community.general.cargo:
|
||||
name: "{{ cargo.name }}"
|
||||
version: "{{ cargo.version | default(omit) }}"
|
||||
locked: "{{ cargo.locked | default(false) }}"
|
||||
name: "{{ pkg.name }}"
|
||||
version: "{{ pkg.version | default(omit) }}"
|
||||
locked: "{{ pkg.locked | default(false) }}"
|
||||
path: "{{ install_prefix }}"
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
block:
|
||||
- name: Fetch git repo
|
||||
vars:
|
||||
path: "{{ path_source }}/{{ cargo_build.source_dir }}"
|
||||
repo: "{{ cargo_build.repo }}"
|
||||
depth: "{{ cargo_build.depth | default(1) }}"
|
||||
force: "{{ cargo_build.force_git | default(true) }}"
|
||||
recursive: "{{ cargo_build.recursive | default(true) }}"
|
||||
version: "{{ cargo_build.version | default(omit) }}"
|
||||
path: "{{ path_source }}/{{ pkg.source_dir }}"
|
||||
repo: "{{ pkg.repo }}"
|
||||
depth: "{{ pkg.depth | default(1) }}"
|
||||
force: "{{ pkg.force_git | default(true) }}"
|
||||
recursive: "{{ pkg.recursive | default(true) }}"
|
||||
version: "{{ pkg.version | default(omit) }}"
|
||||
ansible.builtin.include_tasks: helpers/git.yml
|
||||
|
||||
- name: Build cargo release
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ path_source }}/{{ cargo_build.source_dir }}"
|
||||
argv: "{{ [cargo, build] + cargo_build.build_flags }}"
|
||||
chdir: "{{ path_source }}/{{ pkg.source_dir }}"
|
||||
argv: "{{ [cargo, build] + pkg.build_flags }}"
|
||||
|
||||
- name: Clean existing install
|
||||
vars:
|
||||
files: "{{ cargo_build.files }}"
|
||||
files: "{{ pkg.files }}"
|
||||
ansible.builtin.include_tasks: helpers/clean.yml
|
||||
|
||||
- name: Install cargo release
|
||||
@@ -28,5 +28,5 @@
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
vars:
|
||||
source_dir: "{{ cargo_build.source_dir }}"
|
||||
source_dir: "{{ pkg.source_dir }}"
|
||||
ansible.builtin.include_tasks: helpers/install.yml
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
# 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
|
||||
ansible.builtin.git:
|
||||
|
||||
23
tasks/helpers/make.yml
Normal file
23
tasks/helpers/make.yml
Normal 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) }}"
|
||||
@@ -1,5 +1,8 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Dump npm pkg
|
||||
ansible.builtin.debug:
|
||||
var: pkg
|
||||
- name: Install npm
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
|
||||
@@ -76,23 +76,20 @@
|
||||
- name: Install go if required
|
||||
when:
|
||||
- pkg_go|length > 0
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/go.yml
|
||||
ansible.builtin.include_tasks: pkgs/go.yml
|
||||
|
||||
- name: Install rust and cargo if required
|
||||
when:
|
||||
- pkg_cargo|length > 0 or
|
||||
pkg_cargo_build|length > 0
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/rust.yml
|
||||
ansible.builtin.include_tasks: pkgs/rust.yml
|
||||
|
||||
- name: Ensure pipx is installed
|
||||
when:
|
||||
- pkg_pipx|length > 0
|
||||
block:
|
||||
- name: Queue pipx install
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/pipx.yml
|
||||
ansible.builtin.include_tasks: pkgs/pipx.yml
|
||||
|
||||
- name: Ensure pipx path exists
|
||||
become: "{{ install_become }}"
|
||||
@@ -105,15 +102,13 @@
|
||||
- name: Ensure nodejs and npm are installed
|
||||
when:
|
||||
- pkg_npm|length > 0
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/nodejs.yml
|
||||
ansible.builtin.include_tasks: pkgs/nodejs.yml
|
||||
|
||||
- name: Ensure flatpak is installed
|
||||
when:
|
||||
- pkg_flatpak is defined
|
||||
- pkg_flatpak|length > 0
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/flatpak.yml
|
||||
ansible.builtin.include_tasks: pkgs/flatpak.yml
|
||||
|
||||
- name: Ensure appimage path exists
|
||||
when:
|
||||
@@ -139,8 +134,7 @@
|
||||
- name: Depend zig
|
||||
when:
|
||||
- pkg_zig|length > 0
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/zig.yml
|
||||
ansible.builtin.include_tasks: pkgs/zig.yml
|
||||
|
||||
- name: Install pkg_sys list using system package manager
|
||||
when:
|
||||
@@ -157,50 +151,34 @@
|
||||
loop: "{{ pkg_archive }}"
|
||||
loop_control:
|
||||
loop_var: archive
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/archive.yml
|
||||
ansible.builtin.include_tasks: helpers/archive.yml
|
||||
|
||||
- name: Linux specific tasks
|
||||
when:
|
||||
- system == 'Linux'
|
||||
ansible.builtin.include_tasks:
|
||||
file: linux.yml
|
||||
ansible.builtin.include_tasks: linux.yml
|
||||
|
||||
- name: MacOS specific tasks
|
||||
when:
|
||||
- distribution == 'MacOSX'
|
||||
ansible.builtin.include_tasks:
|
||||
file: macos.yml
|
||||
ansible.builtin.include_tasks: macos.yml
|
||||
|
||||
- name: Install cargo packages
|
||||
when:
|
||||
- pkg_cargo|length > 0
|
||||
- pkg_cargo|length > 0 or
|
||||
pkg_cargo_build|length > 0
|
||||
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
|
||||
loop: "{{ pkg_cargo | unique }}"
|
||||
loop_control:
|
||||
loop_var: cargo
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/cargo.yml
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks: helpers/cargo.yml
|
||||
|
||||
- name: Build and install rust apps
|
||||
when:
|
||||
- pkg_cargo_build|length > 0
|
||||
block:
|
||||
- name: Run cargo build and install
|
||||
loop: "{{ cargo_pkg_build }}"
|
||||
- name: Install cargo_build packages
|
||||
loop: "{{ pkg_cargo_build }}"
|
||||
loop_control:
|
||||
loop_var: cargo_build
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/cargo_build.yml
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks: helpers/cargo_build.yml
|
||||
|
||||
- name: Install go packages
|
||||
when:
|
||||
@@ -210,8 +188,7 @@
|
||||
loop: "{{ pkg_go }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/go_install.yml
|
||||
ansible.builtin.include_tasks: helpers/go_install.yml
|
||||
|
||||
- name: Install local npm packages
|
||||
when:
|
||||
@@ -219,8 +196,7 @@
|
||||
loop: "{{ pkg_npm | unique }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: npm.yml
|
||||
ansible.builtin.include_tasks: helpers/npm.yml
|
||||
|
||||
- name: Install python pipx packages for user
|
||||
when:
|
||||
@@ -228,14 +204,16 @@
|
||||
loop: "{{ pkg_pipx | unique }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: pipx.yml
|
||||
ansible.builtin.include_tasks: helpers/pipx.yml
|
||||
|
||||
- name: Build and install source packages
|
||||
- name: Build and install make packages
|
||||
when:
|
||||
- pkg_src|length > 0
|
||||
loop: "{{ pkg_src | unique }}"
|
||||
- pkg_make|length > 0
|
||||
loop: "{{ pkg_make | unique }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: "src/{{ pkg }}.yml"
|
||||
ansible.builtin.include_tasks: helpers/make.yml
|
||||
|
||||
- name: Dump __configured
|
||||
ansible.builtin.debug:
|
||||
var: __configured
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
# Helpers:
|
||||
# - cargo_build
|
||||
---
|
||||
# {{{ Configure alacritty
|
||||
- name: Start alacritty configuration
|
||||
when:
|
||||
- "'alacritty' not in __configured"
|
||||
@@ -19,7 +18,7 @@
|
||||
ansible.builtin.set_fact:
|
||||
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:
|
||||
- alacritty_install_method == "source"
|
||||
block:
|
||||
@@ -50,13 +49,6 @@
|
||||
ansible.builtin.set_fact:
|
||||
alacritty_build_deps: "{{ build_deps + ['@Development Tools'] }}"
|
||||
|
||||
# }}}
|
||||
- name: Append alacritty installation
|
||||
block:
|
||||
- name: Append alacritty to pkg_cargo_build
|
||||
when:
|
||||
- alacritty_method == 'source'
|
||||
block:
|
||||
- name: Configure pkg dependencies
|
||||
loop: "{{ alacritty.pkg_deps }}"
|
||||
loop_control:
|
||||
@@ -67,10 +59,12 @@
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + alacritty_build_deps }}"
|
||||
pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}"
|
||||
|
||||
- name: Append alacritty to pkg_sys
|
||||
# }}}
|
||||
- name: Configure alacritty system install
|
||||
when:
|
||||
- alacritty_method == 'system'
|
||||
- alacritty_install_method == 'system'
|
||||
block:
|
||||
- name: Queue alacritty for installation
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [alacritty_pkgname] }}"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
when:
|
||||
- ansible_install_method is undefined
|
||||
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
|
||||
when:
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
|
||||
- name: Complete ansible_lint configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'ansible_lint': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'ansible_lint': ansible_lint_install_method } ) }}"
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
when:
|
||||
- ansible_ls_install_method is undefined
|
||||
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:
|
||||
- ansible_ls_install_method == 'source'
|
||||
block:
|
||||
- name: Load required installation dependencies
|
||||
loop: "{{ ansible_ls_pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: pkgdep
|
||||
ansible.builtin.include_tasks: "{{ pkgdep }}"
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
||||
|
||||
- name: Append ansible ls to pkg_npm
|
||||
ansible.builtin.set_fact:
|
||||
pkg_npm: "{{ pkg_npm + [ansible_npm_pkg] }}"
|
||||
pkg_npm: "{{ pkg_npm + [ansible_ls.npm_pkg] }}"
|
||||
|
||||
- name: Set ansible_ls_configured
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'ansible_ls': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'ansible_ls': ansible_ls_install_method } ) }}"
|
||||
|
||||
@@ -8,14 +8,16 @@
|
||||
when:
|
||||
- bashls_install_method is undefined
|
||||
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:
|
||||
- bashls_install_method == 'source'
|
||||
block:
|
||||
- name: Append bashls to pkg_npm
|
||||
ansible.builtin.set_fact:
|
||||
pkg_npm: "{{ pkg_npm + [bashls_npm_pkgname] }}"
|
||||
pkg_npm: "{{ pkg_npm + [bashls.npm_pkg] }}"
|
||||
|
||||
- name: Set bashls_configured
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'bashls': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'bashls': bashls_install_method } ) }}"
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append cmake to pkg_sys
|
||||
- name: Configure cmake
|
||||
when:
|
||||
- "'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 } ) }}"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
when:
|
||||
- direnv_install_method is undefined
|
||||
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
|
||||
when:
|
||||
@@ -18,4 +18,4 @@
|
||||
|
||||
- name: Finalize direnv configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'direnv': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'direnv': direnv_install_method } ) }}"
|
||||
|
||||
@@ -1,13 +1,28 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Add eza
|
||||
- name: Configure eza
|
||||
when:
|
||||
- eza_configured is undefined
|
||||
- "'eza' not in __configured"
|
||||
block:
|
||||
- name: Set eza install method
|
||||
when:
|
||||
- eza_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
eza_install_method: "{{ install_method if install_method in eza.install_methods else eza.install_methods[0] }}"
|
||||
|
||||
- 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'] }}"
|
||||
pkg_cargo: "{{ pkg_cargo + [eza_cargo_install] }}"
|
||||
|
||||
- name: Set eza_configured
|
||||
- name: Finalized eza configuration
|
||||
ansible.builtin.set_fact:
|
||||
eza_configured: true
|
||||
__configured: "{{ __configured | combine( { 'eza': eza_install_method} ) }}"
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append fzf to pkg_sys
|
||||
- name: Configure fzf
|
||||
when:
|
||||
- "'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 } ) }}"
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Load git config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/git.yml
|
||||
|
||||
- name: Append git to pkg_sys
|
||||
- name: Configure git
|
||||
when:
|
||||
- "'git' not in __configured"
|
||||
block:
|
||||
- name: Set git install method
|
||||
when:
|
||||
- git_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + git.pkgs }}"
|
||||
git_install_method: "{{ install_method if install_method in git.install_methods else git.install_methods[0] }}"
|
||||
|
||||
- name: Configure git system install
|
||||
when:
|
||||
- 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 } ) }}"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
when:
|
||||
- go_install_method is undefined
|
||||
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
|
||||
when:
|
||||
|
||||
@@ -8,26 +8,38 @@
|
||||
when:
|
||||
- neovim_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
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
|
||||
neovim_install_method: "{{ install_method if install_method in neovim.install_methods else neovim.install_methods[0] }}"
|
||||
|
||||
- name: Append neovim to pkg_appimage
|
||||
- name: Configure neovim source install
|
||||
when:
|
||||
- neovim.method == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_appimage: "{{ pkg_appimage + ['neovim'] }}"
|
||||
- neovim_install_method == "source"
|
||||
block:
|
||||
- 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
|
||||
when:
|
||||
- neovim.method == 'sys'
|
||||
- name: Set helper facts
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['neovim'] }}"
|
||||
neovim_src_install:
|
||||
path: "{{ d_cache.path }}/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
|
||||
when:
|
||||
- neovim.method == 'src'
|
||||
- name: Finalized neovim configuration
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + neovim.build_deps }}"
|
||||
pkg_src: "{{ pkg_src + ['neovim'] }}"
|
||||
__configured: "{{ __configured | combine( { 'neovim': neovim_install_method } ) }}"
|
||||
|
||||
@@ -1,9 +1,27 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Load nodejs config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/nodejs.yml
|
||||
|
||||
- name: Append nodejs to pkg_sys
|
||||
- name: Configure nodejs
|
||||
when:
|
||||
- "'nodejs' not in __configured"
|
||||
block:
|
||||
- name: Set nodejs install method
|
||||
when:
|
||||
- nodejs_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}"
|
||||
nodejs_install_method: "{{ install_method if install_method in nodejs.install_methods else nodejs.install_methods[0] }}"
|
||||
|
||||
- name: Configure nodejs system install
|
||||
when:
|
||||
- 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
3
tasks/pkgs/npm.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Include nodejs to satisfy npm
|
||||
ansible.builtin.include_tasks: pkgs/nodejs.yml
|
||||
@@ -8,13 +8,7 @@
|
||||
when:
|
||||
- rust_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
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"
|
||||
rust_install_method: "{{ install_method if install_method in rust.install_methods else rust.install_methods[0] }}"
|
||||
|
||||
- name: Append rust to install list
|
||||
when:
|
||||
|
||||
@@ -4,10 +4,26 @@
|
||||
when:
|
||||
- "'starship' not in __configured"
|
||||
block:
|
||||
- name: Set starship install method
|
||||
when:
|
||||
- starship_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
starship_install_method: "{{ install_method if install_method in starship.install_methods else starship.install_methods[0] }}"
|
||||
|
||||
- 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 startship configuration
|
||||
- name: Finalize starship configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'starship': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'starship': starship_install_method } ) }}"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
when:
|
||||
- zoxide_install_method is undefined
|
||||
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
|
||||
ansible.builtin.set_fact:
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
- name: Set zoxide_configured
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'zoxide': true } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'zoxide': zoxide_install_method } ) }}"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
- name: Set zsh install method
|
||||
when:
|
||||
- zsh_install_method is undefined
|
||||
ansible.bulitin.set_fact:
|
||||
zsh_install_method: "{{ install_method if install_method in zsh_install_methods else zsh_install_methods[0] }}"
|
||||
ansible.builtin.set_fact:
|
||||
zsh_install_method: "{{ install_method if install_method in zsh.install_methods else zsh.install_methods[0] }}"
|
||||
|
||||
- name: Append zsh to pkg_sys
|
||||
when:
|
||||
|
||||
@@ -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_flatpak: [] # flatpak packages to install
|
||||
pkg_go: [] # go applications
|
||||
pkg_make: [] # use gnu make to build/install
|
||||
pkg_npm: [] # npm commands
|
||||
pkg_pipx: [] # pipx packages
|
||||
pkg_sh: [] # use shell commands to install a package
|
||||
@@ -84,8 +85,6 @@ ansible_ls_version: latest
|
||||
ansible_npm_pkg:
|
||||
name: '@ansible/ansible-language-server'
|
||||
global: true
|
||||
ansible_ls_pkg_deps:
|
||||
- pkgs/npm.yml
|
||||
# }}}
|
||||
# {{{ bashls
|
||||
bashls_install_methods:
|
||||
@@ -130,48 +129,6 @@ go_pkgname:
|
||||
# neovim {{{
|
||||
neovim_version: master
|
||||
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_install_list:
|
||||
@@ -186,8 +143,6 @@ nerdfonts_install_path: share/fonts
|
||||
# }}}
|
||||
# rust {{{
|
||||
rust_pkgname: rust
|
||||
rust_pkgdeps:
|
||||
- cargo
|
||||
# }}}
|
||||
# {{{ zsh
|
||||
zsh_base_url: git://git.code.sf.net/p/zsh/code
|
||||
|
||||
@@ -91,10 +91,32 @@ ansible_ls:
|
||||
install_methods:
|
||||
- source
|
||||
- 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:
|
||||
install_methods:
|
||||
- system
|
||||
cargo:
|
||||
eza:
|
||||
install_methods:
|
||||
- source
|
||||
fzf:
|
||||
install_methods:
|
||||
- system
|
||||
git:
|
||||
@@ -107,19 +129,77 @@ go:
|
||||
hyprland:
|
||||
install_methods:
|
||||
- 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:
|
||||
- source
|
||||
- system
|
||||
- appimage
|
||||
- archive
|
||||
# }}}
|
||||
nerdfonts:
|
||||
install_methods:
|
||||
- archive
|
||||
- system
|
||||
nodejs:
|
||||
install_methods:
|
||||
- system
|
||||
pkgname:
|
||||
Linux: nodejs
|
||||
Darwin: node
|
||||
pkg_deps:
|
||||
Linux:
|
||||
- npm
|
||||
- sqlite
|
||||
rust:
|
||||
install_methods:
|
||||
- system
|
||||
starship:
|
||||
install_methods:
|
||||
- source
|
||||
yazi:
|
||||
install_methods:
|
||||
- source
|
||||
@@ -130,7 +210,6 @@ zoxide:
|
||||
zsh:
|
||||
install_methods:
|
||||
- system
|
||||
- source
|
||||
|
||||
## Package specific configuration that never need to be set by the installer
|
||||
__nerdfonts: # {{{
|
||||
|
||||
Reference in New Issue
Block a user