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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user