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
This commit is contained in:
Francesco Pantano 2021-06-24 16:57:54 +02:00
parent 021c766eff
commit 523c24fc11
No known key found for this signature in database
GPG Key ID: 0458D4D1F41BD75C
6 changed files with 0 additions and 157 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -1,3 +0,0 @@
---
# inherits tripleo-validations/.config/molecule/config.yml
# To override default values, please take a look at the config.yml.

View File

@ -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

View File

@ -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