kolla-ansible/ansible/roles/octavia/tasks/precheck.yml
Jim Rollenhagen 55702739d0 Allow octavia services to use independent hostnames
This allows octavia service endpoints to use custom hostnames, and adds the
following variables:

* octavia_internal_fqdn
* octavia_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds a octavia_api_listen_port option, which defaults to
octavia_api_port for backward compatibility.

This option allow the user to differentiate between the port the
service listens on, and the port the service is reachable on. This is
useful for external load balancers which live on the same host as the
service itself.

Change-Id: I1310eb5573a469b1a0e9549e853734455307a8b3
Implements: blueprint service-hostnames
2019-03-06 15:08:28 -05:00

41 lines
1.1 KiB
YAML

---
- name: Get container facts
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: Checking certificate files exist for octavia
local_action: stat path="{{ node_custom_config }}/octavia/{{ item }}"
run_once: True
register: result
failed_when: not result.stat.exists
when: inventory_hostname in groups['octavia-worker']
with_items:
- cakey.pem
- ca_01.pem
- client.pem