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

@@ -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