Files
ansible_role_package/tasks/pkgs/terra_repo.yml
Matthew Stobbs 0f2d22f3c5 packages are more generic
- if config is needed, it has a file in vars/
- all imported vars for pkgs are namespaced with _<pkgname>
2025-01-23 00:29:58 -07:00

26 lines
805 B
YAML

---
- ansible.builtin.include_vars:
file: terrarepo.yml
name: _terrarepo
- name: enable terra repo for fedora
when: ansible_distribution == 'Fedora'
block:
- 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