From 3667af051098f04b65e842b9724cf81a2263b2c6 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 2 Dec 2019 14:19:52 +0100 Subject: [PATCH] common: add centos8 support This commit adds CentOS 8 support. Signed-off-by: Guillaume Abrioux --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- .../installs/redhat_community_repository.yml | 1 + .../tasks/installs/redhat_dev_repository.yml | 18 ++++++++++++++++++ roles/ceph-defaults/defaults/main.yml | 2 +- tox-filestore_to_bluestore.ini | 2 +- tox-update.ini | 2 +- tox.ini | 2 +- 8 files changed, 25 insertions(+), 6 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 06ca800df92..ea19c29e825 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -85,7 +85,7 @@ dummy: #centos_package_dependencies: # - epel-release -# - libselinux-python +# - "{{ 'libselinux-python' if ansible_distribution_major_version | int != 8 else 'python3-libselinux' }}" #redhat_package_dependencies: [] diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 33fd858a8fd..4f4b1acadf6 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -85,7 +85,7 @@ fetch_directory: ~/ceph-ansible-keys #centos_package_dependencies: # - epel-release -# - libselinux-python +# - "{{ 'libselinux-python' if ansible_distribution_major_version | int != 8 else 'python3-libselinux' }}" #redhat_package_dependencies: [] diff --git a/roles/ceph-common/tasks/installs/redhat_community_repository.yml b/roles/ceph-common/tasks/installs/redhat_community_repository.yml index 332491d4a5f..61e8363e1fc 100644 --- a/roles/ceph-common/tasks/installs/redhat_community_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_community_repository.yml @@ -5,6 +5,7 @@ register: result until: result is succeeded tags: with_pkg + when: ansible_distribution_major_version | int == 8 - name: configure red hat ceph community repository stable key rpm_key: diff --git a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml index 2b767e9291e..8836d745114 100644 --- a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml @@ -1,4 +1,22 @@ --- +- name: install dnf-plugins-core + package: + name: dnf-plugins-core + tags: with_pkg + +- name: enable ceph-el8 copr + command: dnf copr enable -y ktdreyer/ceph-el8 + args: + creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ktdreyer:ceph-el8.repo + +- name: enable ceph lab extras repository + yum_repository: + name: lab-extras + baseurl: http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ + description: Sepia Lab Extras repository + enabled: true + gpgcheck: false + - name: fetch ceph red hat development repository uri: # Use the centos repo since we don't currently have a dedicated red hat repo diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 1515bfac40f..57d7e69e32e 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -77,7 +77,7 @@ debian_package_dependencies: [] centos_package_dependencies: - epel-release - - libselinux-python + - "{{ 'libselinux-python' if ansible_distribution_major_version | int != 8 else 'python3-libselinux' }}" redhat_package_dependencies: [] diff --git a/tox-filestore_to_bluestore.ini b/tox-filestore_to_bluestore.ini index 01b5ef2caf4..dd171eb9689 100644 --- a/tox-filestore_to_bluestore.ini +++ b/tox-filestore_to_bluestore.ini @@ -20,7 +20,7 @@ setenv= ANSIBLE_STDOUT_CALLBACK = yaml # non_container: DEV_SETUP = True # Set the vagrant box image to use - centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7 + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64 diff --git a/tox-update.ini b/tox-update.ini index 3147c344dd4..132a870e027 100644 --- a/tox-update.ini +++ b/tox-update.ini @@ -20,7 +20,7 @@ setenv= ANSIBLE_STDOUT_CALLBACK = yaml # non_container: DEV_SETUP = True # Set the vagrant box image to use - centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7 + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64 diff --git a/tox.ini b/tox.ini index ce7de02b92b..20e08a2c314 100644 --- a/tox.ini +++ b/tox.ini @@ -385,7 +385,7 @@ setenv= ANSIBLE_STDOUT_CALLBACK = yaml non_container: DEV_SETUP = True # Set the vagrant box image to use - centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7 + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64