packages are more generic

- if config is needed, it has a file in vars/
- all imported vars for pkgs are namespaced with _<pkgname>
This commit is contained in:
Matthew Stobbs
2025-01-23 00:29:58 -07:00
parent 6fa5a46701
commit 0f2d22f3c5
76 changed files with 277 additions and 594 deletions

View File

@@ -44,6 +44,11 @@
- name: Macos specific installation - name: Macos specific installation
block: block:
- community.general.homebrew_tap:
name: "{{ brewtaps | unique }}"
state: present
when: brewtaps|length > 0
- community.general.homebrew: - community.general.homebrew:
name: "{{ syspkgs | unique }}" name: "{{ syspkgs | unique }}"
state: "{{ install_state }}" state: "{{ install_state }}"

View File

@@ -1,4 +0,0 @@
---
- name: append iterm2 to caskpkgs
set_fact:
caskpkgs: "{{ caskpkgs + [ 'iterm2' ] }}"

View File

@@ -1,8 +0,0 @@
---
- name: append jq to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'jq' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,4 +0,0 @@
---
- name: append neovide to caskpkgs
set_fact:
caskpkgs: "{{ caskpkgs + [ 'neovide' ] }}"

View File

@@ -1,8 +0,0 @@
---
- name: append neovim to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'neovim' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,16 +0,0 @@
---
- name: MacOS Tap homebrew fonts
community.general.homebrew_tap:
name: homebrew/cask-fonts
state: present
- name: generate nerdfont cask names
set_fact:
nerdfont_casks: "{{ (nerdfont_casks | default([])) + [ 'homebrew/cask/font-' + font.brew + '-nerd-font' ] }}"
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
- name: append nerdfonts to caskpkgs
set_fact:
caskpkgs: "{{ caskpkgs + nerdfont_casks }}"

View File

@@ -1,8 +0,0 @@
---
- name: append node to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'node' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,9 +0,0 @@
---
- name: append nushell to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'nushell' ]}}"
tags:
- MacOS
- homebrew
- package
- shell

View File

@@ -1,8 +0,0 @@
---
- name: append pandoc to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'pandoc' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append pipx to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'pipx' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append python3 to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'python3' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append ripgrep to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'ripgrep' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append rust to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'rust' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append stow to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'stow' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,4 +0,0 @@
---
- name: append terraform to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'terraform' ]}}"

View File

@@ -1,8 +0,0 @@
---
- name: append tidy-html5 to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'tidy-html5' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append tmux to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'tmux' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,8 +0,0 @@
---
- name: append zoxide to syspkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'zoxide' ]}}"
tags:
- MacOS
- homebrew
- package

View File

@@ -1,19 +0,0 @@
---
- name: set neovide pkg dependencies
set_fact:
neovide_deps:
- cargo
- fontconfig-devel
- freetype-devel
- libX11-xcb
- libX11-devel
- libstdc++-static
- libstdc++-devel
- "@Development Tools"
- "@Development Libraries"
- name: append to pkgs
when: ansible_architecture != "aarch64"
set_fact:
syspkgs: "{{ syspkgs + neovide_deps }}"
srcpkgs: "{{ srcpkgs + [ 'Linux/neovide.yml' ] }}"

View File

@@ -1,16 +0,0 @@
---
- name: add build deps
set_fact:
neovim_deps:
- ninja-build
- cmake
- gettext
- curl
- build-essential
- set_fact:
syspkgs: "{{ syspkgs + neovim_deps }}"
- name: append to srcpkgs
set_fact:
srcpkgs: "{{ srcpkgs + ['neovim'] }}"

View File

@@ -1,4 +0,0 @@
---
- name: append to srcpkgs
set_fact:
srcpkgs: "{{ srcpkgs + [ 'nerdfonts' ] }}"

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'nodejs', 'npm' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,9 +0,0 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'nomad' ] }}"

View File

@@ -1,16 +0,0 @@
---
- name: install RedHat dependencies
set_fact:
nushell_pkgdeps:
- cargo
- libxcb
- openssl-devel
- libX11-devel
nushell_altdeps:
- Linux/nushell.yml
- "{{ ansible_os_family }}/carapace.yml"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + nushell_pkgdeps }}"
srcpkgs: "{{ srcpkgs + nushell_altdeps }}"

View File

@@ -1,8 +0,0 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'packer' ] }}"

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'pandoc' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,9 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'pipx' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'python3-pip' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,14 +0,0 @@
---
- name: set rust_pkgs
set_fact:
rust_pkgs:
- rustc
- cargo
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + rust_pkgs }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'stow' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,11 +0,0 @@
---
# default on Linux is alacritty
# edit config/users.yml:users:<user item>:terminal:os_name:package name
# ie: config/users.yml:users:[name: stobbsm]:terminal:Fedora:konsole
- name: install and configure system terminal emulator
loop: "{{ users }}"
ansible.builtin.include_tasks:
file: "packages/{{ ansible_os_family }}/{{ item.terminal[ansible_distribution] | default('alacritty') }}.yml"
tags:
- package
- Debian

View File

@@ -1,8 +0,0 @@
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'terraform' ] }}"

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'tidy' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,10 +0,0 @@
---
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'tmux' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,9 +0,0 @@
# install hashicorp vault for RedHat
---
- name: ensure hashicorp repo is active
ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'vault' ] }}"

View File

@@ -1,6 +0,0 @@
---
- name: install vivaldi debian package
become: true
ansible.builtin.apt:
deb: https://downloads.vivaldi.com/stable/vivaldi-stable_6.7.3329.41-1_amd64.deb
state: present

View File

@@ -1,65 +0,0 @@
---
- name: set rpm_dist
ansible.builtin.command: rpm --eval "%{dist}"
register: rpm_dist
tags:
- packages
- RedHat
- config
- name: set zfs repo facts
set_fact:
zfs_repo_base: https://zfsonlinux.org
zfs_gpg_key: https://raw.githubusercontent.com/zfsonlinux/zfsonlinux.github.com/master/zfs-release/RPM-GPG-KEY-openzfs-key2
zfs_gpg_key_fingerprint: 7DC7 299D CF7C 7FD9 CD87 701B A599 FD5E 9DB8 4141
- name: el9+ specific configuration
block:
- name: set el9+ facts
set_fact:
rh_release: epel
zfs_release: 2-3
when:
- ansible_distribution != 'Fedora'
# TODO: figure out a better way to identify EPEL based distros
# TODO: Alma, rocky, centos, rhel
tags:
- packages
- RedHat
- config
- name: Fedora specific configuration
block:
- name: set fedora facts
set_fact:
rh_release: fedora
zfs_release: 2-6
when: ansible_distribution == 'Fedora'
when: ansible_distribution == 'Fedora'
- name: add openzfs gpg_key
ansible.builtin.rpm_key:
key: "{{ zfs_gpg_key }}"
fingerprint: "{{ zfs_gpg_key_fingerprint }}"
state: present
become: true
tags:
- packages
- RedHat
- name: enable openzfs repository
ansible.builtin.dnf:
name: "{{ zfs_repo_base }}{{ rh_release }}/zfs-release-{{ zfs_release }}{{ rpm_dist.stdout }}.noarch.rpm"
state: "{{ install_state }}"
become: true
tags:
- packages
- RedHat
- name: append to pkgs
set_fact:
syspkgs: "{{ syspkgs + [ 'zfs' ] }}"
become: true
tags:
- RedHat
- packages

View File

@@ -1,4 +0,0 @@
---
- name: add zig to srcpkgs
ansible.builtin.set_fact:
srcpkgs: "{{ srcpkgs + [ 'zig' ] }}"

View File

@@ -1,16 +0,0 @@
---
- name: Enable copr repo for zoxide
become: true
when: ansible_distribution != "Fedora"
community.general.copr:
name: atim/zoxide
state: enabled
chroot: "{{ coprChroot[ansible_distribution].chroot | default(omit) }}"
- name: append to pkgs
set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'zoxide' ] }}"
tags:
- RedHat
- linux
- package

View File

@@ -1,11 +0,0 @@
---
- name: Install zsh for Debian based distros
become: true
ansible.builtin.apt:
name: zsh
state: latest
tags:
- Debian
- linux
- package

View File

@@ -16,7 +16,7 @@
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + _alacritty[ansible_distribution].build_deps }}" syspkgs: "{{ syspkgs + _alacritty[ansible_distribution].build_deps }}"
srcpkgs: "{{ srcpkgs + [ 'build/alacritty.yml' ] }}" srcpkgs: "{{ srcpkgs + [ 'alacritty' ] }}"
tags: tags:
- syspkgs - syspkgs
- srcpkgs - srcpkgs

View File

@@ -3,7 +3,7 @@
file: carapace.yml file: carapace.yml
name: _carapace name: _carapace
- name: install carapace RPM - name: enable carapace yum repository
ansible.builtin.yum_repository: ansible.builtin.yum_repository:
name: Gemfury Private Repo name: Gemfury Private Repo
baseurl: https://yum.fury.io/rsteube/ baseurl: https://yum.fury.io/rsteube/
@@ -13,14 +13,15 @@
when: ansible_os_familiy == 'RedHat' when: ansible_os_familiy == 'RedHat'
become: true become: true
- name: enable carapace repository - name: enable carapace apt repository
become: true become: true
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /" repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /"
state: present state: present
update_cache: false update_cache: false
filename: carapace
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: add carapace to syspkgs - name: add carapace to syspkgs
ansible.builtin.set_fact: ansible.builtin.set_fact:
syspkgs: "{{ syspkgs + [ 'carapace-bin' ] }}" syspkgs: "{{ syspkgs + _carapace[ansible_system].pkgs }}"

View File

@@ -1,7 +1,7 @@
--- ---
- ansible.builtin.include_vars: - ansible.builtin.include_vars:
file: consul.yml file: hashicorp_repo.yml
name: _consul name: _hashicorp
- name: ensure hashicorp repo is active - name: ensure hashicorp repo is active
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
@@ -9,5 +9,4 @@
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ _consul[ansible_os_family].pkg ] }}" syspkgs: "{{ syspkgs + [ _hashicorp.consul[ansible_os_family] ] }}"

View File

@@ -1,4 +1,4 @@
--- ---
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
srcpkgs: "{{ srcpkgs + [ 'build/go.yml' ] }}" srcpkgs: "{{ srcpkgs + [ 'go' ] }}"

View File

@@ -13,7 +13,7 @@
- ansible_distribution_major_version|int >= 41 - ansible_distribution_major_version|int >= 41
ansible.builtin.command: ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager addrepo --from-repofile={{ _hashicorp.Fedora.repo }}" cmd: "dnf config-manager addrepo --from-repofile={{ _hashicorp.Linux.Fedora.repo }}"
- name: enable hashicorp repo for fedora <41 - name: enable hashicorp repo for fedora <41
become: true become: true
@@ -22,7 +22,7 @@
- ansible_distribution_major_version|int < 41 - ansible_distribution_major_version|int < 41
ansible.builtin.command: ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager --add-repo {{ _hashicorp.Fedora.repo }}" cmd: "dnf config-manager --add-repo {{ _hashicorp.Linux.Fedora.repo }}"
- name: enable hashicorp repo for RHEL like distribution - name: enable hashicorp repo for RHEL like distribution
become: true become: true
@@ -30,7 +30,7 @@
- ansible_distribution != 'Fedora' - ansible_distribution != 'Fedora'
ansible.builtin.command: ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager --add-repo {{ _hashicorp.RedHat.repo }}" cmd: "dnf config-manager --add-repo {{ _hashicorp.Linux.RedHat.repo }}"
- name: Debian based repository - name: Debian based repository
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
@@ -57,12 +57,11 @@
- name: enable hasicorp repo for debian - name: enable hasicorp repo for debian
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "{{ _hashicorp.Debian.repo }}" repo: "{{ _hashicorp.Linux.Debian.repo }}"
state: present state: present
update_cache: false update_cache: false
- name: enable hashicorp homebrew tap - name: enable hashicorp homebrew tap
when: ansible_os_family == 'Darwin' when: ansible_os_family == 'Darwin'
community.general.homebrew_tap: ansible.builtin.set_fact:
name: hashicorp/tap brewtaps: "{{ brewtaps + ['hashicorp/tap'] }}"
state: present

View File

@@ -7,7 +7,7 @@
when: ansible_system == 'Linux' when: ansible_system == 'Linux'
set_fact: set_fact:
syspkgs: "{{ syspkgs + _neovide[ansible_os_family].pkgdeps }}" syspkgs: "{{ syspkgs + _neovide[ansible_os_family].pkgdeps }}"
srcpkgs: "{{ srcpkgs + [ 'build/neovide.yml' ] }}" srcpkgs: "{{ srcpkgs + [ 'neovide' ] }}"
- name: append neovide to caskpkgs - name: append neovide to caskpkgs
when: ansible_system == 'Darwin' when: ansible_system == 'Darwin'

View File

@@ -1,8 +1,11 @@
--- ---
- ansible.builtin.include_vars:
file: nodejs.yml
name: _nodejs
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'nodejs', 'npm' ] }}" syspkgs: "{{ syspkgs + _nodejs[ansible_system].pkgs }}"
tags: tags:
- RedHat - RedHat
- linux - linux

View File

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

View File

@@ -3,18 +3,13 @@
file: nushell.yml file: nushell.yml
name: _nushell name: _nushell
- name: install macOS dependencies - ansible.builtin.include_tasks:
set_fact: file: "pkgs/{{ dep }}.yml"
nushell_pkgdeps: loop:
- cargo - rust
- libxcb - carapace
- openssl-devel
- libX11-devel
nushell_altdeps:
- build/nushell.yml
- "pkgs/{{ ansible_os_family }}/carapace.yml"
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + nushell_pkgdeps }}" syspkgs: "{{ syspkgs + _nushell[ansible_os_family].pkgdeps }}"
srcpkgs: "{{ srcpkgs + nushell_altdeps }}" cargopkgs: "{{ cargopkgs + _nushell[ansible_os_family].nu_pkgs_list + _nushell.nu_plugins }}"

View File

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

View File

@@ -1,10 +1,6 @@
--- ---
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'pandoc' ] }}" syspkgs: "{{ syspkgs + [ 'pandoc' ] }}"
tags: tags:
- RedHat
- linux
- package - package

View File

@@ -3,7 +3,4 @@
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'pipx' ] }}" syspkgs: "{{ syspkgs + [ 'pipx' ] }}"
tags: tags:
- RedHat
- linux
- package - package

View File

@@ -1,10 +1,10 @@
--- ---
- ansible.builtin.include_vars:
file: python3.yml
name: _python3
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'python3-pip' ] }}" syspkgs: "{{ syspkgs + _python3[ansible_system].pkgs }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -1,10 +1,6 @@
--- ---
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}" syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -1,14 +1,10 @@
--- ---
- name: set rust_pkgs - ansible.builtin.include_vars:
set_fact: file: rust.yml
rust_pkgs: name: _rust
- rustc
- cargo
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + rust_pkgs }}" syspkgs: "{{ syspkgs + _rust[ansible_system].pkgs }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -1,10 +1,6 @@
--- ---
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'stow' ] }}" syspkgs: "{{ syspkgs + [ 'stow' ] }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -1,22 +1,25 @@
--- ---
- name: enable terra repo for fedora >=41 - ansible.builtin.include_vars:
become: true file: terrarepo.yml
when: name: _terrarepo
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int >= 41
ansible.builtin.command:
creates: /etc/yum.repos.d/terra.repo
cmd: dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release
- name: enable terra repo for fedora <41 - name: enable terra repo for fedora
when: when: ansible_distribution == 'Fedora'
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int < 41
block: block:
- ansible.builtin.command: - name: enable terra repo for fedora >=41
creates: /etc/yum.repos.d/terra.repo
cmd: dnf config-manager --add-repo https://terra.fyralabs.com/terra.repo
become: true become: true
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 }}"
- 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 }}"
- ansible.builtin.dnf: - ansible.builtin.dnf:
name: terra-release name: terra-release
state: present state: present

View File

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

View File

@@ -1,10 +1,10 @@
--- ---
- ansible.builtin.include_vars:
file: tidy.yml
name: _tidy
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'tidy' ] }}" syspkgs: "{{ syspkgs + _tidy[ansible_system].pkgs }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -4,7 +4,4 @@
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'tmux' ] }}" syspkgs: "{{ syspkgs + [ 'tmux' ] }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

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

View File

@@ -1,64 +1,74 @@
--- ---
- name: set rpm_dist - ansible.builtin.include_vars:
ansible.builtin.command: rpm --eval "%{dist}" file: zfs.yml
register: rpm_dist name: _zfs
tags:
- packages
- RedHat
- config
- name: set zfs repo facts - name: RedHat based configuration
set_fact: when: ansible_os_family == 'RedHat'
zfs_repo_base: https://zfsonlinux.org
zfs_gpg_key: https://raw.githubusercontent.com/zfsonlinux/zfsonlinux.github.com/master/zfs-release/RPM-GPG-KEY-openzfs-key2
zfs_gpg_key_fingerprint: 7DC7 299D CF7C 7FD9 CD87 701B A599 FD5E 9DB8 4141
- name: el9+ specific configuration
block: block:
- name: set el9+ facts - ansible.builtin.set_fact:
set_fact: rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}"
rh_release: epel - ansible.builtin.command:
zfs_release: 2-3 cmd: rpm --eval "%{dist}"
when: register: rpm_dist
- ansible_distribution != 'Fedora'
# TODO: figure out a better way to identify EPEL based distros - name: add openzfs gpg_key
# TODO: Alma, rocky, centos, rhel ansible.builtin.rpm_key:
tags: key: "{{ _zfs.gpg_key }}"
- packages fingerprint: "{{ _zfs.gpg_key_fingerprint }}"
- RedHat state: present
- config become: true
tags:
- packages
- RedHat
- name: enable openzfs repository
ansible.builtin.dnf:
name: "{{ _zfs.repo_base }}{{ rhname }}/zfs-release-{{ _zfs[rhname].release }}{{ rpm_dist.stdout }}.noarch.rpm"
state: "{{ install_state }}"
become: true
tags:
- packages
- RedHat
- name: Fedora specific configuration - name: install zfs deps
ansible.builtin.dnf:
name: "{{ _zfs[ansible_os_family].deppkgs }}"
state: "{{ install_state }}"
become: true
- name: Debian configuration
when: ansible_os_family == 'Debian'
block: block:
- name: set fedora facts - name: enable openzfs repository
set_fact: become: true
rh_release: fedora ansible.builtin.apt_repository:
zfs_release: 2-6 repo: |
when: ansible_distribution == 'Fedora' deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
when: ansible_distribution == 'Fedora' deb-src http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
filename: "{{ ansible_distribution_release }}-backports"
state: present
update_cache: false
- name: add openzfs gpg_key - name: pin zfs package to backports
ansible.builtin.rpm_key: become: true
key: "{{ zfs_gpg_key }}" ansible.builtin.file:
fingerprint: "{{ zfs_gpg_key_fingerprint }}" content: |
state: present Package: src:zfs-linux
become: true Pin: release n={{ ansible_distribution_release }}-backports
tags: Pin-Priority: 990
- packages dest: /etc/apt/preferences.d/90_zfs
- RedHat state: present
- name: enable openzfs repository - name: install zfs deps
ansible.builtin.dnf: become: true
name: "{{ zfs_repo_base }}{{ rh_release }}/zfs-release-{{ zfs_release }}{{ rpm_dist.stdout }}.noarch.rpm" ansible.builtin.apt:
state: "{{ install_state }}" name: "{{ _zfs[ansible_os_family].deppkgs }}"
become: true state: "{{ install_state }}"
tags:
- packages
- RedHat
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ syspkgs + [ 'zfs' ] }}" syspkgs: "{{ syspkgs + _zfs[ansible_os_family].pkgs }}"
become: true become: true
tags: tags:
- RedHat - RedHat

View File

@@ -1,16 +1,6 @@
--- ---
- name: Enable copr repo for zoxide
become: true
when: ansible_distribution != "Fedora"
community.general.copr:
name: atim/zoxide
state: enabled
chroot: "{{ coprChroot[ansible_distribution].chroot | default(omit) }}"
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
syspkgs: "{{ (syspkgs | default([])) + [ 'zoxide' ] }}" syspkgs: "{{ syspkgs + [ 'zoxide' ] }}"
tags: tags:
- RedHat - packages
- linux
- package

View File

@@ -1,2 +1,8 @@
--- ---
version: 1.1.1 version: 1.1.1
Linux:
pkgs:
- carapace-bin
Darwin:
pkgs:
- carapace

View File

@@ -1,7 +1,23 @@
--- ---
RedHat: Linux:
repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo RedHat:
Fedora: repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo Fedora:
Debian: repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main" Debian:
repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main"
consul:
Linux: consul
Darwin: hashicorp/tap/consul
nomad:
Linux: nomad
Darwin: hashicorp/tap/nomad
terraform:
Linux: terraform
Darwin: hashicorp/tap/terraform
vault:
Linux: vault
Darwin: hashicorp/tap/vault
packer:
Linux: packer
Darwin: packer

8
vars/nodejs.yml Normal file
View File

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

7
vars/nomad.yml Normal file
View File

@@ -0,0 +1,7 @@
---
Darwin:
pkgs:
- hashicorp/tap/nomad
Linux:
pkgs:
- nomad

View File

@@ -1,7 +1,5 @@
--- ---
install_prefix: /usr/local nu_plugins:
nu_pkgs_list:
- nu
- nu_plugin_inc - nu_plugin_inc
- nu_plugin_polars - nu_plugin_polars
- nu_plugin_gstat - nu_plugin_gstat
@@ -14,3 +12,23 @@ nu_pkgs_list:
- nu_plugin_qr_maker - nu_plugin_qr_maker
- nu_plugin_rpm - nu_plugin_rpm
- nu_plugin_semver - 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

6
vars/packer.yml Normal file
View File

@@ -0,0 +1,6 @@
Darwin:
pkgs:
- hashicorp/tap/packer
Linux:
pkgs:
- packer

7
vars/python3.yml Normal file
View File

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

7
vars/rust.yml Normal file
View File

@@ -0,0 +1,7 @@
Darwin:
pkgs:
- rust
Linux:
pkgs:
- rustc
- cargo

7
vars/terraform.yml Normal file
View File

@@ -0,0 +1,7 @@
---
Darwin:
pkgs:
- hashicorp/tap/terraform
Linux:
pkgs:
- terraform

3
vars/terrarepo.yml Normal file
View File

@@ -0,0 +1,3 @@
---
Fedora:
repo: https://terra.fyralabs.com/terra.repo

6
vars/tidy.yml Normal file
View File

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

21
vars/zfs.yml Normal file
View File

@@ -0,0 +1,21 @@
repo_base: https://zfsonlinux.org
gpg_key: https://raw.githubusercontent.com/zfsonlinux/zfsonlinux.github.com/master/zfs-release/RPM-GPG-KEY-openzfs-key2
gpg_key_fingerprint: 7DC7 299D CF7C 7FD9 CD87 701B A599 FD5E 9DB8 4141
fedora:
release: 2-6
epel:
release: 2-3
RedHat:
deppkgs:
- kernel-devel
- epel-release
pkgs:
- zfs
Debian:
deppkgs:
- dpkg-dev
- linux-headers-generic
- linux-image-generic
pkgs:
- zfs-dkms
- zfsutils-linux