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:
@@ -44,6 +44,11 @@
|
||||
|
||||
- name: Macos specific installation
|
||||
block:
|
||||
- community.general.homebrew_tap:
|
||||
name: "{{ brewtaps | unique }}"
|
||||
state: present
|
||||
when: brewtaps|length > 0
|
||||
|
||||
- community.general.homebrew:
|
||||
name: "{{ syspkgs | unique }}"
|
||||
state: "{{ install_state }}"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: append iterm2 to caskpkgs
|
||||
set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'iterm2' ] }}"
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append jq to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'jq' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: append neovide to caskpkgs
|
||||
set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'neovide' ] }}"
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append neovim to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'neovim' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -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 }}"
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append node to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'node' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: append nushell to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'nushell' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
- shell
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append pandoc to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pandoc' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append pipx to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pipx' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append python3 to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'python3' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append ripgrep to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ripgrep' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append rust to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'rust' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append stow to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'stow' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: append terraform to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'terraform' ]}}"
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append tidy-html5 to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tidy-html5' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append tmux to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tmux' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: append zoxide to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'zoxide' ]}}"
|
||||
tags:
|
||||
- MacOS
|
||||
- homebrew
|
||||
- package
|
||||
@@ -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' ] }}"
|
||||
@@ -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'] }}"
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: append to srcpkgs
|
||||
set_fact:
|
||||
srcpkgs: "{{ srcpkgs + [ 'nerdfonts' ] }}"
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'nodejs', 'npm' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -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' ] }}"
|
||||
|
||||
@@ -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 }}"
|
||||
@@ -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' ] }}"
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pandoc' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pipx' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'python3-pip' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'stow' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -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
|
||||
@@ -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' ] }}"
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tidy' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tmux' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -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' ] }}"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: add zig to srcpkgs
|
||||
ansible.builtin.set_fact:
|
||||
srcpkgs: "{{ srcpkgs + [ 'zig' ] }}"
|
||||
@@ -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
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: Install zsh for Debian based distros
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: zsh
|
||||
state: latest
|
||||
tags:
|
||||
- Debian
|
||||
- linux
|
||||
- package
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + _alacritty[ansible_distribution].build_deps }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'build/alacritty.yml' ] }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'alacritty' ] }}"
|
||||
tags:
|
||||
- syspkgs
|
||||
- srcpkgs
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
file: carapace.yml
|
||||
name: _carapace
|
||||
|
||||
- name: install carapace RPM
|
||||
- name: enable carapace yum repository
|
||||
ansible.builtin.yum_repository:
|
||||
name: Gemfury Private Repo
|
||||
baseurl: https://yum.fury.io/rsteube/
|
||||
@@ -13,14 +13,15 @@
|
||||
when: ansible_os_familiy == 'RedHat'
|
||||
become: true
|
||||
|
||||
- name: enable carapace repository
|
||||
- name: enable carapace apt repository
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [trusted=yes] https://apt.fury.io/rsteube/ /"
|
||||
state: present
|
||||
update_cache: false
|
||||
filename: carapace
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: add carapace to syspkgs
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'carapace-bin' ] }}"
|
||||
syspkgs: "{{ syspkgs + _carapace[ansible_system].pkgs }}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: consul.yml
|
||||
name: _consul
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
@@ -9,5 +9,4 @@
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ _consul[ansible_os_family].pkg ] }}"
|
||||
|
||||
syspkgs: "{{ syspkgs + [ _hashicorp.consul[ansible_os_family] ] }}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
srcpkgs: "{{ srcpkgs + [ 'build/go.yml' ] }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'go' ] }}"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
- ansible_distribution_major_version|int >= 41
|
||||
ansible.builtin.command:
|
||||
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
|
||||
become: true
|
||||
@@ -22,7 +22,7 @@
|
||||
- ansible_distribution_major_version|int < 41
|
||||
ansible.builtin.command:
|
||||
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
|
||||
become: true
|
||||
@@ -30,7 +30,7 @@
|
||||
- ansible_distribution != 'Fedora'
|
||||
ansible.builtin.command:
|
||||
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
|
||||
when: ansible_os_family == 'Debian'
|
||||
@@ -57,12 +57,11 @@
|
||||
|
||||
- name: enable hasicorp repo for debian
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ _hashicorp.Debian.repo }}"
|
||||
repo: "{{ _hashicorp.Linux.Debian.repo }}"
|
||||
state: present
|
||||
update_cache: false
|
||||
|
||||
- name: enable hashicorp homebrew tap
|
||||
when: ansible_os_family == 'Darwin'
|
||||
community.general.homebrew_tap:
|
||||
name: hashicorp/tap
|
||||
state: present
|
||||
ansible.builtin.set_fact:
|
||||
brewtaps: "{{ brewtaps + ['hashicorp/tap'] }}"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
when: ansible_system == 'Linux'
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + _neovide[ansible_os_family].pkgdeps }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'build/neovide.yml' ] }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'neovide' ] }}"
|
||||
|
||||
- name: append neovide to caskpkgs
|
||||
when: ansible_system == 'Darwin'
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: nodejs.yml
|
||||
name: _nodejs
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'nodejs', 'npm' ] }}"
|
||||
syspkgs: "{{ syspkgs + _nodejs[ansible_system].pkgs }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'nomad' ] }}"
|
||||
syspkgs: "{{ syspkgs + [ _hashicorp.nomad[ansible_system] ] }}"
|
||||
|
||||
|
||||
@@ -3,18 +3,13 @@
|
||||
file: nushell.yml
|
||||
name: _nushell
|
||||
|
||||
- name: install macOS dependencies
|
||||
set_fact:
|
||||
nushell_pkgdeps:
|
||||
- cargo
|
||||
- libxcb
|
||||
- openssl-devel
|
||||
- libX11-devel
|
||||
nushell_altdeps:
|
||||
- build/nushell.yml
|
||||
- "pkgs/{{ ansible_os_family }}/carapace.yml"
|
||||
- ansible.builtin.include_tasks:
|
||||
file: "pkgs/{{ dep }}.yml"
|
||||
loop:
|
||||
- rust
|
||||
- carapace
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + nushell_pkgdeps }}"
|
||||
srcpkgs: "{{ srcpkgs + nushell_altdeps }}"
|
||||
syspkgs: "{{ syspkgs + _nushell[ansible_os_family].pkgdeps }}"
|
||||
cargopkgs: "{{ cargopkgs + _nushell[ansible_os_family].nu_pkgs_list + _nushell.nu_plugins }}"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'packer' ] }}"
|
||||
syspkgs: "{{ syspkgs + [ _hashicorp.packer[ansible_system] ] }}"
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pandoc' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
|
||||
@@ -3,7 +3,4 @@
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'pipx' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: python3.yml
|
||||
name: _python3
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'python3-pip' ] }}"
|
||||
syspkgs: "{{ syspkgs + _python3[ansible_system].pkgs }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ripgrep' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
---
|
||||
- name: set rust_pkgs
|
||||
set_fact:
|
||||
rust_pkgs:
|
||||
- rustc
|
||||
- cargo
|
||||
- ansible.builtin.include_vars:
|
||||
file: rust.yml
|
||||
name: _rust
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + rust_pkgs }}"
|
||||
syspkgs: "{{ syspkgs + _rust[ansible_system].pkgs }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
---
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'stow' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
---
|
||||
- name: enable terra repo for fedora >=41
|
||||
become: true
|
||||
when:
|
||||
- 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
|
||||
- ansible.builtin.include_vars:
|
||||
file: terrarepo.yml
|
||||
name: _terrarepo
|
||||
|
||||
- name: enable terra repo for fedora <41
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_distribution_major_version|int < 41
|
||||
- name: enable terra repo for fedora
|
||||
when: ansible_distribution == 'Fedora'
|
||||
block:
|
||||
- ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/terra.repo
|
||||
cmd: dnf config-manager --add-repo https://terra.fyralabs.com/terra.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 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:
|
||||
name: terra-release
|
||||
state: present
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "{{ ansible_os_family }}/hashicorp_repo.yml"
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'terraform' ] }}"
|
||||
syspkgs: "{{ syspkgs + [ _hashicorp.terraform[ansible_system] ] }}"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: tidy.yml
|
||||
name: _tidy
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tidy' ] }}"
|
||||
syspkgs: "{{ syspkgs + _tidy[ansible_system].pkgs }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -4,7 +4,4 @@
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tmux' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
|
||||
- packages
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# 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: "{{ ansible_os_family }}/hashicorp_repo.yml"
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'vault' ] }}"
|
||||
syspkgs: "{{ syspkgs + [ _hashicorp.vault[ansible_system] ] }}"
|
||||
|
||||
@@ -1,64 +1,74 @@
|
||||
---
|
||||
- name: set rpm_dist
|
||||
ansible.builtin.command: rpm --eval "%{dist}"
|
||||
register: rpm_dist
|
||||
tags:
|
||||
- packages
|
||||
- RedHat
|
||||
- config
|
||||
- ansible.builtin.include_vars:
|
||||
file: zfs.yml
|
||||
name: _zfs
|
||||
|
||||
- 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
|
||||
- name: RedHat based configuration
|
||||
when: ansible_os_family == 'RedHat'
|
||||
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
|
||||
- ansible.builtin.set_fact:
|
||||
rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}"
|
||||
- ansible.builtin.command:
|
||||
cmd: rpm --eval "%{dist}"
|
||||
register: rpm_dist
|
||||
|
||||
- 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 }}{{ 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:
|
||||
- name: set fedora facts
|
||||
set_fact:
|
||||
rh_release: fedora
|
||||
zfs_release: 2-6
|
||||
when: ansible_distribution == 'Fedora'
|
||||
when: ansible_distribution == 'Fedora'
|
||||
- name: enable openzfs repository
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: |
|
||||
deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
|
||||
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
|
||||
ansible.builtin.rpm_key:
|
||||
key: "{{ zfs_gpg_key }}"
|
||||
fingerprint: "{{ zfs_gpg_key_fingerprint }}"
|
||||
state: present
|
||||
become: true
|
||||
tags:
|
||||
- packages
|
||||
- RedHat
|
||||
- name: pin zfs package to backports
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
content: |
|
||||
Package: src:zfs-linux
|
||||
Pin: release n={{ ansible_distribution_release }}-backports
|
||||
Pin-Priority: 990
|
||||
dest: /etc/apt/preferences.d/90_zfs
|
||||
state: present
|
||||
|
||||
- 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: install zfs deps
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: "{{ _zfs[ansible_os_family].deppkgs }}"
|
||||
state: "{{ install_state }}"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'zfs' ] }}"
|
||||
syspkgs: "{{ syspkgs + _zfs[ansible_os_family].pkgs }}"
|
||||
become: true
|
||||
tags:
|
||||
- RedHat
|
||||
|
||||
@@ -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
|
||||
set_fact:
|
||||
syspkgs: "{{ (syspkgs | default([])) + [ 'zoxide' ] }}"
|
||||
syspkgs: "{{ syspkgs + [ 'zoxide' ] }}"
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
- packages
|
||||
|
||||
Reference in New Issue
Block a user