From 523c24fc11a970036fd16037aa2a6f63b961beb2 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Thu, 24 Jun 2021 16:57:54 +0200 Subject: [PATCH] Remove from master the ceph-ansible references ceph-ansible is not used anymore in master and both ceph deployment and day2 ops are managed by the new cephadm tool. This change aligns the existing validations removing the tasks and the playbooks involving cpeh-ansible (see [1]). [1] https://blueprints.launchpad.net/tripleo/+spec/tripleo-ceph Change-Id: I6a80870680091c9839efb1f222a6adbdef5b36df --- playbooks/ceph-ansible-installed.yaml | 16 ----- roles/ceph/defaults/main.yml | 2 - .../ceph-ansible-installed/converge.yml | 70 ------------------- .../ceph-ansible-installed/molecule.yml | 3 - .../ceph-ansible-installed/prepare.yml | 29 -------- roles/ceph/tasks/ceph-ansible-installed.yaml | 37 ---------- 6 files changed, 157 deletions(-) delete mode 100644 playbooks/ceph-ansible-installed.yaml delete mode 100644 roles/ceph/molecule/ceph-ansible-installed/converge.yml delete mode 100644 roles/ceph/molecule/ceph-ansible-installed/molecule.yml delete mode 100644 roles/ceph/molecule/ceph-ansible-installed/prepare.yml delete mode 100644 roles/ceph/tasks/ceph-ansible-installed.yaml diff --git a/playbooks/ceph-ansible-installed.yaml b/playbooks/ceph-ansible-installed.yaml deleted file mode 100644 index c89cf318f..000000000 --- a/playbooks/ceph-ansible-installed.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- hosts: undercloud - vars: - metadata: - name: Check if ceph-ansible is installed on the undercloud - description: | - Prints a message if ceph-ansible isn't installed - groups: - - pre-deployment - - pre-ceph - fail_without_ceph_ansible: false - ceph_ansible_repo: "centos-ceph-nautilus" - tasks: - - include_role: - name: ceph - tasks_from: ceph-ansible-installed diff --git a/roles/ceph/defaults/main.yml b/roles/ceph/defaults/main.yml index f4e5c9c7c..830c7dead 100644 --- a/roles/ceph/defaults/main.yml +++ b/roles/ceph/defaults/main.yml @@ -1,8 +1,6 @@ --- -fail_without_ceph_ansible: false fail_without_deps: false fail_on_ceph_health_err: false fail_on_ceph_health_warn: false osd_percentage_min: 0 -ceph_ansible_repo: "centos-ceph-nautilus" container_client: "podman" diff --git a/roles/ceph/molecule/ceph-ansible-installed/converge.yml b/roles/ceph/molecule/ceph-ansible-installed/converge.yml deleted file mode 100644 index 7d531ff70..000000000 --- a/roles/ceph/molecule/ceph-ansible-installed/converge.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -- name: Converge - hosts: all - gather_facts: false - - tasks: - - name: Ensure we do not fail with default behavior - include_role: - name: ceph - tasks_from: ceph-ansible-installed - - - name: Ensure we fail if ceph-ansible is absent - block: - - name: Run validation - include_role: - name: ceph - tasks_from: ceph-ansible-installed - vars: - fail_without_ceph_ansible: true - rescue: - - name: Clear host errors - meta: clear_host_errors - - - name: Test output - debug: - msg: | - Properly detected missing package - - - name: install ceph-ansible - package: - name: ceph-ansible - state: present - - - name: Re-run the validation with ceph-ansible installed - include_role: - name: ceph - tasks_from: ceph-ansible-installed - - - name: Re-run the validation with ceph-ansible installed and fail due to wrong repo - block: - - name: Enforce failure in case of wrong repo - include_role: - name: ceph - tasks_from: ceph-ansible-installed - vars: - fail_without_ceph_ansible: true - rescue: - - name: Clear host errors - meta: clear_host_errors - - - name: Test output - debug: - msg: | - Properly detected wrong repository diff --git a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml b/roles/ceph/molecule/ceph-ansible-installed/molecule.yml deleted file mode 100644 index ba05cf07d..000000000 --- a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# inherits tripleo-validations/.config/molecule/config.yml -# To override default values, please take a look at the config.yml. diff --git a/roles/ceph/molecule/ceph-ansible-installed/prepare.yml b/roles/ceph/molecule/ceph-ansible-installed/prepare.yml deleted file mode 100644 index c2da0de6e..000000000 --- a/roles/ceph/molecule/ceph-ansible-installed/prepare.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -- name: Prepare - hosts: all - gather_facts: false - - tasks: - - name: Inject ceph-ansible repository - yum_repository: - name: tripleo-centos-ceph-nautilus - description: ceph-nautilus repository - baseurl: http://mirror.centos.org/centos/8/storage/x86_64/ceph-nautilus/ - gpgcheck: false - enabled: true diff --git a/roles/ceph/tasks/ceph-ansible-installed.yaml b/roles/ceph/tasks/ceph-ansible-installed.yaml deleted file mode 100644 index 85cd47ee6..000000000 --- a/roles/ceph/tasks/ceph-ansible-installed.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: Check if ceph-ansible is installed - shell: rpm -q ceph-ansible || true - args: - warn: false - changed_when: false - ignore_errors: true - register: ceph_ansible_installed - -- name: Warn about missing ceph-ansible - warn: - msg: If planning to use Ceph, it is necessary to install the ceph-ansible package on the undercloud - when: - - ceph_ansible_installed.stdout.find('is not installed') != -1 - - not fail_without_ceph_ansible|default(false)|bool - -- name: Fail if ceph-ansible is missing - fail: - msg: If planning to use Ceph, it is necessary to install the ceph-ansible package on the undercloud - when: - - ceph_ansible_installed.stdout.find('is not installed') != -1 - - fail_without_ceph_ansible|default(false)|bool - -- name: Get ceph-ansible repository - shell: "yum info ceph-ansible | awk '/From repo/ {print $4}'" - become: true - register: repo - changed_when: false - -- name: Fail if ceph-ansible doesn't belong to the specified repo - fail: - msg: "Make sure ceph-ansible package is installed from {{ ceph_ansible_repo }} \ - or configure the repo name you intend to install it from using the \ - 'CephAnsibleRepo' variable provided by tripleo-heat-templates" - when: - - (repo.stdout | length == 0 or repo.stdout != "{{ ceph_ansible_repo }}") - - fail_without_ceph_ansible|default(false)|bool