![Dmitriy Rabotyagov](/assets/img/avatar_default.png)
In order to migrate to use of PKI role for Octavia, we need to feed already existing certificates to the PKI role. For that we're creating an overrides file, that will define already existing certificates like they are user-provided ones. Needed-By: https://review.opendev.org/c/openstack/openstack-ansible-os_octavia/+/839068 Change-Id: I848a453a3c0240fa2da5b51d1f088e87ba0888d4
41 lines
2.0 KiB
YAML
41 lines
2.0 KiB
YAML
---
|
|
# 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 environment and configuration for deploying the new release
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: false
|
|
user: root
|
|
vars:
|
|
generated_octavia_cert_dir: "{{ octavia_cert_dir | default(lookup('env', 'HOME') ~ '/openstack-ansible/octavia') }}"
|
|
generated_octavia_cert_setup_host: "{{ octavia_cert_setup_host | default('localhost') }}"
|
|
generated_octavia_cert_vars:
|
|
octavia_client_ca: "{{ octavia_client_ca | default(generated_octavia_cert_dir ~ '/ca_01.pem') }}"
|
|
octavia_client_cert: "{{ octavia_client_cert | default(generated_octavia_cert_dir ~ '/client.pem') }}"
|
|
octavia_client_key: "{{ octavia_client_key | default(generated_octavia_cert_dir ~ '/client.key') }}"
|
|
octavia_ca_certificate: "{{ octavia_ca_certificate | default(generated_octavia_cert_dir ~ '/ca_server_01.pem') }}"
|
|
octavia_ca_private_key: "{{ octavia_ca_private_key | default(generated_octavia_cert_dir ~ '/private/cakey.pem') }}"
|
|
octavia_server_ca: "{{ octavia_server_ca | default(generated_octavia_cert_dir ~ '/ca_server_01.pem') }}"
|
|
|
|
tasks:
|
|
|
|
- name: Place overrides for Octavia Amphora certificates
|
|
blockinfile:
|
|
marker: "### {mark} Yoga upgrade migration block ###"
|
|
path: "{{ openstack_config_dir }}/user_octavia_migration.yml"
|
|
block: "{{ generated_octavia_cert_vars | to_nice_yaml }}"
|
|
create: True
|
|
when:
|
|
- "'octavia_all' in groups"
|
|
- groups['octavia_all'] | length > 0
|