kolla-ansible/ansible/roles/octavia/tasks/precheck.yml
Noboru Iwamatsu e84c968ed2 Adapt to Octavia Certificate Configuration Guide.
This patch updates the octavia controller deployment to use the
latest octavia certificate configuration guide [1]. The dual CA changes
were introduced in Train.

[1] https://docs.openstack.org/octavia/latest/admin/guides/certificates.html

Change-Id: If89ec0d631568db70690f1a69d00115c59abe678
Closes-Bug: #1862133
2020-04-29 08:30:12 +03:00

58 lines
1.6 KiB
YAML

---
- import_role:
name: service-precheck
vars:
service_precheck_services: "{{ octavia_services }}"
service_name: "{{ project_name }}"
- name: Get container facts
become: true
kolla_container_facts:
name:
- octavia_api
- octavia_health_manager
register: container_facts
- name: Checking free port for Octavia API
wait_for:
host: "{{ api_interface_address }}"
port: "{{ octavia_api_listen_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- container_facts['octavia_api'] is not defined
- inventory_hostname in groups['octavia-api']
- name: Checking free port for Octavia Health Manager
wait_for:
host: "{{ api_interface_address }}"
port: "{{ octavia_health_manager_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- container_facts['octavia_health_manager'] is not defined
- inventory_hostname in groups['octavia-health-manager']
- name: Warn about certificate changes
debug:
msg: >-
Octavia's certificate configuration has been changed since Train. The new
configuration requires 4 PEM files. Please check certificate configuration
guide at https://docs.openstack.org/octavia/latest/admin/guides/certificates.html
- name: Checking certificate files exist for octavia
stat:
path: "{{ node_custom_config }}/octavia/{{ item }}"
delegate_to: localhost
run_once: True
register: result
failed_when: not result.stat.exists
when: inventory_hostname in groups['octavia-worker']
with_items:
- client.cert-and-key.pem
- client_ca.cert.pem
- server_ca.cert.pem
- server_ca.key.pem