- if config is needed, it has a file in vars/ - all imported vars for pkgs are namespaced with _<pkgname>
26 lines
805 B
YAML
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
|