add zig installation via tarball
This commit is contained in:
@@ -1,23 +1,31 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: ghostty.yml
|
||||
name: _ghostty
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig_ghostty: "{{ _ghostty | ansible.builtin.combine(pkgconfig.ghostty) }}"
|
||||
|
||||
- name: ensure dependencies
|
||||
when: ansible_distribution == 'Fedora'
|
||||
block:
|
||||
- ansible.builtin.include_tasks:
|
||||
file: "pkgs/terra_repo.yml"
|
||||
when: pkgconfig_terrarepo is not defined
|
||||
|
||||
when: pkgconfig_terrarepo not defined
|
||||
|
||||
- name: append to pkgs
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ghostty' ] }}"
|
||||
when: ansible_distribution == 'Fedora' or
|
||||
not pkgconfig_ghostty.build
|
||||
|
||||
- name: no ghostty for this system
|
||||
when:
|
||||
- ansible_distribution != 'Fedora'
|
||||
- ansible_system == 'Linux'
|
||||
debug:
|
||||
msg: ghostty cannot be installed this way for your distribution
|
||||
- name: build ghostty from source
|
||||
block:
|
||||
- ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig_ghostty.build_deps[ansible_os_family] }}"
|
||||
srcpkgs: "{{ srcpkgs + ['ghostty'] }}"
|
||||
when: (ansible_distribution != 'Fedora' and ansible_system == 'Linux') or
|
||||
pkgconfig_ghostty.build
|
||||
|
||||
- name: append ghostty to caskpkgs
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
ansible.builtin.set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'ghostty' ] }}"
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: terrarepo.yml
|
||||
name: _terrarepo
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
terrarepo: "{{ _terrarepo | ansible.builtin.combine(pkgconfig.terrarepo) }}"
|
||||
pkgconfig_terrarepo: "{{ _terrarepo | ansible.builtin.combine(pkgconfig.terrarepo) }}"
|
||||
|
||||
- name: enable terra repo for fedora
|
||||
when: ansible_distribution == 'Fedora'
|
||||
@@ -14,14 +13,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={{ pkgconfig.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 {{ pkgconfig.terrarepo.Fedora.repo }}"
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig_terrarepo.Fedora.repo }}"
|
||||
|
||||
- ansible.builtin.dnf:
|
||||
name: terra-release
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
when: pkgconfig_hashicorp not defined
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
tappkgs: "{{ tappkgs + [ pkconfig.hashicorp.terraform[ansible_system] ] }}"
|
||||
ansible.builtin.set_fact:
|
||||
tappkgs: "{{ tappkgs + [ pkconfig_hashicorp.terraform[ansible_system] ] }}"
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
file: tidy.yml
|
||||
name: _tidy
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
tidy: "{{ _tidy | ansible.builtin.combine(pkgconfig.tidy) }}"
|
||||
pkgconfig_tidy: "{{ _tidy | ansible.builtin.combine(pkgconfig.tidy) }}"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.tidy.pkgs[ansible_system] }}"
|
||||
tags:
|
||||
- packages
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig_tidy.pkgs[ansible_system] }}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tmux' ] }}"
|
||||
tags:
|
||||
- packages
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
when: pkgconfig_hashicorp not defined
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
tappkgs: "{{ tappkgs + [ pkgconfig.hashicorp.vault[ansible_system] ] }}"
|
||||
ansible.builtin.set_fact:
|
||||
tappkgs: "{{ tappkgs + [ pkgconfig_hashicorp.vault[ansible_system] ] }}"
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
file: zfs.yml
|
||||
name: _zfs
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
zfs: "{{ _zfs | ansible.builtin.combine(pkgconfig.zfs) }}"
|
||||
pkgconfig_zfs: "{{ _zfs | ansible.builtin.combine(pkgconfig.zfs) }}"
|
||||
|
||||
- name: RedHat based configuration
|
||||
when: ansible_os_family == 'RedHat'
|
||||
block:
|
||||
- ansible.builtin.set_fact:
|
||||
rhname: "{%if ansible_distribution == 'Fedora' %}fedora{% else %}epel{% endif %}"
|
||||
@@ -17,34 +15,26 @@
|
||||
|
||||
- name: add openzfs gpg_key
|
||||
ansible.builtin.rpm_key:
|
||||
key: "{{ pkgconfig.zfs.gpg_key }}"
|
||||
fingerprint: "{{ pkgconfig.zfs.gpg_key_fingerprint }}"
|
||||
key: "{{ pkgconfig_zfs.gpg_key }}"
|
||||
fingerprint: "{{ pkgconfig_zfs.gpg_key_fingerprint }}"
|
||||
state: present
|
||||
become: true
|
||||
tags:
|
||||
- packages
|
||||
- RedHat
|
||||
|
||||
- name: enable openzfs repository
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ pkgconfig.zfs.repo_base }}{{ rhname }}/zfs-release-{{ pkgconfig.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:
|
||||
- packages
|
||||
- RedHat
|
||||
|
||||
- name: install zfs deps
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ pkgconfig.zfs[ansible_os_family].deppkgs }}"
|
||||
state: "{{ install_state }}"
|
||||
become: true
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ pkgconfig_zfs.deppkgs[ansible_os_family] }}"
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Debian configuration
|
||||
when: ansible_os_family == 'Debian'
|
||||
block:
|
||||
- name: enable openzfs repository
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: |
|
||||
deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
|
||||
@@ -52,9 +42,9 @@
|
||||
filename: "{{ ansible_distribution_release }}-backports"
|
||||
state: present
|
||||
update_cache: false
|
||||
become: true
|
||||
|
||||
- name: pin zfs package to backports
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
content: |
|
||||
Package: src:zfs-linux
|
||||
@@ -62,17 +52,14 @@
|
||||
Pin-Priority: 990
|
||||
dest: /etc/apt/preferences.d/90_zfs
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: install zfs deps
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ pkgconfig_zfs.deppkgs[ansible_os_family] }}"
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: "{{ pkgconfig.zfs.deppkgs[ansible_os_family] }}"
|
||||
state: "{{ install_state }}"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.zfs.pkgs[ansible_os_family] }}"
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig_zfs.pkgs[ansible_os_family] }}"
|
||||
become: true
|
||||
tags:
|
||||
- RedHat
|
||||
- packages
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: zig.yml
|
||||
name: _zig
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
zig: "{{ _zig | ansible.builtin.combine(pkgconfig.zig) }}"
|
||||
pkgconfig_zig: "{{ _zig | ansible.builtin.combine(pkgconfig.zig) }}"
|
||||
|
||||
- name: append to pkgs
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'zoxide' ] }}"
|
||||
tags:
|
||||
- packages
|
||||
|
||||
Reference in New Issue
Block a user