diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index da0aaf3..e7de935 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -14,6 +14,10 @@ alacritty_version: "{{ alacritty_version | default('v0.16.1') }}" alacritty_build_flags: "{{ alacritty_build_flags | default( ['--release'] ) }}" alacritty: + pkgname: + RedHat: alacritty + Debian: alacritty + Alpine: alacritty install_methods: - source - system @@ -81,9 +85,19 @@ - name: Set alacritty install method when: - alacritty_install_method is undefined - ansible.builtin.set_fact: - alacritty_install_method: "{{ install_method if install_method in alacritty.install_methods else alacritty.install_methods[0] }}" + 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 + - name: Fallback configuration for alacritty + when: + - alacritty_install_method is undefined + 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 # {{{ when: - alacritty_install_method == "source" diff --git a/tasks/pkgs/ansible_lint.yml b/tasks/pkgs/ansible_lint.yml index aa634fa..3cb38f3 100644 --- a/tasks/pkgs/ansible_lint.yml +++ b/tasks/pkgs/ansible_lint.yml @@ -3,8 +3,7 @@ ## Package: ansible_lint ## Description: Linter for ansible yaml ## Version: latest -## Methods: -## - source (pipx) +## Methods: source ## Helpers: pipx --- - name: Set ansible_lint default facts # {{{ @@ -29,8 +28,19 @@ - name: Set ansible_lint install method when: - ansible_lint_install_method 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] }}" + 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 + + - name: Fallback set ansible_lint install method + when: + - ansible_lint_install_method 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] }}" - name: Configure pipx source install when: diff --git a/tasks/pkgs/bat.yml b/tasks/pkgs/bat.yml index 5cba019..397cf6d 100644 --- a/tasks/pkgs/bat.yml +++ b/tasks/pkgs/bat.yml @@ -4,7 +4,7 @@ ## Description: cat replacement with style ## Version: latest ## Methods: -## - system +## - source --- - name: Start bat configuration when: diff --git a/tasks/pkgs/bitwarden.yml b/tasks/pkgs/bitwarden.yml deleted file mode 100644 index a0a508d..0000000 --- a/tasks/pkgs/bitwarden.yml +++ /dev/null @@ -1,53 +0,0 @@ -# vim: set filetype=yaml.ansible : -# -## Package: bitwarden -## Description: Desktop GUI for the bitwarden password/secrets manager -## Version: latest -## Methods: -## - flatpak -## - appimage -## Helpers: -## - flatpak -## - appimage ---- -- name: Set bitwarden default facts # {{{ - ansible.builtin.set_fact: - bitwarden: - install_methods: - - flatpak - - appimage - flatpak: - name: com.bitwarden.desktop - remote: flathub - method: system - appimage_url: https://bitwarden.com/download/?app=desktop&platform=linux&variant=appimage - pkg_deps: - - flatpak - - flathub -# }}} -- name: Configure bitwarden - when: - - "'bitwarden' not in __configured" - block: - - name: Set bitwarden install method - when: - - bitwarden_install_method is undefined - ansible.builtin.set_fact: - bitwarden_install_method: "{{ install_method if install_method in bitwarden.install_methods else bitwarden.install_methods[0] }}" - - - name: Set flatpak install facts - when: - - bitwarden_install_method == "flatpak" - block: - - name: Set flatpak package name - ansible.builtin.set_fact: - bitwarden_flatpak: - name: "{{ bitwarden.flatpak.name }}" - remote: "{{ bitwarden.flatpak.remote }}" - method: "{{ bitwarden_flatpak_method | default(flatpak_method) }}" - - - name: Finalize bitwarden configuration - when: - - "'bitwarden' not in __configured" - ansible.builtin.set_fact: - __configured: "{{ __configured | combine( { 'bitwarden': bitwarden_install_method } ) }}" diff --git a/tasks/pkgs/blender.yml b/tasks/pkgs/blender.yml deleted file mode 100644 index 16c9e59..0000000 --- a/tasks/pkgs/blender.yml +++ /dev/null @@ -1,13 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: Append blender to pkg_sys - when: - - ansible_system == 'Linux' - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + ['blender'] }}" - -- name: Append blender to pkg_cask - when: - - ansible_system == 'Darwin' - ansible.builtin.set_fact: - pkg_cask: "{{ pkg_cask + ['blender'] }}" diff --git a/tasks/pkgs/broot.yml b/tasks/pkgs/broot.yml index 83a51b8..9d2a64d 100644 --- a/tasks/pkgs/broot.yml +++ b/tasks/pkgs/broot.yml @@ -1,11 +1,17 @@ # vim: set filetype=yaml.ansible : +# +## Package: broot +## Description: terminal utility for navigating directory trees +## Version: 1.55.0 +## Methods: [source, system] +## Helpers: cargo --- - name: Set default broot values ansible.builtin.set_fact: broot: install_methods: - - system - source + - system version: 1.55.0 build_deps: Debian: @@ -26,8 +32,19 @@ - name: Set broot install method when: - broot_install_method is undefined - ansible.builtin.set_fact: - broot_install_method: "{{ install_method if install_method in broot.install_methods else broot.install_methods[0] }}" + block: + - name: Configure for RedHat <= 10 + when: + - os_family == 'RedHat' + - ansible_distribution_major_version|int <= 10 + ansible.builtin.set_fact: + broot_install_method: source + + - name: Fallback set ansible_lint install method + when: + - broot_install_method is undefined + ansible.builtin.set_fact: + broot_install_method: "{{ install_method if install_method in broot.install_methods else broot.install_methods[0] }}" - name: Configure broot source install when: @@ -38,6 +55,7 @@ broot_cargo_install: name: broot version: "{{ broot.version }}" + - name: Append broot to install list ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + broot.build_deps[os_family] }}" diff --git a/tasks/pkgs/cbfmt.yml b/tasks/pkgs/cbfmt.yml index b921d71..8c1114b 100644 --- a/tasks/pkgs/cbfmt.yml +++ b/tasks/pkgs/cbfmt.yml @@ -1,4 +1,7 @@ # vim: set filetype=yaml.ansible : +# +## Package: cbfmt +## Description --- - name: Set default cbfmt values ansible.builtin.set_fact: @@ -24,6 +27,15 @@ ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [cbfmt.pkgname] }}" + - name: Configure cbfmt source install + when: + - cbfmt_install_method == 'source' + block: + - name: Configure cbfmt cargo install + ansible.builtin.set_fact: + cbfmt_cargo_install: + + - name: Finalise cbfmt configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'cbfmt': cbfmt_install_method } ) }}" diff --git a/tasks/pkgs/cheat.yml b/tasks/pkgs/cheat.yml index 9f2ab44..a2c2c26 100644 --- a/tasks/pkgs/cheat.yml +++ b/tasks/pkgs/cheat.yml @@ -1,13 +1,42 @@ # vim: set filetype=yaml.ansible : +# +## Package: cheet +## Version: latest +## Methods: source +## Helpers: go --- -- name: Add cheat +- name: Set cheat default facts # {{{ + ansible.builtin.set_fact: + cheat: + install_methods: + - source + go_pkg: github.com/cheat/cheat/cmd/cheat + version: latest +# }}} +- name: Configure cheat when: - - cheat_configured is undefined + - "'cheat' not in __configured" block: - - name: Append cheat to pkg_go + - name: Set cheat install method + when: + - cheat_install_method is undefined ansible.builtin.set_fact: - pkg_go: "{{ pkg_go + ['github.com/cheat/cheat/cmd/cheat@latest'] }}" + cheat_install_method: "{{ install_method if install_method in cheat.install_methods else cheat.install_methods[0] }}" + + - name: Configure cheat source install + when: + - cheat_install_method == 'source' + block: + - name: Configure cheat go install + ansible.builtin.set_fact: + cheat_go_install: + url: "{{ cheat.go_pkg }}@{{ cheat.version }}" + bin: "{{ path_bin }}/cheat" + + - name: Append cheat to pkg_go + ansible.builtin.set_fact: + pkg_go: "{{ pkg_go + [cheat_go_install] }}" - name: Set cheat_configured ansible.builtin.set_fact: - cheat_configured: true + __configured: "{{ __configured | combine( { 'cheat': cheat_install_method } ) }}" diff --git a/tasks/pkgs/checkmake.yml b/tasks/pkgs/checkmake.yml index d91ba9c..c854820 100644 --- a/tasks/pkgs/checkmake.yml +++ b/tasks/pkgs/checkmake.yml @@ -1,13 +1,41 @@ # vim: set filetype=yaml.ansible : +# +## Package: checkmake +## Description: linter for makefiles +## Version: latest +## Methods: source +## Helpers: go --- -- name: Add checkmake +- name: Set checkmake default facts + ansible.builtin.set_fact: + checkmake: + install_methods: + - source + go_pkg: github.com/mrtazz/checkmake/cmd/checkmake + version: latest +- name: Configure checkmake when: - checkmake_configured is undefined block: - - name: Add checkmake to pkg_go + - name: Set checkmake install method + when: + - checkmake_install_method is undefined ansible.builtin.set_fact: - pkg_go: "{{ pkg_go + ['github.com/mrtazz/checkmake/cmd/checkmake@latest'] }}" + checkmake_install_method: "{{ install_method if install_method in checkmake.install_methods else checkmake.install_methods[0] }}" + + - name: Configure checkmake source install + when: + - checkmake_install_method == 'source' + block: + - name: Configure checkmake go install + ansible.builtin.set_fact: + checkmake_go_install: + url: "{{ checkmake.go_pkg }}@{{ checkmake.version }}" + + - name: Queue checkmake source install + ansible.builtin.set_fact: + pkg_go: "{{ pkg_go + [checkmake_go_install] }}" - name: Set checkmake_configured ansible.builtin.set_fact: - checkmake_configured: true + __configured: "{{ __configured | combine( { 'checkmake': checkmake_install_method } ) }}"