A collection of Ansible playbooks to detect and report potential issues during TripleO deployments
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2KB

  1. ---
  2. - hosts: overcloud
  3. vars:
  4. metadata:
  5. name: Check if Ceph dependencies are installed
  6. description: >
  7. Prints a message if a ceph dependency is missed
  8. groups:
  9. - pre-deployment
  10. fail_without_deps: true
  11. tripleo_delegate_to: "{{ groups['overcloud'] | default([]) }}"
  12. packages:
  13. - lvm2
  14. tasks:
  15. - name: Gather the package facts
  16. package_facts:
  17. manager: auto
  18. - name: Warn about missing dependencies
  19. warn:
  20. msg: "If planning to use Ceph, it is necessary to check {{ item[0] }} is installed!"
  21. when:
  22. - "'{{ item[0] }}' not in ansible_facts.packages"
  23. - not fail_without_deps|default(false)|bool
  24. delegate_to: "{{ item[1] }}"
  25. with_nested:
  26. - "{{ packages }}"
  27. - "{{ tripleo_delegate_to }}"
  28. - name: Fail if a ceph dependency is missing
  29. fail:
  30. msg: "If planning to use Ceph, it is necessary to install {{ item[0] }} package"
  31. when:
  32. - "'{{ item[0] }}' not in ansible_facts.packages"
  33. - fail_without_deps|default(false)|bool
  34. delegate_to: "{{ item[1] }}"
  35. with_nested:
  36. - "{{ packages }}"
  37. - "{{ tripleo_delegate_to }}"