diff --git a/tasks/build/zig.yml b/tasks/build/zig.yml index f00b784..449b995 100644 --- a/tasks/build/zig.yml +++ b/tasks/build/zig.yml @@ -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 diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index 4539c8f..7eaa34a 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -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' diff --git a/tasks/pkgs/carapace.yml b/tasks/pkgs/carapace.yml index 7dffb2b..fb8ab5a 100644 --- a/tasks/pkgs/carapace.yml +++ b/tasks/pkgs/carapace.yml @@ -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: diff --git a/tasks/pkgs/git.yml b/tasks/pkgs/git.yml index 1c27c13..f69f0be 100644 --- a/tasks/pkgs/git.yml +++ b/tasks/pkgs/git.yml @@ -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: diff --git a/tasks/pkgs/go.yml b/tasks/pkgs/go.yml index d6e1039..3b0b04d 100644 --- a/tasks/pkgs/go.yml +++ b/tasks/pkgs/go.yml @@ -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: diff --git a/tasks/pkgs/hashicorp_repo.yml b/tasks/pkgs/hashicorp_repo.yml index 460a013..706f30e 100644 --- a/tasks/pkgs/hashicorp_repo.yml +++ b/tasks/pkgs/hashicorp_repo.yml @@ -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' diff --git a/tasks/pkgs/kitty.yml b/tasks/pkgs/kitty.yml index 0c08118..a78c9bb 100644 --- a/tasks/pkgs/kitty.yml +++ b/tasks/pkgs/kitty.yml @@ -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: diff --git a/tasks/pkgs/neovide.yml b/tasks/pkgs/neovide.yml index 2ebd912..b1225e8 100644 --- a/tasks/pkgs/neovide.yml +++ b/tasks/pkgs/neovide.yml @@ -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 }}" diff --git a/tasks/pkgs/neovim.yml b/tasks/pkgs/neovim.yml index d6de44a..0598322 100644 --- a/tasks/pkgs/neovim.yml +++ b/tasks/pkgs/neovim.yml @@ -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 diff --git a/tasks/pkgs/nerdfonts.yml b/tasks/pkgs/nerdfonts.yml index f40dbf8..3a1dbbd 100644 --- a/tasks/pkgs/nerdfonts.yml +++ b/tasks/pkgs/nerdfonts.yml @@ -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' diff --git a/tasks/pkgs/nodejs.yml b/tasks/pkgs/nodejs.yml index 7e08455..8bcde15 100644 --- a/tasks/pkgs/nodejs.yml +++ b/tasks/pkgs/nodejs.yml @@ -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 diff --git a/tasks/pkgs/nomad.yml b/tasks/pkgs/nomad.yml index 98d975e..5632412 100644 --- a/tasks/pkgs/nomad.yml +++ b/tasks/pkgs/nomad.yml @@ -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] ] }}" diff --git a/tasks/pkgs/nushell.yml b/tasks/pkgs/nushell.yml index 38e801e..25f7899 100644 --- a/tasks/pkgs/nushell.yml +++ b/tasks/pkgs/nushell.yml @@ -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 }}" diff --git a/tasks/pkgs/packer.yml b/tasks/pkgs/packer.yml index fb0e994..c1e7265 100644 --- a/tasks/pkgs/packer.yml +++ b/tasks/pkgs/packer.yml @@ -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] ] }}" diff --git a/tasks/pkgs/python3-pip.yml b/tasks/pkgs/python3-pip.yml index 0db1872..82ca322 100644 --- a/tasks/pkgs/python3-pip.yml +++ b/tasks/pkgs/python3-pip.yml @@ -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 diff --git a/tasks/pkgs/rust.yml b/tasks/pkgs/rust.yml index 176e411..3fdb0c1 100644 --- a/tasks/pkgs/rust.yml +++ b/tasks/pkgs/rust.yml @@ -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 diff --git a/tasks/pkgs/terra_repo.yml b/tasks/pkgs/terra_repo.yml index c79faa5..d42c84e 100644 --- a/tasks/pkgs/terra_repo.yml +++ b/tasks/pkgs/terra_repo.yml @@ -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 diff --git a/tasks/pkgs/terraform.yml b/tasks/pkgs/terraform.yml index 93592cd..d436281 100644 --- a/tasks/pkgs/terraform.yml +++ b/tasks/pkgs/terraform.yml @@ -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] ] }}" diff --git a/tasks/pkgs/tidy.yml b/tasks/pkgs/tidy.yml index f7a4054..c249274 100644 --- a/tasks/pkgs/tidy.yml +++ b/tasks/pkgs/tidy.yml @@ -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 diff --git a/tasks/pkgs/vault.yml b/tasks/pkgs/vault.yml index 47490a7..10d65c7 100644 --- a/tasks/pkgs/vault.yml +++ b/tasks/pkgs/vault.yml @@ -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] ] }}" diff --git a/tasks/pkgs/zfs.yml b/tasks/pkgs/zfs.yml index e2c3646..9bf855b 100644 --- a/tasks/pkgs/zfs.yml +++ b/tasks/pkgs/zfs.yml @@ -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 diff --git a/tasks/pkgs/zig.yml b/tasks/pkgs/zig.yml new file mode 100644 index 0000000..c934e02 --- /dev/null +++ b/tasks/pkgs/zig.yml @@ -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' ] }}" diff --git a/vars/nodejs.yml b/vars/nodejs.yml index f5cf1d2..da341e7 100644 --- a/vars/nodejs.yml +++ b/vars/nodejs.yml @@ -1,8 +1,7 @@ --- -Darwin: - pkgs: +pkgs: + Darwin: - node -Linux: - pkgs: + Linux: - nodejs - npm diff --git a/vars/nushell.yml b/vars/nushell.yml index e6522f3..bb69f3f 100644 --- a/vars/nushell.yml +++ b/vars/nushell.yml @@ -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 -Darwin: - nu_pkgs_list: [] - pkgdeps: - - nushell - - openssl - - cmake -Debian: - nu_pkgs_list: - - nu - pkgdeps: - - pkg-config - - libssl-dev - - build-essential -RedHat: - nu_pkgs_list: - - nu - pkgdeps: - - libxcb - - openssl-devel - - libX11-devel + - 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_plugin_plist + Debian: [] + RedHat: + - nu_plugin_rpm diff --git a/vars/python3.yml b/vars/python3.yml index 6681600..169c282 100644 --- a/vars/python3.yml +++ b/vars/python3.yml @@ -1,7 +1,6 @@ -Darwin: - pkgs: +pkgs: + Darwin: - python3 -Linux: - pkgs: + Linux: - python3 - python3-pip diff --git a/vars/tidy.yml b/vars/tidy.yml index 6ab2a23..8d4800b 100644 --- a/vars/tidy.yml +++ b/vars/tidy.yml @@ -1,6 +1,5 @@ -Darwin: - pkgs: +pkgs: + Darwin: - tidy-html5 -Linux: - pkgs: + Linux: - tidy diff --git a/vars/zfs.yml b/vars/zfs.yml index 2563240..665272a 100644 --- a/vars/zfs.yml +++ b/vars/zfs.yml @@ -5,17 +5,17 @@ fedora: release: 2-6 epel: release: 2-3 -RedHat: - deppkgs: +pkgs: + RedHat: + - zfs + Debian: + - zfs-dkms + - zfsutils-linux +deppkgs: + RedHat: - kernel-devel - epel-release - pkgs: - - zfs -Debian: - deppkgs: + Debian: - dpkg-dev - linux-headers-generic - linux-image-generic - pkgs: - - zfs-dkms - - zfsutils-linux