File tree Expand file tree Collapse file tree 3 files changed +29
-7
lines changed
roles/tpa_single_node/tasks Expand file tree Collapse file tree 3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Get IP of the current node
3
3
ansible.builtin.set_fact :
4
- tpa_single_node_rhel_host : " {{ ansible_ssh_host }}"
4
+ # tpa_single_node_rhel_host: "{{ ansible_ssh_host }}"
5
+ tpa_single_node_rhel_host : " 10.0.148.184"
5
6
6
7
- name : Set a variable about RHEL
7
8
ansible.builtin.set_fact :
8
9
rhel : false
9
10
10
- - name : Set a variable if is a RHEL as expected
11
+ - name : Set rhel variable
11
12
ansible.builtin.set_fact :
12
13
rhel : true
13
14
when :
14
15
- ansible_facts['distribution'] == 'RedHat'
15
16
- ansible_facts['distribution_major_version'] == '9'
16
17
- (ansible_facts['distribution_version'] | split('.'))[1] | int >= 3
17
18
19
+ - name : Set a variable about fedora
20
+ ansible.builtin.set_fact :
21
+ fedora : false
22
+
23
+ - name : Set fedora variable
24
+ ansible.builtin.set_fact :
25
+ fedora : true
26
+ when :
27
+ - ansible_facts['distribution'] == 'Fedora'
28
+ - ansible_facts['distribution_major_version'] == '41' or
29
+ ansible_facts['distribution_major_version'] == '42'
30
+
18
31
- name : Install Operating System Components
19
32
ansible.builtin.include_tasks : os.yml
20
- when : rhel
33
+ when :
34
+ - rhel
35
+ - fedora
21
36
args :
22
37
apply :
23
38
become : true
24
39
25
40
- name : Execute Podman Actions
26
41
ansible.builtin.include_tasks : podman.yml
27
- when : rhel
42
+ when :
43
+ - rhel
44
+ - fedora
28
45
args :
29
46
apply :
30
47
become : true
Original file line number Diff line number Diff line change 1
1
---
2
- - name : Install System Packages dependencies
2
+ - name : Install System Packages dependencies for RHEL
3
3
ansible.builtin.package :
4
+ when : rhel
4
5
name : " {{ tpa_single_node_system_packages }}"
5
6
state : " present"
Original file line number Diff line number Diff line change 7
7
fail_msg : " tpa_single_node_registry_username doesn't exist, export the registry username and password"
8
8
9
9
- name : Podman login to registry.redhat.io
10
- when : rhel
10
+ when :
11
+ - rhel
12
+ - fedora
11
13
ansible.builtin.command : podman login registry.redhat.io -u {{ tpa_single_node_registry_username }} -p {{ tpa_single_node_registry_password }}
12
14
register : podman_login_result
13
15
changed_when : ' "Already logged in" not in podman_login_result'
44
46
changed_when : false
45
47
46
48
- name : Pull trustification image from registry.redhat.io
47
- when : rhel
49
+ when :
50
+ - rhel
51
+ - fedora
48
52
ansible.builtin.command :
49
53
cmd : " podman pull {{ tpa_single_node_trustification_image }}"
50
54
changed_when : false
You can’t perform that action at this time.
0 commit comments