TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack 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.
 
 
 

57 lines
2.3 KiB

---
# 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: Deploy the RGW daemon
block:
# Using two tasks with a boolean due to the ansible bug: https://github.com/ansible/ansible/issues/68364
- name: Collect the host and build the resulting host list
set_fact:
_hosts: "{{ _hosts|default([]) + [ hostvars[item].canonical_hostname ] }}"
with_items: "{{ groups['ceph_rgw'] }}"
when: tripleo_cephadm_fqdn | bool
- name: Collect the host and build the resulting host list
set_fact:
_hosts: "{{ _hosts|default([]) + [ hostvars[item].inventory_hostname ] }}"
with_items: "{{ groups['ceph_rgw'] }}"
when: not tripleo_cephadm_fqdn | bool
- name: Create the RGW Daemon spec definition
become: true
ceph_mkspec:
service_type: rgw
apply: true
hosts: "{{ _hosts | unique }}"
spec:
rgw_frontend_port: "{{ radosgw_frontend_port }}"
rgw_realm: 'default'
rgw_zone: 'default'
rgw_frontend_ssl_certificate: "{{ rgw_frontend_cert }}"
render_path: "{{ tripleo_cephadm_spec_home }}"
networks: "{{ radosgw_address_block }}"
register: spc
environment:
CEPH_CONTAINER_IMAGE: "{{ tripleo_cephadm_container_ns + '/' + tripleo_cephadm_container_image + ':' + tripleo_cephadm_container_tag }}"
CEPH_CONTAINER_BINARY: "{{ tripleo_cephadm_container_cli }}"
vars:
rgw_frontend_cert: |-
{% set fcert_lookup = '' %}
{% if tripleo_cephadm_internal_tls_enabled | bool %}
{% set fcert_lookup = lookup('file', radosgw_frontend_ssl_certificate) %}
{% endif %}
{{ fcert_lookup }}
when:
- tripleo_enabled_services | intersect(['ceph_rgw'])