7c9db3a5d7
This commit handles deployment of TLS certificates on control nodes for use by HAProxy, when kolla_enable_tls_external is True and a new variable, kolla_tls_cert, is populated with the contents of the certificate file. Story: 2001680 Task: 6786 Change-Id: I78df9e2d7acb96a4358ba3819a2dfc65e8c261d5
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
---
|
|
- name: Ensure the Kolla Ansible configuration directores exist
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "{{ ansible_user_id }}"
|
|
group: "{{ ansible_user_id }}"
|
|
mode: 0750
|
|
become: True
|
|
with_items:
|
|
- "{{ kolla_config_path }}"
|
|
- "{{ kolla_config_path }}/inventory"
|
|
- "{{ kolla_node_custom_config_path }}"
|
|
|
|
- name: Ensure the Kolla global configuration file exists
|
|
template:
|
|
src: "globals.yml.j2"
|
|
dest: "{{ kolla_config_path }}/globals.yml"
|
|
mode: 0640
|
|
|
|
# NOTE: We're not looping over the two inventory files to avoid having the file
|
|
# content displayed in the ansible-playbook output.
|
|
|
|
- name: Ensure the Kolla seed inventory file exists
|
|
copy:
|
|
content: "{{ kolla_seed_inventory }}"
|
|
dest: "{{ kolla_config_path }}/inventory/seed"
|
|
mode: 0640
|
|
|
|
- name: Ensure the Kolla overcloud inventory file exists
|
|
copy:
|
|
content: "{{ kolla_overcloud_inventory }}"
|
|
dest: "{{ kolla_config_path }}/inventory/overcloud"
|
|
mode: 0640
|
|
|
|
- name: Ensure the Kolla passwords file exists
|
|
kolla_passwords:
|
|
src: "{{ kolla_ansible_passwords_path }}"
|
|
dest: "{{ kolla_ansible_passwords_path }}"
|
|
mode: 0640
|
|
sample: "{{ kolla_ansible_install_dir }}/etc_examples/kolla/passwords.yml"
|
|
overrides: "{{ kolla_ansible_custom_passwords }}"
|
|
vault_password: "{{ kolla_ansible_vault_password }}"
|
|
virtualenv: "{{ kolla_ansible_venv or omit }}"
|
|
|
|
- name: Ensure the Kolla passwords file is copied into place
|
|
copy:
|
|
src: "{{ kolla_ansible_passwords_path }}"
|
|
dest: "{{ kolla_config_path }}/passwords.yml"
|
|
remote_src: True
|
|
|
|
- name: Ensure the HAProxy TLS certificate bundle is copied into place
|
|
block:
|
|
- file:
|
|
path: "{{ kolla_external_fqdn_cert | dirname }}"
|
|
state: directory
|
|
recurse: yes
|
|
- copy:
|
|
content: "{{ kolla_tls_cert }}"
|
|
dest: "{{ kolla_external_fqdn_cert }}"
|
|
when:
|
|
- kolla_tls_cert is not none
|