From 41b1acc06710d674696745029884bee761b72a46 Mon Sep 17 00:00:00 2001 From: Matthew Stobbs Date: Thu, 20 Feb 2025 15:03:54 -0700 Subject: [PATCH] more fixs for packages --- handlers/main.yml | 2 +- tasks/addpkg.yml | 22 +------- tasks/archive/luals.yml | 36 ++++++++++++ tasks/config/alacritty.yml | 11 ++-- tasks/config/carapace.yml | 6 +- tasks/config/clangd.yml | 4 ++ tasks/config/consul.yml | 4 ++ tasks/config/hashicorp.yml | 13 +++++ tasks/config/kitty.yml | 4 ++ tasks/config/libreoffice.yml | 2 +- tasks/config/lua-language-server.yml | 5 -- tasks/config/luals.yml | 14 +++++ tasks/config/nerdfonts.yml | 2 +- tasks/config/zfs.yml | 14 +---- tasks/config/zig.yml | 4 +- tasks/facts.yml | 26 ++++++--- tasks/main.yml | 8 +-- tasks/pkgs/alacritty.yml | 12 ++-- tasks/pkgs/carapace.yml | 32 +++++------ tasks/pkgs/clangd.yml | 8 +-- tasks/pkgs/consul.yml | 21 +++---- tasks/pkgs/hashicorp.yml | 3 + tasks/pkgs/kitty.yml | 4 +- tasks/pkgs/libreoffice.yml | 2 +- tasks/pkgs/lua-language-server.yml | 22 ++------ .../{hashicorp_repo.yml => hashicorp.yml} | 4 -- tasks/repos/{terra_repo.yml => terra.yml} | 0 tasks/src/alacritty.yml | 7 --- tasks/src/lua-language-server.yml | 56 ------------------- vars/pkgs/alacritty.yml | 10 +--- vars/pkgs/carapace.yml | 10 ++++ vars/pkgs/consul.yml | 7 ++- vars/pkgs/hashicorp.yml | 6 +- vars/pkgs/luals.yml | 1 + 34 files changed, 181 insertions(+), 201 deletions(-) create mode 100644 tasks/archive/luals.yml create mode 100644 tasks/config/clangd.yml create mode 100644 tasks/config/consul.yml create mode 100644 tasks/config/hashicorp.yml create mode 100644 tasks/config/kitty.yml delete mode 100644 tasks/config/lua-language-server.yml create mode 100644 tasks/config/luals.yml create mode 100644 tasks/pkgs/hashicorp.yml rename tasks/repos/{hashicorp_repo.yml => hashicorp.yml} (96%) rename tasks/repos/{terra_repo.yml => terra.yml} (100%) delete mode 100644 tasks/src/alacritty.yml delete mode 100644 tasks/src/lua-language-server.yml diff --git a/handlers/main.yml b/handlers/main.yml index bea301b..a82b36c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,6 +1,6 @@ # vim: set filetype=yaml.ansible : --- -- name: Depend go +- name: Dep end go ansible.builtin.include_tasks: file: addpkg.yml vars: diff --git a/tasks/addpkg.yml b/tasks/addpkg.yml index 111855a..3935707 100644 --- a/tasks/addpkg.yml +++ b/tasks/addpkg.yml @@ -1,31 +1,11 @@ # vim: set filetype=yaml.ansible : --- -- name: "Check if task exists for {{ pkg }}" - ansible.builtin.stat: - path: "{{ role_path }}/tasks/pkgs/{{ pkg }}.yml" - register: stat_pkg - -- name: Dump stat_pkg - ansible.builtin.debug: - var: stat_pkg - -- name: "Check if specialized configuration exists for {{ pkg }}" - ansible.builtin.stat: - path: "{{ role_path }}/tasks/config/{{ pkg }}.yml" - register: stat_config - -- name: Dump stat_config - ansible.builtin.debug: - var: stat_config - - name: "Load specialized configuration if it exists for {{ pkg }}" when: - - stat_config.stat.exists + - pkgconfig[pkg] is defined ansible.builtin.include_tasks: file: "config/{{ pkg }}.yml" - name: "Add include task for {{ pkg }}" - when: - - stat_pkg.stat.exists ansible.builtin.include_tasks: file: "pkgs/{{ pkg }}.yml" diff --git a/tasks/archive/luals.yml b/tasks/archive/luals.yml new file mode 100644 index 0000000..b0af1f5 --- /dev/null +++ b/tasks/archive/luals.yml @@ -0,0 +1,36 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Create temp path + register: d_luals_dl_tmp + ansible.builtin.tempfile: + state: directory + prefix: luals_dl. + +- name: Get latest lua-language-server + become: "{{ ext_become }}" + ansible.builtin.get_url: + dest: "{{ d_luals_dl_tmp.path }}/{{ luals_vars.archive }}" + url: "{{ luals_vars.url }}/{{ luals_vars.archive }}" + mode: "0644" + decompress: false + +- name: Create install_path + become: "{{ ext_become }}" + ansible.builtin.file: + state: directory + path: "{{ path.archive }}/luals" + mode: "0755" + +- name: Extract lua language server archive + become: "{{ ext_become }}" + ansible.builtin.unarchive: + dest: "{{ path.archive }}/luals" + src: "{{ d_luals_dl_tmp.path }}/{{ luals_vars.archive }}" + remote_src: true + +- name: Link lua language server binary + become: "{{ ext_become }}" + ansible.builtin.file: + state: link + src: "{{ path.bin }}/lua-language-server" + path: "{{ path.archive }}/luals/bin/lua-language-server" diff --git a/tasks/config/alacritty.yml b/tasks/config/alacritty.yml index 3b8e511..5a26957 100644 --- a/tasks/config/alacritty.yml +++ b/tasks/config/alacritty.yml @@ -4,10 +4,7 @@ ansible.builtin.set_fact: alacritty: deps: "{{ pkgconfig.alacritty[ansible_os_family].build_deps }}" - ver: "{{ pkgconfig.alacritty.version }}" - repo: "{{ pkgconfig.alacritty.git_repo }}" - pkgs: "{{ pkgconfig.alacritty[ansible_os_family].pkgs | default(omit) }}" - bin: "{{ paths.install }}/bin/alacritty" - cargo: - locked: true - pkg: alacritty + vers: "{{ pkgconfig.alacritty.version }}" + cask: "{{ pkgconfig.alacritty.cask | default(omit) }}" + locked: true + name: alacritty diff --git a/tasks/config/carapace.yml b/tasks/config/carapace.yml index 431be9c..1263a5f 100644 --- a/tasks/config/carapace.yml +++ b/tasks/config/carapace.yml @@ -1,3 +1,7 @@ # vim: set filetype=yaml.ansible : --- -version: 1.1.1 +- name: Set carapace config + ansible.builtin.set_fact: + carapace: + pkgs: "{{ pkgconfig.carapace.pkgs[ansible_system] }}" + repo: "{{ pkgconfig.carapace.repo[ansible_os_family] }}" diff --git a/tasks/config/clangd.yml b/tasks/config/clangd.yml new file mode 100644 index 0000000..6777ccb --- /dev/null +++ b/tasks/config/clangd.yml @@ -0,0 +1,4 @@ +- name: Set clangd config + ansible.builtin.set_fact: + clangd: + pkgs: "{{ pkgconfig.clangd.pkg[ansible_os_family] }}" diff --git a/tasks/config/consul.yml b/tasks/config/consul.yml new file mode 100644 index 0000000..379cc81 --- /dev/null +++ b/tasks/config/consul.yml @@ -0,0 +1,4 @@ +- name: Set configuration for consul + ansible.builtin.set_fact: + consul: + pkgs: "{{ pkgconfig.consul.pkgs[ansible_system] }}" diff --git a/tasks/config/hashicorp.yml b/tasks/config/hashicorp.yml new file mode 100644 index 0000000..fb4bf55 --- /dev/null +++ b/tasks/config/hashicorp.yml @@ -0,0 +1,13 @@ +- name: Set OS name for RedHat family + when: + - ansible_os_famly == 'RedHat' + ansible.builtin.set_fact: + hashicorp: + repo: "{{ pkgconfig.hashicorp.Linux[rpm_dist.stdout] }}" + +- name: Set repo for debian + when: + - ansible_os_family == 'Debian' + ansible.builtin.set_Fact: + hashicorp: + repo: "{{ pkgconfig.hashicorp.Linux.Debian }}" diff --git a/tasks/config/kitty.yml b/tasks/config/kitty.yml new file mode 100644 index 0000000..cb964ec --- /dev/null +++ b/tasks/config/kitty.yml @@ -0,0 +1,4 @@ +- name: Set kitty config + ansible.buitlin.set_fact: + kitty: + pkgs: "{{ pkgconfig.kitty.pkgs[ansible_system] }}" diff --git a/tasks/config/libreoffice.yml b/tasks/config/libreoffice.yml index da006a8..33b99ce 100644 --- a/tasks/config/libreoffice.yml +++ b/tasks/config/libreoffice.yml @@ -5,4 +5,4 @@ libreoffice: method: "{{ pkgconfig.libreoffice.method }}" flatpak: "{{ pkgconfig.libreoffice.flatpak }}" - syspkgs: "{{ pkgconfig.libreoffice[ansible_os_family] }}" + pkgs: "{{ pkgconfig.libreoffice[ansible_os_family] }}" diff --git a/tasks/config/lua-language-server.yml b/tasks/config/lua-language-server.yml deleted file mode 100644 index ab39904..0000000 --- a/tasks/config/lua-language-server.yml +++ /dev/null @@ -1,5 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -version: 3.13.5 -install_prefix: "{{ default_install_prefix }}" -install_path: /opt/lua-language-server diff --git a/tasks/config/luals.yml b/tasks/config/luals.yml new file mode 100644 index 0000000..fb78ce4 --- /dev/null +++ b/tasks/config/luals.yml @@ -0,0 +1,14 @@ +# vim: set filetype=yaml.ansible : +--- +- name: Set luals config + ansible.builtin.set_fact: + luals: + vers: "{{ pkgconfig.luals.version }}" + sys: "{{ pkgconfig.luals.sysmap[ansible_system] }}" + arch: "{{ pkgconfig.luals.archmap[ansible_architecture] }}" + +- name: Set luals variables + ansible.builtin.set_fact: + luals_vars: + archive: "lua-language-server-{{ luals.vers }}-{{ luals.sys }}-{{ luals.arch }}.tar.gz" + url: "{{ pkgconfig.luals.base_url }}/{{ luals.vers }}" diff --git a/tasks/config/nerdfonts.yml b/tasks/config/nerdfonts.yml index d7155f0..45b951a 100644 --- a/tasks/config/nerdfonts.yml +++ b/tasks/config/nerdfonts.yml @@ -10,6 +10,6 @@ - Lilex - Monoid - NerdFontsSymbolsOnly - install_path: "{{ path_prefix }}/{{ pkgconfig.nerdfonts.path }}" + install_path: "{{ path.prefix }}/{{ pkgconfig.nerdfonts.path }}" base_url: "{{ pkgconfig.nerdfonts.base_url }}" force_install: "{{ pkgconfig.force_install_nerdfonts | default(false) }}" diff --git a/tasks/config/zfs.yml b/tasks/config/zfs.yml index 8fab6e4..3de179f 100644 --- a/tasks/config/zfs.yml +++ b/tasks/config/zfs.yml @@ -1,17 +1,9 @@ --- -- name: Set zfs facts for RedHat based distros +- name: Set distro name when: - ansible_os_family == 'RedHat' - block: - - name: Set distro name - ansible.builtin.set_fact: - rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}" - - - name: Get rpm_dist for RedHat - changed_when: false - register: rpm_dist - ansible.builtin.command: # is there a better way to get this? - cmd: rpm --eval "%{dist}" + ansible.builtin.set_fact: + rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}" - name: Set ZFS config ansible.builtin.set_fact: diff --git a/tasks/config/zig.yml b/tasks/config/zig.yml index 48270c4..ab09d5a 100644 --- a/tasks/config/zig.yml +++ b/tasks/config/zig.yml @@ -4,5 +4,5 @@ ansible.builtin.set_fact: zig: version: 0.13.0 - install_prefix: "{{ default_install_prefix }}" - install_path: /opt/zig + install_prefix: "{{ path.prefix }}" + install_path: "{{ path.archive }}/zig" diff --git a/tasks/facts.yml b/tasks/facts.yml index ea9f02b..6455071 100644 --- a/tasks/facts.yml +++ b/tasks/facts.yml @@ -3,7 +3,8 @@ - name: Set facts for installation ansible.builtin.set_fact: ext_become: "{{ not use_local }}" - path_prefix: "{% if use_local %}{{ lookup('ansible.builtin.env', 'HOME') }}/.local{% else %}{{ defaults.path.prefix }}{% endif %}" + path: + prefix: "{% if use_local %}{{ lookup('ansible.builtin.env', 'HOME') }}/.local{% else %}{{ defaults.path.prefix }}{% endif %}" - name: Set Linux specific facts when: @@ -18,6 +19,14 @@ pkg_snap: [] # snpacraft.io packages sys_pkg_become: true # Linux package managers require sudo access +- name: Set rpm dist if RedHat based + when: + - ansible_os_family == 'RedHat' + changed_when: false + register: rpm_dist + ansible.builtin.command: + cmd: rpm --eval "%{dist}" + - name: Set macOS specific facts when: - ansible_distribution == 'MacOSX' @@ -30,13 +39,14 @@ - name: Set paths ansible.builtin.set_fact: - paths: - appimage: "{{ appimage_path | default(path_prefix ~ defaults.path.suffix.appimage) }}" - archive: "{{ archive_path | default(path_prefix ~ defaults.path.suffix.archive) }}" - bin: "{{ bin_path | default(path_prefix ~ defaults.path.suffix.bin) }}" - cargo: "{{ cargo_path | default(path_prefix ~ defaults.path.suffix.cargo) }}" - go: "{{ goroot | default(path_prefix ~ defaults.path.suffix.go) }}" - pipx: "{{ pipx_path | default(path_prefix ~ defaults.path.suffix.pipx) }}" + path: + prefix: "{{ path.prefix }}" + appimage: "{{ path.appimage | default(path.prefix ~ defaults.path.suffix.appimage) }}" + archive: "{{ path.archive | default(path.prefix ~ defaults.path.suffix.archive) }}" + bin: "{{ path.bin | default(path.prefix ~ defaults.path.suffix.bin) }}" + cargo: "{{ path.cargo | default(path.prefix ~ defaults.path.suffix.cargo) }}" + go: "{{ path.go | default(path.prefix ~ defaults.path.suffix.go) }}" + pipx: "{{ path.pipx | default(path.prefix ~ defaults.path.suffix.pipx) }}" - name: Set OS independant facts ansible.builtin.set_fact: diff --git a/tasks/main.yml b/tasks/main.yml index a9d097f..f4169de 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,15 +6,15 @@ ansible.builtin.include_tasks: file: facts.yml -- name: Ensure required paths exist +- name: Ensure required path exist become: "{{ ext_become }}" - loop: "{{ paths | dict2items }}" + loop: "{{ path | dict2items }}" loop_control: - loop_var: path + loop_var: p ansible.builtin.file: state: directory mode: '0755' - path: "{{ path.value }}" + path: "{{ p.value }}" - name: Read default package configuration ansible.builtin.include_vars: diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index 9a50439..36d737f 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -1,16 +1,18 @@ # vim: set filetype=yaml.ansible : --- - name: Linux based installation - when: ansible_system == 'Linux' + when: + - ansible_system == 'Linux' block: - name: Append to pkgs notify: - Depend cargo ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + alacritty.deps }}" - srcpkgs: "{{ cargopkgs + [alacritty] }}" + pkg_sys: "{{ pkg_sys + alacritty.deps }}" + pkg_cargo: "{{ pkg_cargo + [alacritty] }}" - name: Append alacritty to caskpkgs + when: + - ansible_system == 'Darwin' ansible.builtin.set_fact: - caskpkgs: "{{ caskpkgs + alacritty.pkgs }}" - when: ansible_system == 'Darwin' + caskpkgs: "{{ caskpkgs + alacritty.cask }}" diff --git a/tasks/pkgs/carapace.yml b/tasks/pkgs/carapace.yml index fc9d0cb..e951935 100644 --- a/tasks/pkgs/carapace.yml +++ b/tasks/pkgs/carapace.yml @@ -1,31 +1,27 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.include_vars: - file: carapace.yml - name: _carapace -- ansible.builtin.set_fact: - pkgconfig_carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}" - -- name: enable carapace yum repository +- name: Enable carapace yum repository + when: + - ansible_os_family == 'RedHat' + become: true ansible.builtin.yum_repository: - name: carapace-yum - description: carapace-yum - baseurl: https://yum.fury.io/rsteube/ + name: "{{ carapace.repo.name }}" + description: "{{ carapace.repo.description }}" + baseurl: "{{ charapace.repo.baseurl }}" enabled: true gpgcheck: false state: present - when: ansible_os_family == 'RedHat' - become: true -- name: enable carapace apt repository +- name: Enable carapace apt repository + when: + - ansible_os_family == 'Debian' become: true ansible.builtin.apt_repository: - repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /" + repo: "{{ carapace.repo.repo }}" + filename: "{{ carapace.repo.name }}" state: present update_cache: false - filename: carapace - when: ansible_os_family == 'Debian' -- name: add carapace to syspkgs +- name: Add carapace to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig_carapace.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + carapace.pkgs }}" diff --git a/tasks/pkgs/clangd.yml b/tasks/pkgs/clangd.yml index e6de283..d7ee19d 100644 --- a/tasks/pkgs/clangd.yml +++ b/tasks/pkgs/clangd.yml @@ -1,7 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - clangd: true - -- ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.clangd.pkgs[ansible_os_family] }}" +- name: Append clangd to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + clangd.pkgs }}" diff --git a/tasks/pkgs/consul.yml b/tasks/pkgs/consul.yml index 888e435..df8987a 100644 --- a/tasks/pkgs/consul.yml +++ b/tasks/pkgs/consul.yml @@ -1,16 +1,13 @@ # vim: set filetype=yaml.ansible : -# load hashicorp configuration --- -- name: ensure hashicorp repo is active - ansible.builtin.include_tasks: - file: "pkgs/hashicorp_repo.yml" - when: hashicorp is undefined - -- name: append to syspkgs +- name: Append to pkg_sys + when: + - ansible_system == 'Linux' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + [ pkgconfig.consul[ansible_system] ] }}" - when: ansible_system == 'Linux' + pkg_sys: "{{ pkg_sys + consul.pkgs }}" -- ansible.builtin.set_fact: - tappkgs: "{{ tappkgs + [ pkgconfig.consul[ansible_system] ] }}" - when: ansible_system == 'Darwin' +- name: Append to pkg_tap + when: + - ansible_system == 'Darwin' + ansible.builtin.set_fact: + pkg_tap: "{{ pkg_tap + consul.pkgs }}" diff --git a/tasks/pkgs/hashicorp.yml b/tasks/pkgs/hashicorp.yml new file mode 100644 index 0000000..3f73007 --- /dev/null +++ b/tasks/pkgs/hashicorp.yml @@ -0,0 +1,3 @@ +- name: Enable hashicorp repository + ansible.builtin.include_tasks: + file: repos/hashicorp.yml diff --git a/tasks/pkgs/kitty.yml b/tasks/pkgs/kitty.yml index 9988f12..a814194 100644 --- a/tasks/pkgs/kitty.yml +++ b/tasks/pkgs/kitty.yml @@ -1,5 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: add to syspkgs +- name: Add to pkg_sys ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + pkgconfig.kitty.pkgs[ansible_system] }}" + pkg_sys: "{{ pkg_sys + kitty.pkgs }}" diff --git a/tasks/pkgs/libreoffice.yml b/tasks/pkgs/libreoffice.yml index a20c153..05b13eb 100644 --- a/tasks/pkgs/libreoffice.yml +++ b/tasks/pkgs/libreoffice.yml @@ -14,7 +14,7 @@ when: - libreoffice.method == 'sys' ansible.builtin.set_fact: - sys_pkg: "{{ sys_pkg + libreoffice.syspkgs }}" + sys_pkg: "{{ sys_pkg + libreoffice.pkgs }}" - name: Append to caskpkgs when: diff --git a/tasks/pkgs/lua-language-server.yml b/tasks/pkgs/lua-language-server.yml index cbfeae3..0e94466 100644 --- a/tasks/pkgs/lua-language-server.yml +++ b/tasks/pkgs/lua-language-server.yml @@ -1,23 +1,11 @@ # vim: set filetype=yaml.ansible : --- -- name: Linux specific configuration - when: - - ansible_os_family != 'Darwin' - block: - - name: Load lua-language-server config - ansible.builtin.include_vars: - file: lua-language-server.yml - name: _luals - - name: Combine loaded config with defaults - ansible.builtin.set_fact: - pkgconfig_luals: "{{ _luals | ansible.builtin.combine(pkgconfig.luals) }}" +- name: Append to pkgs + ansible.builtin.set_fact: + srcpkgs: "{{ srcpkgs + ['lua-language-server'] }}" - - name: Append to pkgs - ansible.builtin.set_fact: - srcpkgs: "{{ srcpkgs + ['lua-language-server'] }}" - -- name: Append to syspkgs +- name: Append to pkg_sys when: - ansible_os_family == 'Darwin' ansible.builtin.set_fact: - syspkgs: "{{ syspkgs + ['lua-language-server'] }}" + pkg_sys: "{{ pkg_sys + ['lua-language-server'] }}" diff --git a/tasks/repos/hashicorp_repo.yml b/tasks/repos/hashicorp.yml similarity index 96% rename from tasks/repos/hashicorp_repo.yml rename to tasks/repos/hashicorp.yml index 35534d6..a1af55c 100644 --- a/tasks/repos/hashicorp_repo.yml +++ b/tasks/repos/hashicorp.yml @@ -1,9 +1,5 @@ # vim: set filetype=yaml.ansible : --- -- name: Set hashicorp flag - ansible.builtin.set_fact: - hashicorp: true - - name: RedHat repository when: - ansible_os_family == 'RedHat' diff --git a/tasks/repos/terra_repo.yml b/tasks/repos/terra.yml similarity index 100% rename from tasks/repos/terra_repo.yml rename to tasks/repos/terra.yml diff --git a/tasks/src/alacritty.yml b/tasks/src/alacritty.yml deleted file mode 100644 index afb3015..0000000 --- a/tasks/src/alacritty.yml +++ /dev/null @@ -1,7 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: Build and install alacritty - become: "{{ not use_local }}" - ansible.builtin.command: - creates: "{{ alacritty.bin }}" - cmd: "cargo install --root {{ paths.cargo }} alacritty@{{ alacritty.ver }}" diff --git a/tasks/src/lua-language-server.yml b/tasks/src/lua-language-server.yml deleted file mode 100644 index 58743ed..0000000 --- a/tasks/src/lua-language-server.yml +++ /dev/null @@ -1,56 +0,0 @@ -# vim: set filetype=yaml.ansible : ---- -- name: Set needed variables lua language server - ansible.builtin.set_fact: - luals_sys: pkgconfig_luals.sysmap[ansible_system] - luals_arch: pkgconfig_luals.archmap[ansible_architecture] - luals_ver: pkgconfig_luals.version - luals_instpath: pkgconfig_luals.install_path - luals_instpfx: pkgconfig_luals.install_prefix - luals_burl: pkgconfig_luals.base_url - -- name: Set luals archive name - ansible.builtin.set_fact: - luals_pkg: "lua-language-server-{{ luals_ver }}-{{ lualsl_sys }}-{{ luals_arch }}.tar.gz" - -- name: Check if lua language server is already installed - ansible.builtin.stat: - path: "{{ luals_instpath }}/bin/lua-language-server" - register: r_luals_stat - -- name: Install lua-language-server - when: not r_luals_stat.stat.exists - block: - - name: Create temp path - ansible.builtin.tempfile: - state: directory - prefix: luals_dl. - register: d_luals_dl_tmp - - - name: Get latest lua-language-server - ansible.builtin.get_url: - dest: "{{ d_luals_dl_tmp.path }}/{{ luals_pkg }}" - url: "{{ luals_burl }}/{{ luals_ver }}/{{ luals_pkg }}" - mode: "0644" - decompress: false - - - name: Create install_path - ansible.builtin.file: - state: directory - path: "{{ luals_instpath }}" - mode: "0755" - become: true - - - name: Extract lua language server archive - ansible.builtin.unarchive: - dest: "{{ luals_instpath }}" - src: "{{ d_luals_dl_tmp.path }}/{{ luals_pkg }}" - remote_src: true - become: true - - - name: Link lua language server binary - ansible.builtin.file: - state: link - src: "{{ luals_instpath }}/bin/lua-language-server" - path: "{{ luals_instpfx }}/bin/lua-language-server" - become: true diff --git a/vars/pkgs/alacritty.yml b/vars/pkgs/alacritty.yml index 4e319d5..61866bd 100644 --- a/vars/pkgs/alacritty.yml +++ b/vars/pkgs/alacritty.yml @@ -1,7 +1,6 @@ alacritty: - version: 0.15.0 + version: 0.15.1 RedHat: - pkgs: [] build_deps: - cmake - freetype-devel @@ -10,7 +9,6 @@ alacritty: - libxkbcommon-devel - g++ Debian: - pkgs: [] build_deps: - cmake - pkg-config @@ -19,7 +17,5 @@ alacritty: - libxcb-xfixes0-dev - libxkbcommon-dev - python3 - Darwin: - pkgs: - - alacritty - git_repo: https://github.com/alacritty/alacritty.git + cask: + - alacritty diff --git a/vars/pkgs/carapace.yml b/vars/pkgs/carapace.yml index 61e873c..b9a604f 100644 --- a/vars/pkgs/carapace.yml +++ b/vars/pkgs/carapace.yml @@ -1,6 +1,16 @@ carapace: + version: 0.2.0 pkgs: Linux: - carapace-bin Darwin: - carapace + repo: + RedHat: + name: carapace-yum + description: carapace-yum + baseurl: https://yum.fury.io/rsteube/ + Debian: + repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /" + name: carapace + Darwin: {} diff --git a/vars/pkgs/consul.yml b/vars/pkgs/consul.yml index 7da455d..e912d6b 100644 --- a/vars/pkgs/consul.yml +++ b/vars/pkgs/consul.yml @@ -1,3 +1,6 @@ consul: - Linux: consul - Darwin: hashicorp/tap/consul + pkgs: + Linux: + - consul + Darwin: + - hashicorp/tap/consul diff --git a/vars/pkgs/hashicorp.yml b/vars/pkgs/hashicorp.yml index ec06e5b..725b706 100644 --- a/vars/pkgs/hashicorp.yml +++ b/vars/pkgs/hashicorp.yml @@ -1,8 +1,8 @@ hashicorp: Linux: - RedHat: + ".el9": repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo - Fedora: + fedora: repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo - Debian: + debian: repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main" diff --git a/vars/pkgs/luals.yml b/vars/pkgs/luals.yml index 483477c..1571760 100644 --- a/vars/pkgs/luals.yml +++ b/vars/pkgs/luals.yml @@ -1,4 +1,5 @@ luals: + version: 3.13.5 base_url: https://github.com/LuaLS/lua-language-server/releases/download sysmap: Darwin: darwin