From 2d65e01f7b19faa00fed88344ba40bc3c1b0445d Mon Sep 17 00:00:00 2001 From: Matthew Stobbs Date: Thu, 19 Mar 2026 21:46:04 -0600 Subject: [PATCH] adjusting variable names, fixing errors --- tasks/facts.yml | 1 + tasks/main.yml | 55 ++---- tasks/pkgs/air.yml | 18 +- tasks/pkgs/alacritty.yml | 46 +++--- tasks/pkgs/ansible.yml | 35 +++- tasks/pkgs/ansible_lint.yml | 30 ++-- tasks/pkgs/ansible_ls.yml | 14 +- tasks/pkgs/bashls.yml | 14 +- tasks/pkgs/bat.yml | 22 ++- tasks/pkgs/broot.yml | 31 ++-- tasks/pkgs/btop.yml | 15 +- tasks/pkgs/buf.yml | 23 ++- tasks/pkgs/bufls.yml | 20 ++- tasks/pkgs/cargo.yml | 17 +- tasks/pkgs/cbfmt.yml | 17 +- tasks/pkgs/cheat.yml | 14 +- tasks/pkgs/checkmake.yml | 17 +- tasks/pkgs/choose.yml | 18 +- tasks/pkgs/clangd.yml | 24 ++- tasks/pkgs/cmake.yml | 17 +- tasks/pkgs/cmakelang.yml | 18 +- tasks/pkgs/commitlint-cli.yml | 18 +- tasks/pkgs/commitlint-config-conventional.yml | 18 +- tasks/pkgs/cssls.yml | 16 +- tasks/pkgs/direnv.yml | 24 ++- tasks/pkgs/dockerls.yml | 19 ++- tasks/pkgs/eslint.yml | 16 +- tasks/pkgs/eza.yml | 17 +- tasks/pkgs/fd.yml | 48 +++++- tasks/pkgs/firewalld.yml | 39 ++++- tasks/pkgs/flatpak.yml | 20 ++- tasks/pkgs/fzf.yml | 21 ++- tasks/pkgs/ghostty.yml | 156 +++++++++++++----- tasks/pkgs/nodejs.yml | 23 ++- tasks/pkgs/npm.yml | 3 + tasks/pkgs/rust.yml | 19 ++- tasks/pkgs/starship.yml | 14 +- tasks/pkgs/zig.yml | 58 +++++-- 38 files changed, 697 insertions(+), 298 deletions(-) diff --git a/tasks/facts.yml b/tasks/facts.yml index 8cb1acc..545a3a6 100644 --- a/tasks/facts.yml +++ b/tasks/facts.yml @@ -34,6 +34,7 @@ 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" diff --git a/tasks/main.yml b/tasks/main.yml index 6381216..6ce927d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,7 +27,7 @@ - "{{ path_bin }}" - "{{ path_cargo }}" - "{{ path_source }}" - - "{{ path_pipx }}" + - "{{ path_zig }}" loop_control: loop_var: path ansible.builtin.file: @@ -66,39 +66,6 @@ ansible.builtin.include_tasks: file: "pkgs/{{ pkg }}.yml" -- name: Ensure pipx is installed - when: - - pkg_pipx|length > 0 - block: - - name: Ensure pipx path exists - become: "{{ install_become }}" - become_user: "{{ install_become_user }}" - ansible.builtin.file: - state: directory - mode: '0755' - path: "{{ path_pipx }}" - -- name: Ensure appimage path exists - when: - - pkg_appimage is defined - - pkg_appimage|length > 0 - become: "{{ install_become }}" - become_user: "{{ install_become_user }}" - ansible.builtin.file: - state: directory - mode: '0755' - path: "{{ path_appimage }}" - -- name: Ensure archive path exists - when: - - pkg_archive|length > 0 - become: "{{ install_become }}" - become_user: "{{ install_become_user }}" - ansible.builtin.file: - state: directory - mode: '0755' - path: "{{ path_archive }}" - - name: Install pkg_sys list using system package manager when: - pkg_sys|length > 0 @@ -108,14 +75,6 @@ name: "{{ pkg_sys | unique }}" state: present -- name: Install pkg_archive - when: - - pkg_archive|length > 0 - loop: "{{ pkg_archive }}" - loop_control: - loop_var: archive - ansible.builtin.include_tasks: helpers/archive.yml - - name: Linux specific tasks when: - system == 'Linux' @@ -126,6 +85,16 @@ - distribution == 'MacOSX' ansible.builtin.include_tasks: macos.yml +- name: Install pkg_archive + when: + - pkg_archive|length > 0 + block: + - name: Install archives + loop: "{{ pkg_archive }}" + loop_control: + loop_var: archive + ansible.builtin.include_tasks: helpers/archive.yml + - name: Install cargo packages when: - pkg_cargo|length > 0 or @@ -161,7 +130,7 @@ loop_var: pkg ansible.builtin.include_tasks: helpers/npm.yml -- name: Install python pipx packages for user +- name: Install python pipx packages when: - pkg_pipx|length > 0 loop: "{{ pkg_pipx | unique }}" diff --git a/tasks/pkgs/air.yml b/tasks/pkgs/air.yml index ccce64f..9767eed 100644 --- a/tasks/pkgs/air.yml +++ b/tasks/pkgs/air.yml @@ -9,14 +9,14 @@ - name: Set air default facts # {{{ ansible.builtin.set_fact: air: - install_methods: + methods: - source install_files: - to: bin/air install_url: github.com/air-verse/air pkg_deps: - go - air_version: "{{ air_version | default('latest')}}" + version: "{{ air_version | default('latest')}}" # }}} - name: Start air configuration when: @@ -24,18 +24,18 @@ block: - name: Set air install method when: - - air_install_method is undefined + - air_imethod is undefined ansible.builtin.set_fact: - air_install_method: "{{ install_method if install_method in air.install_methods else air.install_methods[0] }}" + air_imethod: "{{ imethod if imethod in air.methods else air.methods[0] }}" - name: Set air build facts when: - - air_install_method == 'source' + - air_imethod == 'source' block: - name: Set air install package ansible.builtin.set_fact: air_go_pkg: - url: "{{ air.install_url }}@{{ air_version }}" + url: "{{ air.install_url }}@{{ air.version }}" bin: "{{ path_bin }}/air" - name: Clean existing air install @@ -54,6 +54,10 @@ ansible.builtin.set_fact: pkg_go: "{{ pkg_go + [air_go_pkg] }}" + - name: Finalise air source install + ansible.builtin.set_fact: + air_install: "{{ air_imethod }}={{ air_go_pkg }}" + - name: Finalize air configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'air': air_install_method } ) }}" + __configured: "{{ __configured | combine( { 'air': air_install } ) }}" diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index f0c86d9..344d01b 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -8,16 +8,16 @@ --- - name: Set alacritty default facts # {{{ ansible.builtin.set_fact: - alacritty_version: "{{ alacritty_version | default('v0.16.1') }}" - alacritty_build_flags: "{{ alacritty_build_flags | default( ['--release'] ) }}" alacritty: + methods: + - source + - system + build_flags: "{{ alacritty_build_flags | default( ['--release'] ) }}" + version: "{{ alacritty_version | default('v0.16.1') }}" pkgname: RedHat: alacritty Debian: alacritty Alpine: alacritty - install_methods: - - source - - system git_repo: https://github.com/alacritty/alacritty install_files: - from: target/release/alacritty @@ -33,7 +33,7 @@ - git - cargo - cmake - build_deps: + bds: RedHat: - fontconfig-devel - freetype-devel @@ -81,33 +81,33 @@ block: - name: Set alacritty install method when: - - alacritty_install_method is undefined + - alacritty_imethod is undefined block: - name: Configure for RedHat enterprise linux 10 when: - os_family == 'RedHat' - ansible_distribution_major_version|int <= 10 ansible.builtin.set_fact: - alacritty_install_method: source + alacritty_imethod: source - name: Fallback configuration for alacritty when: - - alacritty_install_method is undefined + - alacritty_imethod is undefined ansible.builtin.set_fact: - alacritty_install_method: "{{ install_method if install_method in alacritty.install_methods else alacritty.install_methods[0] }}" + alacritty_imethod: "{{ imethod if imethod in alacritty.methods else alacritty.methods[0] }}" - name: Configure alacritty source install # {{{ when: - - alacritty_install_method == "source" + - alacritty_imethod == "source" block: - name: Set alacritty build facts ansible.builtin.set_fact: alacritty_src_install: - build_flags: "{{ alacritty_build_flags }}" + build_flags: "{{ alacritty.build_flags }}" source_dir: "{{ d_cache.path }}/alacritty" repo: "{{ alacritty.git_repo }}" - version: "{{ alacritty_version }}" + version: "{{ alacritty.version }}" files: "{{ alacritty.install_files }}" - alacritty_build_deps: "{{ alacritty.build_deps[os_family] }}" + alacritty_bds: "{{ alacritty.bds[os_family] }}" - name: Set alacritty install extra build deps when: @@ -118,13 +118,13 @@ when: - ansible_distribution_major_version == 7 ansible.builtin.set_fact: - alacritty_build_deps: "{{ alacritty_build_deps + ['xcb-util-devel', '@Development Tools'] }}" + alacritty_bds: "{{ alacritty_bds + ['xcb-util-devel', '@Development Tools'] }}" - name: Add extra dependencies for EL8 when: - ansible_distribution_major_version == 8 ansible.builtin.set_fact: - alacritty_build_deps: "{{ alacritty_build_deps + ['@Development Tools'] }}" + alacritty_bds: "{{ alacritty_bds + ['@Development Tools'] }}" - name: Configure pkg dependencies loop: "{{ alacritty.pkg_deps }}" @@ -134,17 +134,25 @@ - name: Append build dependencies and cargo config ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + alacritty_build_deps }}" + pkg_sys: "{{ pkg_sys + alacritty_bds }}" pkg_cargo_build: "{{ pkg_cargo_build + [alacritty_src_install] }}" + - name: Finalise alacritty source instal + ansible.builtin.set_fact: + cargo_install: "{{ alacritty_imethod }}={{ alacritty_src_install }}+{{ alacritty_bds }}" + - name: Configure alacritty system install when: - - alacritty_install_method == 'system' + - alacritty_imethod == 'system' block: - name: Queue alacritty for installation ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [ alacritty.pkgname[os_family] ] }}" + - name: Finalise alacritty system install + ansible.builtin.set_fact: + alacritty_install: "{{ alacritty_imethod }}={{ alacritty.pkgname[os_family] ]}}" + - name: Complete alacritty configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'alacritty': alacritty_install_method } ) }}" + __configured: "{{ __configured | combine( { 'alacritty': alacritty_install } ) }}" diff --git a/tasks/pkgs/ansible.yml b/tasks/pkgs/ansible.yml index 1f3a426..95f186d 100644 --- a/tasks/pkgs/ansible.yml +++ b/tasks/pkgs/ansible.yml @@ -9,7 +9,7 @@ - name: Set ansible default facts # {{{ ansible.builtin.set_fact: ansible: - install_methods: + methods: - system - source pkgname: @@ -25,22 +25,39 @@ block: - name: Set ansible install method when: - - ansible_install_method is undefined + - ansible_imethod is undefined ansible.builtin.set_fact: - ansible_install_method: "{{ install_method if install_method in ansible.install_methods else ansible.install_methods[0] }}" + ansible_imethod: "{{ imethod if imethod in ansible.methods else ansible.methods[0] }}" - name: Append ansible to system package manager install list when: - - ansible_install_method == "system" - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [ ansible.pkgname[os_family] ] }}" + - ansible_imethod == "system" + block: + - name: Queue ansible sytem install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [ ansible.pkgname[os_family] ] }}" + + - name: Finalise ansible system install + ansible.builtin.set_fact: + ansible_install: "{{ ansible_imethod }}={{ ansible.pkgname[os_family] }}" - name: Append ansible to pipx install list when: - - ansible_install_method == 'source' + - ansible_imethod == 'source' ansible.builtin.set_fact: - pkg_pipx: "{{ pkg_pipx + [ { 'name': ansible.pkgname['pip'] } ] }}" + - name: Configure ansible source install + ansible.builtin.set_fact: + ansible_src_install: + name: "{{ ansible.pkgname['pip'] }}" + + - name: Queue ansible source install + ansible.builtin.set_fact: + pkg_pipx: "{{ pkg_pipx + [ansible_src_install] }}" + + - name: Finalise ansible source install + ansible.builtin.set_fact: + ansible_install: "{{ ansible_imethod }}={{ ansible_src_install }}" - name: Complete ansible configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'ansible': ansible_install_method } ) }}" + __configured: "{{ __configured | combine( { 'ansible': ansible_install } ) }}" diff --git a/tasks/pkgs/ansible_lint.yml b/tasks/pkgs/ansible_lint.yml index 26d7f4a..e4d4853 100644 --- a/tasks/pkgs/ansible_lint.yml +++ b/tasks/pkgs/ansible_lint.yml @@ -10,7 +10,7 @@ ansible.builtin.set_fact: ansible_lint_version: "{{ ansible_lint_version | default('latest') }}" ansible_lint: - install_methods: + methods: - source - system pkgname: @@ -28,35 +28,45 @@ block: - name: Set ansible_lint install method when: - - ansible_lint_install_method is undefined + - ansible_lint_imethod is undefined block: - name: Configure for RedHat <= 10 when: - os_family == 'RedHat' - ansible_distribution_major_version|int <= 10 ansible.builtin.set_fact: - ansible_lint_install_method: source + ansible_lint_imethod: source - name: Fallback set ansible_lint install method when: - - ansible_lint_install_method is undefined + - ansible_lint_imethod is undefined ansible.builtin.set_fact: - ansible_lint_install_method: "{{ install_method if install_method in ansible_lint.install_methods else ansible_lint.install_methods[0] }}" + ansible_lint_imethod: "{{ imethod if imethod in ansible_lint.methods else ansible_lint.methods[0] }}" - name: Configure pipx source install when: - - ansible_lint_install_method == "source" + - ansible_lint_imethod == "source" block: - name: Add ansible_lint to pipx install list ansible.builtin.set_fact: pkg_pipx: "{{ pkg_pipx + [ansible_lint.pkgname['pip']] }}" + - name: Finalise ansible_lint source install + ansible.builtin.set_fact: + ansible_lint_install: "{{ ansible_lint_imethod }}={{ ansible_lint.pkgname['pip'] }}" + - name: Append ansible-lint to system install list when: - - ansible_lint_install_method == 'system' - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname[ansible_os_family]] }}" + - ansible_lint_imethod == 'system' + block: + - name: Queue ansible_lint system install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname[os_family]] }}" + + - name: Finalise ansible_lint system install + ansible.builtin.set_fact: + ansible_lint_install: "{{ ansible_lint_imethod }}={{ ansible_lint.pkgname[os_family] }}" - name: Complete ansible_lint configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'ansible_lint': ansible_lint_install_method } ) }}" + __configured: "{{ __configured | combine( { 'ansible_lint': ansible_lint_install } ) }}" diff --git a/tasks/pkgs/ansible_ls.yml b/tasks/pkgs/ansible_ls.yml index 277556e..88fbc80 100644 --- a/tasks/pkgs/ansible_ls.yml +++ b/tasks/pkgs/ansible_ls.yml @@ -9,7 +9,7 @@ - name: Set ansible_ls default facts # {{{ ansible.builtin.set_fact: ansible_ls: - install_methods: + methods: - source - system npm_pkg: @@ -25,13 +25,13 @@ block: - name: Set ansible_ls install method when: - - ansible_ls_install_method is undefined + - ansible_ls_imethod 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_imethod: "{{ imethod if imethod in ansible_ls.methods else ansible_ls.methods[0] }}" - name: Configure ansible_ls source install when: - - ansible_ls_install_method == 'source' + - ansible_ls_imethod == 'source' block: - name: Load required installation dependencies loop: "{{ ansible_ls.pkg_deps }}" @@ -50,6 +50,10 @@ ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [ansible_ls_npm_pkg] }}" + - name: Finalise ansible_ls source install + ansible.builtin.set_fact: + ansible_ls_install: "{{ ansible_ls_imethod }}={{ ansible_ls_npm_pkg }}" + - name: Set ansible_ls_configured ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'ansible_ls': ansible_ls_install_method } ) }}" + __configured: "{{ __configured | combine( { 'ansible_ls': ansible_ls_install } ) }}" diff --git a/tasks/pkgs/bashls.yml b/tasks/pkgs/bashls.yml index b08fa21..8dc02cb 100644 --- a/tasks/pkgs/bashls.yml +++ b/tasks/pkgs/bashls.yml @@ -9,7 +9,7 @@ - name: Set bashls default facts # {{{ ansible.builtin.set_fact: bashls: - install_methods: + methods: - source npm_pkg: name: bash-language-server @@ -22,13 +22,13 @@ block: - name: Set bashls install method when: - - bashls_install_method is undefined + - bashls_imethod is undefined ansible.builtin.set_fact: - bashls_install_method: "{{ install_method if install_method in bashls.install_methods else bashls.install_methods[0] }}" + bashls_imethod: "{{ imethod if imethod in bashls.methods else bashls.methods[0] }}" - name: Configure bashls source install when: - - bashls_install_method == 'source' + - bashls_imethod == 'source' block: - name: Set bashls npm_pkg config ansible.builtin.set_fact: @@ -41,6 +41,10 @@ ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [bashls_npm_pkg] }}" + - name: Finalise bashls source install + ansible.builtin.set_fact: + bashls_install: "{{ bashls_imethod }}={{ bashls_npm_pkg }}" + - name: Set bashls_configured ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'bashls': bashls_install_method } ) }}" + __configured: "{{ __configured | combine( { 'bashls': bashls_install } ) }}" diff --git a/tasks/pkgs/bat.yml b/tasks/pkgs/bat.yml index ad05781..10a53b7 100644 --- a/tasks/pkgs/bat.yml +++ b/tasks/pkgs/bat.yml @@ -9,7 +9,7 @@ - name: Set bat default facts # {{{ ansible.builtin.set_fact: bat: - install_methods: + methods: - source - system pkgname: @@ -26,13 +26,13 @@ block: - name: Set bat install method when: - - bat_install_method is undefined + - bat_imethod is undefined ansible.builtin.set_fact: - bat_install_method: "{{ install_method if install_method in bat.install_methods else bat.install_methods[0] }}" + bat_imethod: "{{ imethod if imethod in bat.methods else bat.methods[0] }}" - name: Configure bat source install when: - - bat_install_method == "source" + - bat_imethod == "source" block: - name: Set bat cargo configuration ansible.builtin.set_fact: @@ -42,16 +42,24 @@ - name: Queue bat for cargo install ansible.builtin.set_fact: - pkg_carg: "{{ pkg_cargo + [bat_cargo_install] }}" + pkg_cargo: "{{ pkg_cargo + [bat_cargo_install] }}" + + - name: Finalise bat source install + ansible.builtin.set_fact: + bat_install: "{{ bat_imethod }}={{ bat_cargo_install }}" - name: Configure bat system install when: - - bat_install_method == "system" + - bat_imethod == "system" block: - name: Append bat to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [ bat.pkgname[os_family] ] }}" + - name: Finalise bat system install + ansible.builtin.set_fact: + bat_install: "{{ bat_imethod }}={{ bat.pkgname[os_family] }}" + - name: Finalize bat configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'bat': bat_install_method } ) }}" + __configured: "{{ __configured | combine( { 'bat': bat_install } ) }}" diff --git a/tasks/pkgs/broot.yml b/tasks/pkgs/broot.yml index 9d2a64d..8d6ac60 100644 --- a/tasks/pkgs/broot.yml +++ b/tasks/pkgs/broot.yml @@ -6,10 +6,10 @@ ## Methods: [source, system] ## Helpers: cargo --- -- name: Set default broot values +- name: Set default broot values # {{{ ansible.builtin.set_fact: broot: - install_methods: + methods: - source - system version: 1.55.0 @@ -25,30 +25,31 @@ Alpine: - libxcb-dev Darwin: [] -- name: Add broot +# }}} +- name: Configure broot when: - "'broot' not in __configured" block: - name: Set broot install method when: - - broot_install_method is undefined + - broot_imethod is undefined block: - name: Configure for RedHat <= 10 when: - os_family == 'RedHat' - - ansible_distribution_major_version|int <= 10 + - os_version.major | int <= 10 ansible.builtin.set_fact: - broot_install_method: source + broot_imethod: source - name: Fallback set ansible_lint install method when: - - broot_install_method is undefined + - broot_imethod is undefined ansible.builtin.set_fact: - broot_install_method: "{{ install_method if install_method in broot.install_methods else broot.install_methods[0] }}" + broot_imethod: "{{ imethod if imethod in broot.methods else broot.methods[0] }}" - name: Configure broot source install when: - - broot_install_method == 'source' + - broot_imethod == 'source' block: - name: Set cargo build options ansible.builtin.set_fact: @@ -61,9 +62,13 @@ pkg_sys: "{{ pkg_sys + broot.build_deps[os_family] }}" pkg_cargo: "{{ pkg_cargo + [broot_cargo_install] }}" + - name: Finalise broot source install + ansible.builtin.set_fact: + broot_install: "{{ broot_imethod }}={{ broot_cago_install }}+{{ broot.build_deps[os_family] }}" + - name: Configure broot system install when: - - broot_install_method == 'system' + - broot_imethod == 'system' block: - name: Append broot to pkg_sys when: @@ -71,6 +76,10 @@ ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + ['broot'] }}" + - name: Finalise broot system install + ansible.builtin.set_fact: + broot_install: "{{ broot_imethod }}=broot" + - name: Set broot_configured ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'broot': broot_install_method } ) }}" + __configured: "{{ __configured | combine( { 'broot': broot_install } ) }}" diff --git a/tasks/pkgs/btop.yml b/tasks/pkgs/btop.yml index 8f668e4..a57c25e 100644 --- a/tasks/pkgs/btop.yml +++ b/tasks/pkgs/btop.yml @@ -6,27 +6,32 @@ ## Methods: system ## Helpers: - --- -- name: Set default btop options +- name: Set default btop options # {{{ ansible.builtin.set_fact: btop: - install_methods: + methods: - system pkgname: btop +# }}} - name: Configure btop install when: - "'btop' not in __configured" block: - name: Set btop install method ansible.builtin.set_fact: - btop_install_method: "{{ install_method if install_method in btop.install_methods else btop.install_methods[0] }}" + btop_imethod: "{{ imethod if imethod in btop.methods else btop.methods[0] }}" - name: Configure btop system install when: - - btop_install_method == 'system' + - btop_imethod == 'system' block: - name: Append btop to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [btop.pkgname] }}" + + - name: Finalise btop system install + ansible.builtin.set_fact: + btop_install: "{{ btop_imethod }}={{ btop.pkgname }}" - name: Finalise btop configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'btop': btop_install_method } ) }}" + __configured: "{{ __configured | combine( { 'btop': btop_install } ) }}" diff --git a/tasks/pkgs/buf.yml b/tasks/pkgs/buf.yml index 7283d7a..3278b4a 100644 --- a/tasks/pkgs/buf.yml +++ b/tasks/pkgs/buf.yml @@ -6,35 +6,44 @@ ## Methods: source ## Helpers: go_install --- -- name: Set default buf values +- name: Set default buf values # {{{ ansible.builtin.set_fact: buf: - install_methods: + methods: - source build_deps: - go version: latest go_pkg: github.com/bufbuild/buf/cmd/buf +# }}} - name: Configure bug install when: - "'buf' not in __configured" block: - name: Set buf install method when: - - buf_install_method is undefined + - buf_imethod is undefined ansible.builtin.set_fact: - buf_install_method: "{{ install_method if install_method in buf.install_methods else buf.install_methods[0] }}" + buf_imethod: "{{ imethod if imethod in buf.methods else buf.methods[0] }}" - name: Configure buf source install when: - - buf_install_method == 'source' + - buf_imethod == 'source' block: - - name: Append buf to pkg_go + - name: Configure buf go install ansible.builtin.set_fact: buf_go_install: bin: buf url: "{{ buf.go_pkg }}@{{ buf.version }}" + - name: Append buf to pkg_go + ansible.builtin.set_fact: + pkg_go: "{{ pkg_go + [buf_go_install] }}" + + - name: Finalise buf source install + ansible.builtin.set_fact: + buf_install: "{{ buf_imethod }}={{ buf_go_install }}" + - name: Finalise buf configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'buf': buf_install_method } ) }}" + __configured: "{{ __configured | combine( { 'buf': buf_install } ) }}" diff --git a/tasks/pkgs/bufls.yml b/tasks/pkgs/bufls.yml index 010cfce..debd591 100644 --- a/tasks/pkgs/bufls.yml +++ b/tasks/pkgs/bufls.yml @@ -6,25 +6,25 @@ ## Methods: source ## Helpers: go_install --- -- name: Set default bufls options +- name: Set default bufls options # {{{ ansible.builtin.set_fact: bufls: - install_methods: + methods: - source version: latest go_pkg: github.com/bufbuild/buf-language-server/cmd/bufls - +# }}} - name: Configure bufls install when: - "'bufls' not in __configured" block: - name: Set bufls install method ansible.builtin.set_fact: - bufls_install_method: "{{ install_method if install_method in bufls.install_methods else bufls.install_methods[0] }}" + bufls_imethod: "{{ imethod if imethod in bufls.methods else bufls.methods[0] }}" - name: Configure bufls source install when: - - bufls_install_method == 'source' + - bufls_imethod == 'source' block: - name: Configure bufls go install ansible.builtin.set_fact: @@ -32,6 +32,14 @@ url: "{{ bufls.go_pkg }}@{{ bufls.version }}" bin: "{{ path_bin }}/bufls" + - name: Queue bufls go install + ansible.builtin.set_fact: + pkg_go: "{{ pkg_go + [bufls_go_install] }}" + + - name: Finalise bufls go install + ansible.builtin.set_fact: + bufls_install: "{{ bufls_imethod }}={{ bufls_go_install }}" + - name: Finalise bufls configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'bufls': bufls_install_method } ) }}" + __configured: "{{ __configured | combine( { 'bufls': bufls_install } ) }}" diff --git a/tasks/pkgs/cargo.yml b/tasks/pkgs/cargo.yml index c4d5b7d..eec4c19 100644 --- a/tasks/pkgs/cargo.yml +++ b/tasks/pkgs/cargo.yml @@ -6,25 +6,26 @@ ## Methods: system ## Helpers: - --- -- name: Set default cargo values +- name: Set default cargo values # {{{ ansible.builtin.set_fact: cargo: - install_methods: + methods: - system pkgname: RedHat: cargo Debian: cargo Alpine: cargo FreeBSD: cargo +# }}} - name: Configure cargo when: - "'cargo' not in __configured" block: - name: Set cargo install method when: - - cargo_install_method is undefined + - cargo_imethod is undefined ansible.builtin.set_fact: - cargo_install_method: "{{ install_method if install_method in cargo.install_methods else cargo.install_methods[0] }}" + cargo_imethod: "{{ imethod if imethod in cargo.methods else cargo.methods[0] }}" - name: Add dependencies when: @@ -36,12 +37,16 @@ - name: Append cargo to install list when: - - cargo_install_method == "system" + - cargo_imethod == "system" block: - name: Queue cargo install ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [cargo.pkgname[os_family]] }}" + - name: Finalise cargo system install + ansible.builtin.set_fact: + cargo_install: "{{ cargo_imethod }}={{ cargo.pkgname[os_family] }}" + - name: Finalize cargo configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine ( { 'cargo': cargo_install_method } ) }}" + __configured: "{{ __configured | combine ( { 'cargo': cargo_install } ) }}" diff --git a/tasks/pkgs/cbfmt.yml b/tasks/pkgs/cbfmt.yml index 2809315..c2ff780 100644 --- a/tasks/pkgs/cbfmt.yml +++ b/tasks/pkgs/cbfmt.yml @@ -6,27 +6,28 @@ ## Methods: system ## Helpers: cargo --- -- name: Set default cbfmt values +- name: Set default cbfmt values # {{{ ansible.builtin.set_fact: cbfmt: - install_methods: + methods: - source pkgname: cbfmt pkg_deps: - cargo +# }}} - name: Configure cbfmt install when: - "'cbfmt' not in __configured" block: - name: Set cbfmt install method when: - - cbfmt_install_method is undefined + - cbfmt_imethod is undefined ansible.builtin.set_fact: - cbfmt_install_method: "{{ install_method if install_method in cbfmt.install_methods else cbfmt.install_methods[0] }}" + cbfmt_imethod: "{{ imethod if imethod in cbfmt.methods else cbfmt.methods[0] }}" - name: Configure cbfmt source install when: - - cbfmt_install_method == 'source' + - cbfmt_imethod == 'source' block: - name: Configure cbfmt cargo install ansible.builtin.set_fact: @@ -36,6 +37,10 @@ ansible.builtin.set_fact: pkg_cargo: "{{ pkg_cargo + [cbfmt_cargo_install] }}" + - name: Finalise cbfmt cargo install + ansible.builtin.set_fact: + cbfmt_install: "{{ cbfmt_imethod }}={{ cbfmt_cargo_install }}" + - name: Finalise cbfmt configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'cbfmt': cbfmt_install_method } ) }}" + __configured: "{{ __configured | combine( { 'cbfmt': cbfmt_install } ) }}" diff --git a/tasks/pkgs/cheat.yml b/tasks/pkgs/cheat.yml index ca972dc..999878e 100644 --- a/tasks/pkgs/cheat.yml +++ b/tasks/pkgs/cheat.yml @@ -9,7 +9,7 @@ - name: Set cheat default facts # {{{ ansible.builtin.set_fact: cheat: - install_methods: + methods: - source go_pkg: github.com/cheat/cheat/cmd/cheat version: latest @@ -20,13 +20,13 @@ block: - name: Set cheat install method when: - - cheat_install_method is undefined + - cheat_imethod is undefined ansible.builtin.set_fact: - cheat_install_method: "{{ install_method if install_method in cheat.install_methods else cheat.install_methods[0] }}" + cheat_imethod: "{{ imethod if imethod in cheat.methods else cheat.methods[0] }}" - name: Configure cheat source install when: - - cheat_install_method == 'source' + - cheat_imethod == 'source' block: - name: Configure cheat go install ansible.builtin.set_fact: @@ -38,6 +38,10 @@ ansible.builtin.set_fact: pkg_go: "{{ pkg_go + [cheat_go_install] }}" + - name: Finalise cheat go install + ansible.builtin.set_fact: + cheat_install: "{{ cheat_imethod }}={{ cheat_go_install] }}" + - name: Set cheat_configured ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'cheat': cheat_install_method } ) }}" + __configured: "{{ __configured | combine( { 'cheat': cheat_install } ) }}" diff --git a/tasks/pkgs/checkmake.yml b/tasks/pkgs/checkmake.yml index 3d9dbdb..7d463d5 100644 --- a/tasks/pkgs/checkmake.yml +++ b/tasks/pkgs/checkmake.yml @@ -6,26 +6,27 @@ ## Methods: source ## Helpers: go_install --- -- name: Set checkmake default facts +- name: Set checkmake default facts # {{{ ansible.builtin.set_fact: checkmake: - install_methods: + methods: - source go_pkg: github.com/checkmake/checkmake/cmd/checkmake version: latest +# }}} - name: Configure checkmake when: - checkmake_configured is undefined block: - name: Set checkmake install method when: - - checkmake_install_method is undefined + - checkmake_imethod is undefined ansible.builtin.set_fact: - checkmake_install_method: "{{ install_method if install_method in checkmake.install_methods else checkmake.install_methods[0] }}" + checkmake_imethod: "{{ imethod if imethod in checkmake.methods else checkmake.methods[0] }}" - name: Configure checkmake source install when: - - checkmake_install_method == 'source' + - checkmake_imethod == 'source' block: - name: Configure checkmake go install ansible.builtin.set_fact: @@ -37,6 +38,10 @@ ansible.builtin.set_fact: pkg_go: "{{ pkg_go + [checkmake_go_install] }}" + - name: Finalise checkmake source install + ansible.builtin.set_fact: + checkmake_install: "{{ checkmake_imethod }}={{ checkmake_go_install }}" + - name: Set checkmake_configured ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'checkmake': checkmake_install_method } ) }}" + __configured: "{{ __configured | combine( { 'checkmake': checkmake_install } ) }}" diff --git a/tasks/pkgs/choose.yml b/tasks/pkgs/choose.yml index 25e1a83..11b0bd6 100644 --- a/tasks/pkgs/choose.yml +++ b/tasks/pkgs/choose.yml @@ -6,26 +6,26 @@ ## Methods: source ## Helpers: cargo --- -- name: Set choose default facts +- name: Set choose default facts # {{{ ansible.builtin.set_fact: choose: - install_methods: + methods: - source version: 1.3.7 - +# }}} - name: Configure choose when: - "'choose' not in __configured" block: - name: Set choose install method when: - - choose_install_method is undefined + - choose_imethod is undefined ansible.builtin.set_fact: - choose_install_method: "{{ install_method if install_method in choose.install_methods else choose.install_methods[0] }}" + choose_imethod: "{{ imethod if imethod in choose.methods else choose.methods[0] }}" - name: Configure choose source install when: - - choose_install_method == 'source' + - choose_imethod == 'source' block: - name: Configure choose cargo install ansible.builtin.set_fact: @@ -37,6 +37,10 @@ ansible.builtin.set_fact: pkg_cargo: "{{ pkg_cargo + [choose_cargo_install] }}" + - name: Finalise choose cargo install + ansible.builtin.set_fact: + choose_install: "{{ choose_imethod }}={{ choose_cargo_install] }}" + - name: Finalise choose configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'choose': choose_install_method } ) }}" + __configured: "{{ __configured | combine( { 'choose': choose_install } ) }}" diff --git a/tasks/pkgs/clangd.yml b/tasks/pkgs/clangd.yml index 05ecb26..6791602 100644 --- a/tasks/pkgs/clangd.yml +++ b/tasks/pkgs/clangd.yml @@ -6,33 +6,39 @@ ## Methods: system ## Helpers: - --- -- name: Set clangd default facts +- name: Set clangd default facts # {{{ ansible.builtin.set_fact: clangd: - install_methods: + methods: - system pkgname: RedHat: clang-devel Debian: clang-12 Darwin: llvm Alpine: clang19 - +# }}} - name: Configure clangd when: - "'clangd' not in __configured" block: - name: Set clangd install method when: - - clangd_install_method is undefined + - clangd_imethod is undefined ansible.builtin.set_fact: - clangd_install_method: "{{ install_method if install_method in clangd.install_methods else clangd.install_methods[0] }}" + clangd_imethod: "{{ imethod if imethod in clangd.methods else clangd.methods[0] }}" - name: Queue clangd system install when: - - clangd_install_method == 'system' - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [clangd.pkgname[os_family]] }}" + - clangd_imethod == 'system' + block: + - name: Queue clangd system install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [clangd.pkgname[os_family]] }}" + + - name: Finalise clangd system install + ansible.builtin.set_fact: + clangd_install: "{{ clangd_imethod }}={{ clangd.pkgname[os_family] }}" - name: Finalise clangd configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'clangd': clangd_install_method } ) }}" + __configured: "{{ __configured | combine( { 'clangd': clangd_install } ) }}" diff --git a/tasks/pkgs/cmake.yml b/tasks/pkgs/cmake.yml index 5eac0d0..f95f6eb 100644 --- a/tasks/pkgs/cmake.yml +++ b/tasks/pkgs/cmake.yml @@ -9,8 +9,9 @@ - name: Set cmake default facts # {{ ansible.builtin.set_fact: cmake: - install_methods: + methods: - system + pkgname: cmake # }} - name: Configure cmake when: @@ -18,18 +19,22 @@ block: - name: Set cmake install method when: - - cmake_install_method is undefined + - cmake_imethod is undefined ansible.builtin.set_fact: - cmake_install_method: "{{ install_method if install_method in cmake.install_methods else cmake.install_methods[0] }}" + cmake_imethod: "{{ imethod if imethod in cmake.methods else cmake.methods[0] }}" - name: Configure cmake system install when: - - cmake_install_method == "system" + - cmake_imethod == "system" block: - name: Append cmake to pkg_sys ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + ['cmake'] }}" + pkg_sys: "{{ pkg_sys + [cmake.pkgname] }}" + + - name: Finalise cmake system install + ansible.builtin.set_fact: + cmake_install: "{{ cmake_imethod }}={{ cmake.pkgname }}" - name: Finalize cmake configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'cmake': cmake_install_method } ) }}" + __configured: "{{ __configured | combine( { 'cmake': cmake_install } ) }}" diff --git a/tasks/pkgs/cmakelang.yml b/tasks/pkgs/cmakelang.yml index 6df40f9..9b52a63 100644 --- a/tasks/pkgs/cmakelang.yml +++ b/tasks/pkgs/cmakelang.yml @@ -6,31 +6,35 @@ ## Methods: system ## Helpers: - --- -- name: Set cmakelang default facts +- name: Set cmakelang default facts # {{{ ansible.builtin.set_fact: cmakelang: - install_methods: + methods: - system pkgname: cmakelang - +# }}} - name: Add cmakelang when: - "'cmakelang' not in __configured" block: - name: Set cmakelang install method when: - - cmakelang_install_method is undefined + - cmakelang_imethod is undefined ansible.builtin.set_fact: - cmakelang_install_method: "{{ install_method if install_method in cmakelang.install_methods else cmakelang.install_methods[0] }}" + cmakelang_imethod: "{{ imethod if imethod in cmakelang.methods else cmakelang.methods[0] }}" - name: Configure cmakelang system install when: - - cmakelang_install_method == 'system' + - cmakelang_imethod == 'system' block: - name: Queue cmakelang for system install ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [cmakelang.pkgname] }}" + - name: Finalise cmakelang system install + ansible.builtin.set_fact: + cmakelang_install: "{{ cmakelang_imethod }}={{ cmakelang.pkgname }}" + - name: Finalise cmakelang configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'cmakelang': cmakelang_install_method } ) }}" + __configured: "{{ __configured | combine( { 'cmakelang': cmakelang_install } ) }}" diff --git a/tasks/pkgs/commitlint-cli.yml b/tasks/pkgs/commitlint-cli.yml index 693b6f2..f46ad66 100644 --- a/tasks/pkgs/commitlint-cli.yml +++ b/tasks/pkgs/commitlint-cli.yml @@ -6,27 +6,27 @@ ## Methods: source ## Helpers: npm --- -- name: Set commitlint-cli default facts +- name: Set commitlint-cli default facts # {{{ ansible.builtin.set_fact: commitlint_cli: - install_methods: + methods: - source npm_pkg: '@commitlint/cli' version: v20.5.0 - +# }}} - name: Configure commitlint-cli when: - "'commitlint-cli' not in __configured" block: - name: Set commitlint-cli install method when: - - commitlint_cli_install_method is undefined + - commitlint_cli_imethod is undefined ansible.builtin.set_fact: - commitlint_cli_install_method: "{{ install_method if install_method in commitlint_cli.install_methods else commitlint_cli.install_methods[0] }}" + commitlint_cli_imethod: "{{ imethod if imethod in commitlint_cli.methods else commitlint_cli.methods[0] }}" - name: Configure commitlint-cli source install when: - - commitlint_cli_install_method == 'source' + - commitlint_cli_imethod == 'source' block: - name: Configure commitlint-cli npm install ansible.builtin.set_fact: @@ -38,6 +38,10 @@ ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [commitlint_cli_npm_install] }}" + - name: Finalise commitlint/cli npm install + ansible.builtin.set_fact: + commitlint_cli_install: "{{ commitlint_cli_imethod }}={{ commitlint_cli_npm_install }}" + - name: Finalise commitlint-cli configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'commitlint-cli': commitlint_cli_install_method } ) }}" + __configured: "{{ __configured | combine( { 'commitlint-cli': commitlint_cli_install } ) }}" diff --git a/tasks/pkgs/commitlint-config-conventional.yml b/tasks/pkgs/commitlint-config-conventional.yml index 097c8bc..ede0a74 100644 --- a/tasks/pkgs/commitlint-config-conventional.yml +++ b/tasks/pkgs/commitlint-config-conventional.yml @@ -6,27 +6,27 @@ ## Methods: source ## Helpers: npm --- -- name: Set commitlint-config-conventional default facts +- name: Set commitlint-config-conventional default facts # {{{ ansible.builtin.set_fact: clcc: - install_methods: + methods: - source npm_pkg: '@commitlint/config-conventional' version: v20.5.0 - +# }}} - name: Configure comitlint-config-conventional when: - "'comitlint_config_conventional' not in __configured" block: - name: Set commitlint-config-conventional install method when: - - clcc_install_method is undefined + - clcc_imethod is undefined ansible.builtin.set_fact: - clcc_install_method: "{{ install_method if install_method in clcc.install_methods else clcc.install_methods[0] }}" + clcc_imethod: "{{ imethod if imethod in clcc.methods else clcc.methods[0] }}" - name: Configure commitlint-config-conventional source install when: - - clcc_install_method == 'source' + - clcc_imethod == 'source' block: - name: Configure commitlint-config-conventional npm install ansible.builtin.set_fact: @@ -38,6 +38,10 @@ ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [clcc_npm_install] }}" + - name: Finalise commitling-config-conventional npm install + ansible.builtin.set_fact: + clcc_install: "{{ clcc_imethod }}={{ clcc_npm_install }}" + - name: Finalise comitlint-config-conventional configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'commitlint-config-conventional': clcc_install_method } ) }}" + __configured: "{{ __configured | combine( { 'commitlint-config-conventional': clcc_install } ) }}" diff --git a/tasks/pkgs/cssls.yml b/tasks/pkgs/cssls.yml index d3d8842..b302716 100644 --- a/tasks/pkgs/cssls.yml +++ b/tasks/pkgs/cssls.yml @@ -1,4 +1,16 @@ # vim: set filetype=yaml.ansible : +# +## Package: cssls +## Description: css language server from vscode +## AliasFor: vscode-langservers-extracted --- -- name: Pass to vscode-langservers-extracted - ansible.builtin.include_tasks: pkgs/vscode-langservers-extracted.yml +- name: Configure cssls + when: + - "'cssls' not in __configured" + block: + - name: Pass to vscode-langservers-extracted + ansible.builtin.include_tasks: pkgs/vscode-langservers-extracted.yml + + - name: Finalise cssls configuration + ansible.builtin.set_fact: + __configured: "{{ __configured | combine( { 'cssls': 'pass to vscode-langservers-extracted' } ) }}" diff --git a/tasks/pkgs/direnv.yml b/tasks/pkgs/direnv.yml index 18d8550..af7af10 100644 --- a/tasks/pkgs/direnv.yml +++ b/tasks/pkgs/direnv.yml @@ -6,33 +6,39 @@ ## Methods: system ## Helpers: - --- -- name: Set direnv default facts +- name: Set direnv default facts # {{{ ansible.builtin.set_fact: direnv: - install_methods: + methods: - system pkgname: RedHat: direnv Alpine: direnv Debian: direnv Darwin: direnv - +# }}} - name: Configure direnv when: - "'direnv' not in __configured" block: - name: Set direnv install method when: - - direnv_install_method is undefined + - direnv_imethod is undefined ansible.builtin.set_fact: - direnv_install_method: "{{ install_method if install_method in direnv.install_methods else direnv.install_methods[0] }}" + direnv_imethod: "{{ imethod if imethod in direnv.methods else direnv.methods[0] }}" - name: Append direnv to pkg_sys when: - - direnv_install_method == "system" - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [direnv.pkgname[os_family]] }}" + - direnv_imethod == "system" + block: + - name: Queue direnv system install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [direnv.pkgname[os_family]] }}" + + - name: Finalise direnv system install + ansible.builtin.set_fact: + direnv_install: "{{ direnv_imethod }}={{ direnv.pkgname[os_family] }}" - name: Finalize direnv configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'direnv': direnv_install_method } ) }}" + __configured: "{{ __configured | combine( { 'direnv': direnv_install } ) }}" diff --git a/tasks/pkgs/dockerls.yml b/tasks/pkgs/dockerls.yml index 96b4e6c..5c74743 100644 --- a/tasks/pkgs/dockerls.yml +++ b/tasks/pkgs/dockerls.yml @@ -6,35 +6,40 @@ ## Methods: source ## Helpers: npm --- -- name: Set dockerls default facts +- name: Set dockerls default facts # {{{ ansible.builtin.set_fact: dockerls: - install_methods: + methods: - source npm_pkg: dockerfile-language-server-nodejs - +# }}} - name: Configure dockerls when: - "'dockerls' not in _configured" block: - name: Set dockerls install method when: - - dockerls_install_method is undefined + - dockerls_imethod is undefined ansible.builtin.set_fact: - dockerls_install_method: "{{ install_method if install_method in dockerls.install_methods else dockerls.install_methods[0] }}" + dockerls_imethod: "{{ imethod if imethod in dockerls.methods else dockerls.methods[0] }}" - name: Configure dockerls source install when: - - dockerls_install_method == 'source' + - dockerls_imethod == 'source' block: - name: Configure dockerls npm install ansible.builtin.set_fact: dockerls_npm_install: name: "{{ dockerls.npm_pkg }}" + - name: Queue dockerls installation ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [dockerls_npm_install] }}" + - name: Finalise dockerls npm install + ansible.builtin.set_fact: + dockerls_install: "{{ dockerls_imethod }}={{ dockerls_npm_install }}" + - name: Finalise dockerls configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'dockerls': dockerls_install_method } ) }}" + __configured: "{{ __configured | combine( { 'dockerls': dockerls_install } ) }}" diff --git a/tasks/pkgs/eslint.yml b/tasks/pkgs/eslint.yml index d3d8842..1777fb2 100644 --- a/tasks/pkgs/eslint.yml +++ b/tasks/pkgs/eslint.yml @@ -1,4 +1,16 @@ # vim: set filetype=yaml.ansible : +# +## Package: eslint +## Description: Ecma script linter from vscode +## AliasFor: vscode-langservers-extracted --- -- name: Pass to vscode-langservers-extracted - ansible.builtin.include_tasks: pkgs/vscode-langservers-extracted.yml +- name: Configure eslint + when: + - "'eslint' not in __configured" + block: + - name: Pass to vscode-langservers-extracted + ansible.builtin.include_tasks: pkgs/vscode-langservers-extracted.yml + + - name: Finalise eslint configuration + ansible.builtin.set_fact: + __configured: "{{ __configured | combine( { 'eslint': 'pass to vscode-langservers-extracted' } ) }}" diff --git a/tasks/pkgs/eza.yml b/tasks/pkgs/eza.yml index 6c42ecd..9b37f1e 100644 --- a/tasks/pkgs/eza.yml +++ b/tasks/pkgs/eza.yml @@ -6,24 +6,25 @@ ## Methods: source ## Helpers: cargo --- -- name: Set eza default facts +- name: Set eza default facts # {{{ ansible.builtin.set_fact: eza: - install_methods: + methods: - system +# }}} - name: Configure eza when: - "'eza' not in __configured" block: - name: Set eza install method when: - - eza_install_method is undefined + - eza_imethod is undefined ansible.builtin.set_fact: - eza_install_method: "{{ install_method if install_method in eza.install_methods else eza.install_methods[0] }}" + eza_imethod: "{{ imethod if imethod in eza.methods else eza.methods[0] }}" - name: Configure eza source install when: - - eza_install_method == "source" + - eza_imethod == "source" block: - name: Configure eza cargo facts ansible.builtin.set_fact: @@ -34,6 +35,10 @@ ansible.builtin.set_fact: pkg_cargo: "{{ pkg_cargo + [eza_cargo_install] }}" + - name: Finalise eza source install + ansible.builtin.set_fact: + eza_install: "{{ eza_imethod }}={{ eza_cargo_install }}" + - name: Finalized eza configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'eza': eza_install_method} ) }}" + __configured: "{{ __configured | combine( { 'eza': eza_install} ) }}" diff --git a/tasks/pkgs/fd.yml b/tasks/pkgs/fd.yml index eb5c64f..7a8a94b 100644 --- a/tasks/pkgs/fd.yml +++ b/tasks/pkgs/fd.yml @@ -1,9 +1,45 @@ # vim: set filetype=yaml.ansible : +# +## Package: fd +## Description: a modern find replacement +## Version: latest +## Methods: system +## Helpers: - --- -- name: Load fd config - ansible.builtin.include_tasks: - file: config/fd.yml - -- name: Append fd to pkg_sys +- name: Set fd default facts # {{{ ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + fd.pkgs }}" + fd: + methods: + - system + pkgname: + RedHat: fd-find + Debian: fd + Darwin: fd + Alpine: fd + FreeBSD: fd-find +# }}} +- name: Configure fd + when: + - "'fd' not in __configured" + block: + - name: Set fd install method + when: + - fd_imethod is undefined + ansible.builtin.set_fact: + fd_imethod: "{{ imethod if imethod in fd.methods else fd.methods[0] }}" + + - name: Configur fd system install + when: + - fd_imethod == 'system' + block: + - name: Queue fd for system install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + fd.pkgname[os_family] }}" + + - name: Finalise fd system install + ansible.builtin.set_fact: + fd_install: "{{ fd_imethod }}={{ fd.pkgname[os_family] }}" + + - name: Finalise fd configuration + ansible.builtin.set_fact: + __configured: "{{ __configured | combine( { 'fd': fd_install } ) }}" diff --git a/tasks/pkgs/firewalld.yml b/tasks/pkgs/firewalld.yml index fb3721d..6f17a82 100644 --- a/tasks/pkgs/firewalld.yml +++ b/tasks/pkgs/firewalld.yml @@ -1,5 +1,40 @@ # vim: set filetype=yaml.ansible : +# +## Package: firewalld +## Description: zone based firewall +## Version: system +## Methods: system +## Helpers: - --- -- name: Append firewalld to pkg_sys +- name: Set firewalld default facts # {{{ ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + ['firewalld'] }}" + firewalld: + methods: + - system + pkgname: firewalld +# }}} +- name: Configure firewalld + when: + - "'firewalld' not in __configured" + block: + - name: Set firewalld install method + when: + - firewalld_imethod is undefined + ansible.builtin.set_fact: + firewalld_imethod: "{{ imethod if imethod in firewalld.methods else firewalld.methods[0] }}" + + - name: Configure firewalld system install + when: + - firewalld_imethod == 'system' + block: + - name: Append firewalld to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [firewalld.pkgname] }}" + + - name: Finalise firewalld system instal + ansible.builtin.set_fact: + firewalld_install: "{{ firewalld_imethod }}={{ firewalld.pkgname }}" + + - name: Finalise firewalld configuration + ansible.builtin.set_fact: + __configured: "{{ __configured | combine( { 'firewalld': firwalld_install } ) }}" diff --git a/tasks/pkgs/flatpak.yml b/tasks/pkgs/flatpak.yml index 31f745f..057e1b3 100644 --- a/tasks/pkgs/flatpak.yml +++ b/tasks/pkgs/flatpak.yml @@ -9,7 +9,7 @@ - name: Set flatpak default facts # {{{ ansible.builtin.set_fact: flatpak: - install_methods: + methods: - system pkgname: flatpak # }}} @@ -19,16 +19,22 @@ block: - name: Set flatpak install method when: - - flatpak_install_method is undefined + - flatpak_imethod is undefined ansible.builtin.set_fact: - flatpak_install_method: "{{ install_method if install_method in flatpak.install_methods else flatpak.install_methods[0] }}" + flatpak_imethod: "{{ imethod if imethod in flatpak.methods else flatpak.methods[0] }}" - name: Append flatpak to pkg_sys when: - - flatpak_install_method == 'system' - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [flatpak.pkgname] }}" + - flatpak_imethod == 'system' + block: + - name: Configure flatpak system install + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + [flatpak.pkgname] }}" + + - name: Finalise flatpak system install + ansible.builtin.set_fact: + flatpak_install: "{{ flatpak_imethod }}={{ flatpak.pkgname }}" - name: Finalise flatpak configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'flatpak': flatpak_install_method } ) }}" + __configured: "{{ __configured | combine( { 'flatpak': flatpak_install } ) }}" diff --git a/tasks/pkgs/fzf.yml b/tasks/pkgs/fzf.yml index 7a030e5..15131d4 100644 --- a/tasks/pkgs/fzf.yml +++ b/tasks/pkgs/fzf.yml @@ -1,10 +1,17 @@ # vim: set filetype=yaml.ansible : +# +## Package: fzf +## Description: the standard for fuzzy finders +## Version: latest +## Methods: system +## Helpers: - --- - name: Set fzf default facts # {{{ ansible.builtin.set_fact: fzf: - install_methods: + methods: - system + pkgname: fzf # }}} - name: Configure fzf when: @@ -12,18 +19,22 @@ block: - name: Set fzf install method when: - - fzf_install_method is undefined + - fzf_imethod is undefined ansible.builtin.set_fact: - fzf_install_method: "{{ install_method if install_method in fzf.install_methods else fzf.install_methods[0] }}" + fzf_imethod: "{{ imethod if imethod in fzf.methods else fzf.methods[0] }}" - name: Configure fzf system install when: - - fzf_install_method == "system" + - fzf_imethod == "system" block: - name: Append fzf to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + ['fzf'] }}" + - name: Finalise fzf system install + ansible.builtin.set_fact: + fzf_install: "{{ fzf_imethod }}={{ fzf.pkgname }}" + - name: Finalize fzf configuration ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'fzf': fzf_install_method } ) }}" + __configured: "{{ __configured | combine( { 'fzf': fzf_install } ) }}" diff --git a/tasks/pkgs/ghostty.yml b/tasks/pkgs/ghostty.yml index 36dec3e..8017405 100644 --- a/tasks/pkgs/ghostty.yml +++ b/tasks/pkgs/ghostty.yml @@ -1,51 +1,133 @@ # vim: set filetype=yaml.ansible : +# +## Package: ghostty +## Description: HW accelerated terminal emulator made with zig +## Version: 1.3.1 +## Methods: [system, source, appimage] +## Helpers: [zig, repo, appimage] --- -- name: Add ghostty +- name: Set ghostty default facts # {{{ + ansible.builtin.set_fact: + ghostty: + version: 1.3.1 + base_url: https://releases.files.ghostty.org + # install methods per distribution + default: + methods: + - source + pkg_deps: &pkgdeps + - zig + build_deps: + - gtk4 + - libadwaita + - gtk4-layer-shell + - pkgconf + - gettext + Redhat: &redhat + methods: + - source + - appimage + pkg_deps: *pkgdeps + build_deps: + - gtk4-devel + - gtk4-layer-shell-devel + - libadwaita-devel + - gettext + AlmaLinux: *redha + CentOS: *redhat + Rocky: *redhat + Debian: &debian + methods: + - source + - appimage + pkg_deps: *pkgdeps + build_deps: + - libgtk-4-dev + - libgtk4-layer-shell-dev + - libadwaita-1-dev + - gettext + - libxml2-utils + Ubuntu: *debian + Raspbian: *debian + Linux Mint: *debian + Archlinux: &arch + methods: + - system + - source + - appimage + pkg_deps: *pkgdeps + build_deps: + - gtk4 + - gtk4-layer-shell + - libadwaita + - gettext + pkgname: ghostty + Majaro: *arch + Fedora: + methods: + - source + - appimage + pkg_deps: *pkgdeps + build_deps: + - gtk4-devel + - gtk4-layer-shell-devel + - libadwaita-devel + - gettext + Alpine: + methods: + - system + - source + - appimage + pkg_deps: *pkgdeps + build_deps: + - gtk4.0-dev + - libadwaita-dev + - pkgconf + - ncurses + - gettext + pkgname: ghostty +# }}} +- name: Set ghostty facts + ansible.builtin.set_fact: + ghostty: + methods: "{{ ghostty[distribution].methods | default(_methods['default']) }}" + source_url: "{{ ghostty.base_url }}/{{ ghostty.version }}/ghostty-{{ ghostty.version }}.tar.gz" + pkg_deps: "{{ ghostty[distribution].pkg_deps | default(omit) }}" +- name: Configure ghostty block: - - name: Load ghostty config - ansible.builtin.include_tasks: - file: config/ghostty.yml - - - name: Append ghostty to pkg_src + - name: Set ghostty install method when: - - ghostty.method == 'src' + - ghostty_imethod is undefined ansible.builtin.set_fact: - pkg_src: "{{ pkg_src + ghostty.pkg }}" - pkg_sys: "{{ pkg_sys + ghostty.build_deps }}" + ghostty_imethod: "{{ imethod if imethod in ghostty.methods else ghostty.methods[0] }}" - - name: Append ghostty to pkg_appimage + - name: Configure ghostty source install when: - - ghostty.method == 'appimage' - ansible.builtin.set_fact: - pkg_appimage: "{{ pkg_appimage + ghostty }}" - - - name: Install ghostty via package manager - when: - - ghostty.method == 'sys' + - ghostty_imethod == 'source' block: - - name: Enable repo for ghostty - when: - - ansible_distribution == 'Fedora' - changed_when: true - ansible.builtin.get_url: - mode: '0644' - decompress: false - backup: false - url: "{{ ghostty.pkg_repo.url }}" - dest: "{{ ghostty.pkg_repo.dest }}" + - name: Append ghostty to pkg_src + ansible.builtin.set_fact: + pkg_src: "{{ pkg_src + ghostty.pkg }}" + pkg_sys: "{{ pkg_sys + ghostty.build_deps }}" - - name: Append ghostty to pkg_sys + - name: Configure ghostty appimage install + when: + - ghostty_imethod == 'appimage' + block: + - name: Append ghostty to pkg_appimage when: - - ansible_distriubtion + - ghostty.method == 'appimage' + ansible.builtin.set_fact: + pkg_appimage: "{{ pkg_appimage + ghostty }}" + + - name: Configure ghostty system install + when: + - ghostty_imethod == 'system' + block: + - name: Queue ghostty to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + ghostty.pkg }}" - - name: Append ghostty to pkg_cask - when: - - ghostty.method == 'cask' + - name: Finalise ghostty configuration ansible.builtin.set_fact: - pkg_cask: "{{ pkg_cask + ghostty.pkg }}" - - - name: Set ghostty_configured - ansible.builtin.set_fact: - ghostty_configured: true + __configured: "{{ __configured | combine( { 'ghostty': ghostty_install } ) }}" diff --git a/tasks/pkgs/nodejs.yml b/tasks/pkgs/nodejs.yml index e221d54..dcb97ef 100644 --- a/tasks/pkgs/nodejs.yml +++ b/tasks/pkgs/nodejs.yml @@ -1,5 +1,23 @@ # vim: set filetype=yaml.ansible : +# +## Package: nodejs +## Description: v8 javascript engine +## Version: system +## Methods: system +## Helpers: - --- +- name: Set nodejs default facts + ansible.builtin.set_fact: + nodejs: + install_methods: + - system + pkgname: + RedHat: [nodejs] + Debian: [nodejs] + Alpine: [nodejs] + FreeBSD: + - node + - npm - name: Configure nodejs when: - "'nodejs' not in __configured" @@ -16,11 +34,10 @@ block: - name: Set nodejs package name ansible.builtin.set_fact: - nodejs_pkgname: "{{ nodejs.pkgname[system] }}" - nodejs_deps: "{{ nodejs.pkg_deps[system] | default([]) }}" + nodejs_pkgname: "{{ nodejs.pkgname[os_family] }}" - name: Append nodejs to pkg_sys ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [nodejs_pkgname] + nodejs_deps }}" + pkg_sys: "{{ pkg_sys + [nodejs_pkgname] }}" - name: Finalize nodejs configuration ansible.builtin.set_fact: diff --git a/tasks/pkgs/npm.yml b/tasks/pkgs/npm.yml index b0cc098..062c9d8 100644 --- a/tasks/pkgs/npm.yml +++ b/tasks/pkgs/npm.yml @@ -1,3 +1,6 @@ +# vim: set filetype=yaml.ansible : +# +## Redirect to nodejs --- - name: Include nodejs to satisfy npm ansible.builtin.include_tasks: pkgs/nodejs.yml diff --git a/tasks/pkgs/rust.yml b/tasks/pkgs/rust.yml index c804b3f..44de750 100644 --- a/tasks/pkgs/rust.yml +++ b/tasks/pkgs/rust.yml @@ -1,5 +1,22 @@ # vim: set filetype=yaml.ansible : +# +## Package: rust +## Description: rust compiler and standard library +## Version: system +## Methods: system +## Helpers: - --- +- name: Set rust default facts + ansible.builtin.set_fact: + rust: + install_methods: + - system + pkgname: + RedHat: rust + Debian: rust + Alpine: rust + Archlinux: rust + FreeBSD: rust - name: Configure rust when: - "'rust' not in __configured" @@ -16,7 +33,7 @@ block: - name: Queue rust install ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + [rust_pkgname] }}" + pkg_sys: "{{ pkg_sys + [rust.pkgname[os_family]] }}" - name: Finalize rust configuration ansible.builtin.set_fact: diff --git a/tasks/pkgs/starship.yml b/tasks/pkgs/starship.yml index d22e8c0..2a888d2 100644 --- a/tasks/pkgs/starship.yml +++ b/tasks/pkgs/starship.yml @@ -1,6 +1,18 @@ # vim: set filetype=yaml.ansible : +# +## Package: starship +## Description: fancy and useful shell prompt +## Version: latest +## Methods: source +## Helpers: cargo --- -- name: Add starship +- name: Set starship default config + ansible.builtin.set_fact: + starship: + install_methods: + - source + +- name: Configure starship when: - "'starship' not in __configured" block: diff --git a/tasks/pkgs/zig.yml b/tasks/pkgs/zig.yml index 569f854..886182b 100644 --- a/tasks/pkgs/zig.yml +++ b/tasks/pkgs/zig.yml @@ -1,17 +1,55 @@ # vim: set filetype=yaml.ansible : +# +## Package: zig +## Description: zig programming language tool chain +## Version: 0.15.2 +## Methods: [system, archive] +## Helpers: archive --- -- name: Add zig +- name: Set zig default facts + ansible.builtin.set_fact: + install_methods: + - archive + - system + version: "{{ zig_version | default('0.15.2') }}" + archive: + url: https://ziglang.org/download + +- name: Configure zig when: - - zig_configured is undefined + - "'zig' not in __configured" block: - - name: Load zig config - ansible.builtin.include_tasks: - file: config/zig.yml - - - name: Append zig to pkg_archive + - name: Set zig install method + when: + - zig_install_method is undefined ansible.builtin.set_fact: - pkg_archive: "{{ pkg_archive + ['zig'] }}" + zig_install_method: "{{ install_method if install_method in zig.install_methods else zig.install_methods[0] }}" - - name: Set zig_configured + - name: Configure zig system install + when: + - zig_install_method == 'system' ansible.builtin.set_fact: - zig_configured: true + pkg_sys: "{{ pkg_sys + [zig.pkgname[os_family]] }}" + + - name: Configure zig archive install + when: + - zig_install_method == 'archive' + block: + - name: Configure zig archive install + ansible.builtin.set_fact: + zig_archive_install: + url: "{{ zig.archive.url }}/{{ zig.version }}/zig-{{ architecture }}-{{ system | lower }}-{{ zig.version }}.tar.xz" + extract_to: "{{ path_zig }}" + name: "zig-{{ zig.version }}.tar.xz" + links: + - from: "{{ path_archive }}/zig-{{ architecture }}-{{ system | lower }}-{{ zig.version }}/zig" + to: "{{ path_bin }}/zig" + force: true + + - name: Finalise zig archive install + ansible.builtin.set_fact: + zig_install: "{{ zig_archive_install }}" + + - name: Finalise zig configuration + ansible.builtin.set_fact: + __configured: "{{ __configured | combine( { 'zig': zig_install } ) }}"