Skip to content

Commit 74fb722

Browse files
committed
Initial changes for python3 SELinux and python3-devel
1 parent 75193b9 commit 74fb722

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

roles/StackStorm.st2/tasks/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,53 @@
11
---
2+
- name: Install python3 SELinux policies
3+
become: yes
4+
yum:
5+
name: libselinux-python3
6+
state: present
7+
register: _task
8+
retries: 5
9+
delay: 3
10+
until: _task is succeeded
11+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and ansible_selinux.config_mode == "enforcing"
12+
tags: st2
13+
14+
- name: Verify python3-devel is available in enabled repo
15+
become: yes
16+
shell:
17+
cmd: yum info python3-devel
18+
changed_when: false
19+
register: _rpm_check
20+
args:
21+
warn: False
22+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7'
23+
# Disable warning as yum doesn't support info
24+
tags: st2, skip_ansible_lint
25+
26+
- name: Discover name of optional server rpm
27+
become: yes
28+
shell:
29+
cmd: yum repolist disabled 2> /dev/null | awk -F'/' '/rhel-7-server-rhui-optional-rpms|rhui-REGION-rhel-server-optional|rhel-7-server-optional-rpms/{print $1}'
30+
changed_when: false
31+
register: _reponame
32+
args:
33+
warn: False
34+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
35+
# Disable warning as yum doesn't support repolist
36+
tags: st2, skip_ansible_lint
37+
38+
- name: Install python3-devel
39+
become: yes
40+
yum:
41+
name: python3-devel
42+
state: present
43+
enablerepo: "{{ _reponame.stdout }}"
44+
register: _task
45+
retries: 5
46+
delay: 3
47+
until: _task is succeeded
48+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
49+
tags: st2
50+
251
- name: Install latest st2 package, auto-update
352
become: yes
453
package:

0 commit comments

Comments
 (0)