Skip to content

Commit e6cad37

Browse files
authored
Merge pull request #278 from StackStorm/py3_el7
Ansible changes for RH 7 and Python3
2 parents 75193b9 + 18b9119 commit e6cad37

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

roles/StackStorm.st2/tasks/main.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
11
---
2+
- name: Verify python3-devel is available in enabled repo
3+
become: yes
4+
shell:
5+
cmd: yum info python3-devel
6+
changed_when: false
7+
register: _rpm_check
8+
args:
9+
warn: False
10+
ignore_errors: yes
11+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7'
12+
# Disable warning as yum doesn't support info
13+
tags: st2, skip_ansible_lint
14+
15+
- name: Discover name of optional server rpm
16+
become: yes
17+
shell:
18+
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}'
19+
changed_when: false
20+
register: _reponame
21+
args:
22+
warn: False
23+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
24+
# Disable warning as yum doesn't support repolist
25+
tags: st2, skip_ansible_lint
26+
27+
- name: Install python3-devel
28+
become: yes
29+
yum:
30+
name: python3-devel
31+
state: present
32+
enablerepo: "{{ _reponame.stdout }}"
33+
register: _task
34+
retries: 5
35+
delay: 3
36+
until: _task is succeeded
37+
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
38+
tags: st2
39+
240
- name: Install latest st2 package, auto-update
341
become: yes
442
package:

0 commit comments

Comments
 (0)