瀏覽代碼

Merge "Sync 'validations/ceph-dependencies-installed.yaml' with the new role" into stable/stein

stable/stein
Zuul Gerrit Code Review 4 月之前
父節點
當前提交
ee6818973b
共有 1 個檔案被更改,包括 39 行新增0 行删除
  1. +39
    -0
      validations/ceph-dependencies-installed.yaml

+ 39
- 0
validations/ceph-dependencies-installed.yaml 查看文件

@@ -0,0 +1,39 @@
---
- hosts: overcloud
vars:
metadata:
name: Check if Ceph dependencies are installed
description: >
Prints a message if a ceph dependency is missed
groups:
- pre-deployment
fail_without_deps: true
tripleo_delegate_to: "{{ groups['overcloud'] | default([]) }}"
packages:
- lvm2
tasks:
- name: Gather the package facts
package_facts:
manager: auto

- name: Warn about missing dependencies
warn:
msg: "If planning to use Ceph, it is necessary to check {{ item[0] }} is installed!"
when:
- "'{{ item[0] }}' not in ansible_facts.packages"
- not fail_without_deps|default(false)|bool
delegate_to: "{{ item[1] }}"
with_nested:
- "{{ packages }}"
- "{{ tripleo_delegate_to }}"

- name: Fail if a ceph dependency is missing
fail:
msg: "If planning to use Ceph, it is necessary to install {{ item[0] }} package"
when:
- "'{{ item[0] }}' not in ansible_facts.packages"
- fail_without_deps|default(false)|bool
delegate_to: "{{ item[1] }}"
with_nested:
- "{{ packages }}"
- "{{ tripleo_delegate_to }}"

Loading…
取消
儲存