diff --git a/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_Suse_family.yml b/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_Suse_family.yml index a1394b814..020ff4bba 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_Suse_family.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_Suse_family.yml @@ -47,4 +47,5 @@ required_packages: - socat - python-pip - gcc + - python-PyMySQL iscsi_client_package: "open-iscsi" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 53905f481..7521a408b 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -85,6 +85,16 @@ - name: "Install pymysql in venv if using" include: pip_install.yml package=pymysql virtualenv=bifrost_venv_dir when: skip_install is not defined and (enable_venv | bool == true) +# NOTE(hwoarang): The python-pymysql package is not available on the CentOS7 +# and old Debian/Ubuntu repositories so we need to get it via pip +- name: "Install pymysql on CentOS/Ubuntu if necessary" + include: pip_install.yml package=pymysql + when: + - skip_install is not defined + - enable_venv | bool == false + - (ansible_distribution == 'CentOS' and ansible_distribution_major_version <= 7) or + (ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('14.10', '==')) + - name: "Install Ironic using pip" include: pip_install.yml package=ironic