update and fix multiple packages

This commit is contained in:
Matthew Stobbs
2025-01-25 16:07:24 -07:00
parent edba662878
commit 00e08c5997
27 changed files with 132 additions and 99 deletions

View File

@@ -1,11 +1,7 @@
---
- ansible.builtin.include_vars:
file: zig.yml
name: _zig
- name: download zig archive
ansible.builtin.set_fact:
zig_pkg: "zig-{{ _zig.sysmap[ansible_system] }}-{{ _zig.archmap[ansible_archtecture] }}-{{ _zig.version }}.tar.xz"
zig_pkg: "zig-{{ pkgconfig.zig.sysmap[ansible_system] }}-{{ pkgconfig.zig.archmap[ansible_archtecture] }}-{{ pkgconfig.zig.version }}.tar.xz"
- name: create temp path
ansible.builtin.tempfile:
@@ -16,12 +12,12 @@
- name: download zig archive
ansible.builtin.get_url:
dest: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}"
url: "{{ _zig.base_url }}/{{ zig_pkg }}"
url: "{{ pkgconfig.zig.base_url }}/{{ zig_pkg }}"
decompress: false
- name: extract zig package
become: true
ansible.builtin.unarchive:
dest: "{{ _zig.install_path }}"
dest: "{{ pkgconfig.zig.install_path }}"
src: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}"
remote_src: true

View File

@@ -3,7 +3,8 @@
file: alacritty.yml
name: _alacritty
- ansible.builtin.set_fact:
pkgconfig.alacritty: "{{ _alacritty | ansible.builtin.combine(pkgconfig.alacritty) }}"
pkgconfig:
alacritty: "{{ _alacritty | ansible.builtin.combine(pkgconfig.alacritty) }}"
- name: linux based installation
when: ansible_system == 'Linux'

View File

@@ -3,7 +3,8 @@
file: carapace.yml
name: _carapace
- ansible.builtin.set_fact:
pkgconfig.carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}"
pkgconfig:
carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}"
- name: enable carapace yum repository
ansible.builtin.yum_repository:

View File

@@ -3,9 +3,12 @@
file: git.yml
name: _git
- ansible.builtin.set_fact:
pkgconfig.git: "{{ _git | ansible.builtin.combine(pkgconfig.git) }}"
pkgconfig:
git: "{{ _git | ansible.builtin.combine(pkgconfig.git) }}"
- ansible.builtin.set_fact:
pkgconfig.git.pkgs: "{{ pkgconfig.git.pkgs[ansible_system] }}"
pkgconfig:
git:
pkgs: "{{ pkgconfig.git.pkgs[ansible_system] }}"
- name: append to pkgs
set_fact:

View File

@@ -3,7 +3,8 @@
file: go.yml
name: _go
- ansible.builtin.set_fact:
pkgconfig.go: "{{ _go | ansible.builtin.combine(pkgconfig.go) }}"
pkgconfig:
go: "{{ _go | ansible.builtin.combine(pkgconfig.go) }}"
- name: append to pkgs
set_fact:

View File

@@ -3,7 +3,8 @@
file: hashicorp_repo.yml
name: _hashicorp
- ansible.builtin.set_fact:
pkgconfig.hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
pkgconfig:
hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
- name: RedHat repository
when: ansible_os_family == 'RedHat'

View File

@@ -3,7 +3,8 @@
file: kitty.yml
name: _kitty
- ansible.builtin.set_fact:
pkgconfig.kitty: "{{ _kitty | ansible.builtin.combine(pkgconfig.kitty) }}"
pkgconfig:
kitty: "{{ _kitty | ansible.builtin.combine(pkgconfig.kitty) }}"
- name: add to syspkgs
ansible.builtin.set_fact:

View File

@@ -3,7 +3,8 @@
file: neovide.yml
name: _neovide
- ansible.builtin.set_fact:
pkgconfig.neovide: "{{ _neovide | ansible.builtin.combine(pkgconfig.neovide) }}"
pkgconfig:
neovide: "{{ _neovide | ansible.builtin.combine(pkgconfig.neovide) }}"
- ansible.builtin.include_tasks:
file: "pkgs/{{ pkgdep }}.yml"
loop: "{{ pkgconfig.neovide.local_deps }}"

View File

@@ -3,7 +3,8 @@
file: neovim.yml
name: _neovim
- ansible.builtin.set_fact:
pkgconfig.neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
pkgconfig:
neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
- name: append neovim to srcpkgs
when: not pkgconfig.neovim.use_syspkg

View File

@@ -3,7 +3,8 @@
file: nerdfonts.yml
name: _nerdfonts
- ansible.builtin.set_fact:
pkgconfig.nerdfonts: "{{ _nerdfonts | ansible.builtin.combine(pkgconfig.nerdfons) }}"
pkgconfig:
nerdfonts: "{{ _nerdfonts | ansible.builtin.combine(pkgconfig.nerdfons) }}"
- name: append to srcpkgs
when: ansible_system == 'Linux'

View File

@@ -2,10 +2,13 @@
- ansible.builtin.include_vars:
file: nodejs.yml
name: _nodejs
- ansible.builtin.set_fact:
pkgconfig:
nodejs: "{{ _nodejs | ansible.builtin.combine(pkgconfig.nodejs) }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _nodejs[ansible_system].pkgs }}"
syspkgs: "{{ syspkgs + pkgconfig.nodejs.pkgs[ansible_system] }}"
tags:
- RedHat
- linux

View File

@@ -1,13 +1,9 @@
---
- ansible.builtin.include_vars:
file: hashicorp_repo.yml
name: _hashicorp
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "pkgs/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
tappkgs: "{{ tappkgs + [ _hashicorp.nomad[ansible_system] ] }}"
tappkgs: "{{ tappkgs + [ pkgconfig.hashicorp.nomad[ansible_system] ] }}"

View File

@@ -2,16 +2,17 @@
- ansible.builtin.include_vars:
file: nushell.yml
name: _nushell
- ansible.builtin.set_fact:
pkgconfig:
nushell: "{{ _nushell | ansible.builtin.combine(pkgconfig.nushell) }}"
- ansible.builtin.include_tasks:
file: "pkgs/{{ dep }}.yml"
loop:
- rust
- carapace
loop: "{{ pkgconfig.nushell.deps }}"
loop_control:
loop_var: dep
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _nushell[ansible_os_family].pkgdeps }}"
cargopkgs: "{{ cargopkgs + _nushell[ansible_os_family].nu_pkgs_list + _nushell.nu_plugins }}"
syspkgs: "{{ syspkgs + pkgsconfig.nushell.build_deps[ansible_os_family] }}"
cargopkgs: "{{ cargopkgs + pkgconfig.nushell.pkgs[ansible_os_family] + pkgconfig.nushell.pkgs_common }}"

View File

@@ -1,12 +1,8 @@
---
- ansible.builtin.include_vars:
file: hashicorp_repo.yml
name: _hashicorp
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "pkgs/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
tappkgs: "{{ tappkgs + [ _hashicorp.packer[ansible_system] ] }}"
tappkgs: "{{ tappkgs + [ pkgconfig.hashicorp.packer[ansible_system] ] }}"

View File

@@ -2,9 +2,12 @@
- ansible.builtin.include_vars:
file: python3.yml
name: _python3
- ansible.builtin.set_fact:
pkgconfig:
python3: "{{ _python3 | ansible.builtin.combine(pkgconfig.python3) }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _python3[ansible_system].pkgs }}"
syspkgs: "{{ syspkgs + pkgconfig.python3.pkgs[ansible_system] }}"
tags:
- packages

View File

@@ -3,10 +3,11 @@
file: rust.yml
name: _rust
- ansible.builtin.set_fact:
pkgconfig.rust: "{{ _rust | ansible.builtin.combine(pkgconfig.rust) }}"
pkgconfig:
rust: "{{ _rust | ansible.builtin.combine(pkgconfig.rust) }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _rust.pkgs[ansible_system] }}"
syspkgs: "{{ syspkgs + pkgconfig.rust.pkgs[ansible_system] }}"
tags:
- packages

View File

@@ -2,6 +2,9 @@
- ansible.builtin.include_vars:
file: terrarepo.yml
name: _terrarepo
- ansible.builtin.set_fact:
pkgconfig:
terrarepo: "{{ _terrarepo | ansible.builtin.combine(pkgconfig.terrarepo) }}"
- name: enable terra repo for fedora
when: ansible_distribution == 'Fedora'
@@ -11,14 +14,14 @@
when: ansible_distribution_major_version|int >= 41
ansible.builtin.command:
creates: /etc/yum.repos.d/terra.repo
cmd: "dnf config-manager addrepo --from-repofile={{ _terrarepo.Fedora.repo }}"
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.terrarepo.Fedora.repo }}"
- name: enable terra repo for fedora < 41
become: true
when: ansible_distribution_major_version|int < 41
ansible.builtin.command:
creates: /etc/yum.repos.d/terra.repo
cmd: "dnf config-manager --add-repo {{ _terrarepo.Fedora.repo }}"
cmd: "dnf config-manager --add-repo {{ pkgconfig.terrarepo.Fedora.repo }}"
- ansible.builtin.dnf:
name: terra-release

View File

@@ -1,12 +1,8 @@
---
- ansible.builtin.include_vars:
file: hashicorp_repo.yml
name: _hashicorp
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "pkgs/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
tappkgs: "{{ tappkgs + [ _hashicorp.terraform[ansible_system] ] }}"
tappkgs: "{{ tappkgs + [ pkconfig.hashicorp.terraform[ansible_system] ] }}"

View File

@@ -2,9 +2,12 @@
- ansible.builtin.include_vars:
file: tidy.yml
name: _tidy
- ansible.builtin.set_fact:
pkgconfig:
tidy: "{{ _tidy | ansible.builtin.combine(pkgconfig.tidy) }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _tidy[ansible_system].pkgs }}"
syspkgs: "{{ syspkgs + pkgconfig.tidy.pkgs[ansible_system] }}"
tags:
- packages

View File

@@ -1,13 +1,8 @@
# install hashicorp vault for RedHat
---
- ansible.builtin.include_vars:
file: hashicorp_repo.yml
name: _hashicorp
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "pkgs/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
tappkgs: "{{ tappkgs + [ _hashicorp.vault[ansible_system] ] }}"
tappkgs: "{{ tappkgs + [ pkgconfig.hashicorp.vault[ansible_system] ] }}"

View File

@@ -2,6 +2,9 @@
- ansible.builtin.include_vars:
file: zfs.yml
name: _zfs
- ansible.builtin.set_fact:
pkgconfig:
zfs: "{{ _zfs | ansible.builtin.combine(pkgconfig.zfs) }}"
- name: RedHat based configuration
when: ansible_os_family == 'RedHat'
@@ -14,8 +17,8 @@
- name: add openzfs gpg_key
ansible.builtin.rpm_key:
key: "{{ _zfs.gpg_key }}"
fingerprint: "{{ _zfs.gpg_key_fingerprint }}"
key: "{{ pkgconfig.zfs.gpg_key }}"
fingerprint: "{{ pkgconfig.zfs.gpg_key_fingerprint }}"
state: present
become: true
tags:
@@ -24,7 +27,7 @@
- name: enable openzfs repository
ansible.builtin.dnf:
name: "{{ _zfs.repo_base }}{{ rhname }}/zfs-release-{{ _zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm"
name: "{{ pkgconfig.zfs.repo_base }}{{ rhname }}/zfs-release-{{ pkgconfig.zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm"
state: "{{ install_state }}"
become: true
tags:
@@ -33,7 +36,7 @@
- name: install zfs deps
ansible.builtin.dnf:
name: "{{ _zfs[ansible_os_family].deppkgs }}"
name: "{{ pkgconfig.zfs[ansible_os_family].deppkgs }}"
state: "{{ install_state }}"
become: true
@@ -63,12 +66,12 @@
- name: install zfs deps
become: true
ansible.builtin.apt:
name: "{{ _zfs[ansible_os_family].deppkgs }}"
name: "{{ pkgconfig.zfs.deppkgs[ansible_os_family] }}"
state: "{{ install_state }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + _zfs[ansible_os_family].pkgs }}"
syspkgs: "{{ syspkgs + pkgconfig.zfs.pkgs[ansible_os_family] }}"
become: true
tags:
- RedHat

11
tasks/pkgs/zig.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- ansible.builtin.include_vars:
file: zig.yml
name: _zig
- ansible.builtin.set_fact:
pkgconfig:
zig: "{{ _zig | ansible.builtin.combine(pkgconfig.zig) }}"
- name: append to pkgs
ansible.builtin.set_fact:
srcpkgs: "{{ srcpkgs + [ 'zig' ] }}"

View File

@@ -1,8 +1,7 @@
---
Darwin:
pkgs:
Darwin:
- node
Linux:
pkgs:
- nodejs
- npm

View File

@@ -1,5 +1,22 @@
---
nu_plugins:
deps:
- rust
- carapace
build_deps:
Darwin:
- openssl
- cmake
Debian:
- pkg-config
- libssl-dev
- build-essential
RedHat:
- libxcb
- openssl-devel
- libX11-devel
pkgs_common:
- nu
- nu_plugin_inc
- nu_plugin_polars
- nu_plugin_gstat
@@ -10,25 +27,26 @@ nu_plugins:
- nu_plugin_net
- nu_plugin_prometheus
- nu_plugin_qr_maker
- nu_plugin_rpm
- nu_plugin_semver
- nu_plugin_hashes
- nu_plugin_dbus
- nu_plugin_compress
- nu_plugin_dns
- nu_plugin_file_dialog
- nu_plugin_desktop_notifications
- nu_plugin_net
- nu_plugin_json_path
- nu_plugin_hcl
- nu_plugin_unzip
- nu_plugin_units
- nu_plugin_gstat
- nu_plugin_selector
- nu_plugin_sys
- nu_plugin_xpath
pkgs:
Darwin:
nu_pkgs_list: []
pkgdeps:
- nushell
- openssl
- cmake
Debian:
nu_pkgs_list:
- nu
pkgdeps:
- pkg-config
- libssl-dev
- build-essential
- nu_plugin_plist
Debian: []
RedHat:
nu_pkgs_list:
- nu
pkgdeps:
- libxcb
- openssl-devel
- libX11-devel
- nu_plugin_rpm

View File

@@ -1,7 +1,6 @@
Darwin:
pkgs:
Darwin:
- python3
Linux:
pkgs:
- python3
- python3-pip

View File

@@ -1,6 +1,5 @@
Darwin:
pkgs:
Darwin:
- tidy-html5
Linux:
pkgs:
- tidy

View File

@@ -5,17 +5,17 @@ fedora:
release: 2-6
epel:
release: 2-3
RedHat:
deppkgs:
- kernel-devel
- epel-release
pkgs:
RedHat:
- zfs
Debian:
- zfs-dkms
- zfsutils-linux
deppkgs:
RedHat:
- kernel-devel
- epel-release
Debian:
- dpkg-dev
- linux-headers-generic
- linux-image-generic
pkgs:
- zfs-dkms
- zfsutils-linux