Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible changes for RH 7 and Python3 #278

Merged
merged 5 commits into from
Nov 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions roles/StackStorm.st2/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
---
- name: Verify python3-devel is available in enabled repo
become: yes
shell:
cmd: yum info python3-devel
changed_when: false
register: _rpm_check
args:
warn: False
ignore_errors: yes
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7'
# Disable warning as yum doesn't support info
tags: st2, skip_ansible_lint

- name: Discover name of optional server rpm
become: yes
shell:
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}'
changed_when: false
register: _reponame
args:
warn: False
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
# Disable warning as yum doesn't support repolist
tags: st2, skip_ansible_lint

- name: Install python3-devel
become: yes
yum:
name: python3-devel
state: present
enablerepo: "{{ _reponame.stdout }}"
register: _task
retries: 5
delay: 3
until: _task is succeeded
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '7' and _rpm_check.rc != 0
tags: st2

- name: Install latest st2 package, auto-update
become: yes
package:
Expand Down