Skip to content

Commit 44457b4

Browse files
committed
Fedora support
1 parent 68f3712 commit 44457b4

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

roles/tpa_single_node/tasks/main.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,41 @@
77
ansible.builtin.set_fact:
88
rhel: false
99

10-
- name: Set a variable if is a RHEL as expected
10+
- name: Set rhel variable
1111
ansible.builtin.set_fact:
1212
rhel: true
1313
when:
1414
- ansible_facts['distribution'] == 'RedHat'
1515
- ansible_facts['distribution_major_version'] == '9'
1616
- (ansible_facts['distribution_version'] | split('.'))[1] | int >= 3
1717

18+
- name: Set a variable about fedora
19+
ansible.builtin.set_fact:
20+
fedora: false
21+
22+
- name: Set fedora variable
23+
ansible.builtin.set_fact:
24+
fedora: true
25+
when:
26+
- ansible_facts['distribution'] == 'Fedora'
27+
- ansible_facts['distribution_major_version'] == '41' or
28+
ansible_facts['distribution_major_version'] == '42'
29+
- (ansible_facts['distribution_version'] | split('.'))[1] | int >= 3
30+
1831
- name: Install Operating System Components
1932
ansible.builtin.include_tasks: os.yml
20-
when: rhel
33+
when:
34+
- rhel
35+
- fedora
2136
args:
2237
apply:
2338
become: true
2439

2540
- name: Execute Podman Actions
2641
ansible.builtin.include_tasks: podman.yml
27-
when: rhel
42+
when:
43+
- rhel
44+
- fedora
2845
args:
2946
apply:
3047
become: true

roles/tpa_single_node/tasks/os.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
- name: Install System Packages dependencies
2+
- name: Install System Packages dependencies for RHEL
33
ansible.builtin.package:
4+
when: rhel
45
name: "{{ tpa_single_node_system_packages }}"
56
state: "present"

roles/tpa_single_node/tasks/podman.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
fail_msg: "tpa_single_node_registry_username doesn't exist, export the registry username and password"
88

99
- name: Podman login to registry.redhat.io
10-
when: rhel
10+
when:
11+
- rhel
12+
- fedora
1113
ansible.builtin.command: podman login registry.redhat.io -u {{ tpa_single_node_registry_username }} -p {{ tpa_single_node_registry_password }}
1214
register: podman_login_result
1315
changed_when: '"Already logged in" not in podman_login_result'
@@ -44,7 +46,9 @@
4446
changed_when: false
4547

4648
- name: Pull trustification image from registry.redhat.io
47-
when: rhel
49+
when:
50+
- rhel
51+
- fedora
4852
ansible.builtin.command:
4953
cmd: "podman pull {{ tpa_single_node_trustification_image }}"
5054
changed_when: false

0 commit comments

Comments
 (0)