You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2022/07/28 15:12:50 UTC

[airavata] branch develop updated: AIRAVATA-3609 Fix database.yml for Rocky

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2f8ea5cb14 AIRAVATA-3609 Fix database.yml for Rocky
2f8ea5cb14 is described below

commit 2f8ea5cb145a524a0e32e1f6b6017e41fe5b5b94
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jul 28 11:11:58 2022 -0400

    AIRAVATA-3609 Fix database.yml for Rocky
---
 dev-tools/ansible/roles/database/tasks/main.yml | 36 ++++++++++++-------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/dev-tools/ansible/roles/database/tasks/main.yml b/dev-tools/ansible/roles/database/tasks/main.yml
index 899197bad5..e34a716fa6 100644
--- a/dev-tools/ansible/roles/database/tasks/main.yml
+++ b/dev-tools/ansible/roles/database/tasks/main.yml
@@ -23,25 +23,25 @@
 #   yum: name=* state=latest
 
 # Install Mysql
-- name: install epel release  (Redhat)
+- name: install epel release  (CentOS)
   yum: name=epel-release state=present
   become_user: root
-  when: ansible_os_family == "RedHat"
+  when: ansible_distribution == "CentOS"
 
 - name: install epel release (Rocky)
   dnf: name=epel-release
   become_user: root
-  when: ansible_os_family == "Rocky"
+  when: ansible_distribution == "Rocky"
 
-- name: install pip (Redhat)
+- name: install pip (CentOS)
   yum: name=python-pip state=latest update_cache=yes
   become_user: root
-  when: ansible_os_family == "RedHat"
+  when: ansible_distribution == "CentOS"
 
 - name: install pip (Rocky)
   dnf: name=python39-pip
   become_user: root
-  when: ansible_os_family == "Rocky"
+  when: ansible_distribution == "Rocky"
 
 - name: install pexpect
   pip: name=pexpect
@@ -51,15 +51,15 @@
 #   apt: pkg="python-mysqldb" state=present
 #   when: ansible_os_family == 'Debian'
 
-- name: Adds Python MySQL support on RedHat/CentOS
+- name: Adds Python MySQL support on CentOS
   yum: name=MySQL-python state=present
   become_user: root
-  when: ansible_os_family == 'RedHat' or ansible_os_family == 'CentOS'
+  when: ansible_distribution == 'CentOS'
 
 - name: Adds Python MySQL support on Rocky
   dnf: name=python3-mysql state=present
   become_user: root
-  when: ansible_os_family == 'Rocky'
+  when: ansible_distribution == 'Rocky'
 
 - name: Add MariaDB yum repository on CentOS {{ ansible_distribution }}
   copy: src="MariaDB_yum_CentOS_{{ ansible_distribution_major_version }}.repo"
@@ -67,17 +67,17 @@
   become_user: root
   when: ansible_distribution == 'CentOS'
 
-- name: install mariadb (Redhat or CentOS)
+- name: install mariadb (CentOS)
   yum: name="{{ item }}" state=latest update_cache=yes
   with_items: "{{ mysql_packages }}"
   become_user: root
-  when: ansible_os_family == 'RedHat' or ansible_os_family == 'CentOS'
+  when: ansible_distribution == 'CentOS'
 
 - name: install mariadb (Rocky)
   dnf: name="{{ item }}"
   with_items: "{{ mysql_packages }}"
   become_user: root
-  when: ansible_os_family == 'Rocky'
+  when: ansible_distribution == 'Rocky'
 
 - name: check if mysql has been updated
   stat: path=/usr/share/mysql/SELinux/mariadb.pp
@@ -86,14 +86,14 @@
 - debug:
     var: mysql_selinux_update
 
-- name: double check policycoreutils installed (Redhat or Centos)
+- name: double check policycoreutils installed (Centos)
   yum: name=policycoreutils-python state=installed
-  when: mysql_selinux_update.stat.exists == False and (ansible_os_family == 'RedHat' or ansible_os_family == 'CentOS')
+  when: mysql_selinux_update.stat.exists == False and (ansible_distribution == 'CentOS')
   become_user: root
 
 - name: double check policycoreutils installed (Rocky)
   dnf: name=policycoreutils-python-utils state=installed
-  when: mysql_selinux_update.stat.exists == False and ansible_os_family == 'Rocky'
+  when: mysql_selinux_update.stat.exists == False and ansible_distribution == 'Rocky'
   become_user: root
 
 - name: Copy SELinux type enforcement file
@@ -134,15 +134,15 @@
 ## See https://www.rootusers.com/how-to-fix-mariadb-10-0-29-selinux-update-failure/
 # and https://jira.mariadb.org/browse/MDEV-11789
 # For now I'm not adding to Ansible script since this bug should be fixed in next MariaDB release
-- name: start mariadb (Redhat or CentOS)
+- name: start mariadb (CentOS)
   service: name=mysql state=started enabled=yes
   become_user: root
-  when: ansible_os_family == 'RedHat' or ansible_os_family == 'CentOS'
+  when: ansible_distribution == 'CentOS'
 
 - name: start mariadb (Rocky)
   service: name=mariadb state=started enabled=yes
   become_user: root
-  when: ansible_os_family == 'Rocky'
+  when: ansible_distribution == 'Rocky'
 
 - include: secure_install.yml