47a4f3dd8d
This reverts commit 4a1fab391d
.
Reason for revert: https://bugs.launchpad.net/tripleo/+bug/1981634
Change-Id: I5e7ac71ccde24cce62f73a3ed95d3805d6dcaf2e
115 lines
4.7 KiB
YAML
115 lines
4.7 KiB
YAML
---
|
|
# Copyright 2021 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: create cephadm workdir
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ playbook_dir }}/cephadm"
|
|
tags:
|
|
- run_cephadm
|
|
|
|
- name: symbolic link to tripleo inventory from cephadm work directory
|
|
file:
|
|
src: "{{ inventory_file }}"
|
|
dest: "{{ playbook_dir }}/cephadm/inventory.yml"
|
|
state: link
|
|
force: true
|
|
tags:
|
|
- run_cephadm
|
|
|
|
- name: get the list of enabled services on the overcloud
|
|
set_fact:
|
|
tripleo_enabled_services: "{{ enabled_services | default([]) }}"
|
|
|
|
- name: "Set grafana_vip: {{ net_vip_map[service_net_map['ceph_dashboard_network']] }}"
|
|
set_fact:
|
|
grafana_vip: "{{ net_vip_map[service_net_map['ceph_dashboard_network']] }}"
|
|
when:
|
|
- tripleo_enabled_services | intersect(['ceph_grafana'])
|
|
|
|
- include_tasks: build_pools.yml
|
|
vars:
|
|
tripleo_pool_images: "{{ ceph_pools.glance_pool.enabled }}"
|
|
tripleo_pool_vms: "{{ ceph_pools.nova_pool.enabled }}"
|
|
tripleo_pool_volumes: "{{ ceph_pools.cinder_pool.enabled }}"
|
|
tripleo_pool_backup: "{{ ceph_pools.cinder_backup_pool.enabled }}"
|
|
tripleo_pool_metrics: "{{ ceph_pools.gnocchi_pool.enabled }}"
|
|
|
|
- include_tasks: build_keys.yml
|
|
|
|
- include_tasks: build_config_overrides.yml
|
|
|
|
- name: generate heat cephadm-extra-vars for running tripleo_cephadm role
|
|
copy:
|
|
dest: "{{ playbook_dir }}/cephadm/cephadm-extra-vars-heat.yml"
|
|
content: "{{ cephadm_extra_vars | combine(ceph_overrides|default({}))
|
|
| combine(ceph_monitoring_stack|default({}))
|
|
| combine(ceph_dashboard_vars|default({}))
|
|
| combine(cephadm_rbdmirror| default({}))
|
|
| combine(cephadm_rgw_vars|default({}))
|
|
| combine(cephfs_metadata|default({}))
|
|
| combine(ceph_nfs_vars|default({}))
|
|
| combine(cephfs_data|default({}))
|
|
| combine(ceph_pools|default({}))
|
|
| to_nice_yaml }}"
|
|
|
|
- name: Configure boostrap host info for cephadm
|
|
when: "{{ groups['ceph_mon'] | default([]) | length > 0 }}"
|
|
block:
|
|
- name: Set bootstrap host
|
|
set_fact:
|
|
tripleo_cephadm_bootstrap_host: "{{ groups['ceph_mon'][0] }}"
|
|
|
|
- name: Set first monitor IP
|
|
set_fact:
|
|
tripleo_cephadm_first_mon_ip: "{{ hostvars[tripleo_cephadm_bootstrap_host][tripleo_run_cephadm_net] |
|
|
default(ansible_host) }}"
|
|
vars:
|
|
tripleo_run_cephadm_net: "{{ service_net_map['ceph_mon_network']|default('') + '_ip' }}"
|
|
|
|
- name: genereate ceph_spec for bootstrap
|
|
ceph_spec_bootstrap:
|
|
new_ceph_spec: "{{ tripleo_run_cephadm_spec_path }}"
|
|
tripleo_ansible_inventory: "{{ inventory_file }}"
|
|
fqdn: "{{ ceph_spec_fqdn }}"
|
|
osd_spec: "{{ ceph_osd_spec }}"
|
|
when:
|
|
- tripleo_cephadm_dynamic_spec
|
|
- not tripleo_cephadm_deployed_ceph
|
|
|
|
- name: generate ansible cephadm-extra-vars for running tripleo_cephadm role
|
|
copy:
|
|
dest: "{{ playbook_dir }}/cephadm/cephadm-extra-vars-ansible.yml"
|
|
content: |
|
|
tripleo_cephadm_bootstrap_host: {{ tripleo_cephadm_bootstrap_host | default('') }}
|
|
tripleo_cephadm_first_mon_ip: {{ tripleo_cephadm_first_mon_ip | default('') }}
|
|
tripleo_cephadm_spec_on_bootstrap: false
|
|
tripleo_cephadm_pools: {{ openstack_pools.get('openstack_pools', []) }}
|
|
tripleo_cephadm_keys: {{ keys.get('keys',[]) }}
|
|
tripleo_cephadm_dashboard_frontend_vip: {{ grafana_vip|default() }}
|
|
service_net_map: {{ service_net_map|default({}) }}
|
|
tripleo_enabled_services: {{ enabled_services | default([]) }}
|
|
tripleo_cephadm_fqdn: "{{ ceph_spec_fqdn | bool }}"
|
|
tripleo_cephadm_spec_ansible_host: "{{ tripleo_run_cephadm_spec_path }}"
|
|
tripleo_cephadm_internal_tls_enabled: "{{ enable_internal_tls }}"
|
|
tripleo_cephadm_num_osd_expected: "{{ groups['ceph_osd'] | default([]) | length }}"
|
|
tripleo_cephadm_deployed_ceph: {{ tripleo_cephadm_deployed_ceph | default(false) }}
|
|
tripleo_cephadm_wait_for_mons: "{{ false if tripleo_cephadm_deployed_ceph else true }}"
|
|
tripleo_cephadm_wait_for_osds: "{{ false if tripleo_cephadm_deployed_ceph else true }}"
|
|
tripleo_cephadm_predeployed: "{{ false if tripleo_cephadm_deployed_ceph else true }}"
|