9223deeecd
The variable {{ node_config_directory }} is used for the configuration directory on the remote hosts, and should not be used for paths on the deploy host (localhost). This changes the default value of the TLS certificate and CA file to reference {{ CONFIG_DIR }}, in line with the directory used for admin-openrc.sh (as of I0709482ead4b7a67e82796e17f85bde151e71bc0). This change also introduces a variable, {{ node_config }}, that references {{ CONFIG_DIR | default('/etc/kolla') }}, to remove duplication. Change-Id: Ibd82ac78630ebfff5824c329d7399e1e900c0ee0 Closes-Bug: #1804025
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
---
|
|
- name: Checking Docker version
|
|
command: docker --version
|
|
register: result
|
|
changed_when: false
|
|
when: inventory_hostname in groups['baremetal']
|
|
failed_when: result | failed
|
|
or result.stdout | regex_replace('.*(\\d+\\.\\d+\\.\\d+).*', '\\1') | version_compare(docker_version_min, '<')
|
|
|
|
# NOTE(mgoddard): If passwords.yml is encrypted using ansible-vault, this check
|
|
# will pass, but only because nothing in the vault file has the format of a
|
|
# YAML dict item.
|
|
- name: Checking empty passwords in passwords.yml. Run kolla-genpwd if this task fails
|
|
local_action: command grep '^[^#].*:\s*$' "{{ node_config }}/passwords.yml"
|
|
run_once: True
|
|
register: result
|
|
changed_when: false
|
|
failed_when: result.stdout | regex_replace('(.*ssh_key.*)', '') | search(":")
|
|
|
|
- name: Check if nscd is running
|
|
command: pgrep nscd
|
|
ignore_errors: yes
|
|
failed_when: false
|
|
changed_when: false
|
|
register: nscd_status
|
|
|
|
- name: Fail if nscd is running
|
|
fail:
|
|
msg: |
|
|
Service nscd is running. This is known to cause issues with Docker's user namespaces in
|
|
Kolla. Please disable it before proceeding.
|
|
when:
|
|
- nscd_status.rc == 0
|
|
|
|
- name: Checking internal and external VIP addresses differ
|
|
run_once: True
|
|
local_action: fail msg='kolla_external_vip_address and kolla_internal_vip_address must not be the same when TLS is enabled'
|
|
changed_when: false
|
|
when:
|
|
- kolla_enable_tls_external | bool
|
|
- kolla_external_vip_address == kolla_internal_vip_address
|