Stop using KOLLA_BASE_PATH to set base_path

This is part of an effort to use environment variables for configuration of
paths on the local ansible control host, and ansible variables for
configuration of paths on remote hosts (seed, seed-hypervisor, overcloud). The
base_path variable is used to set sensible defaults for image_cache_path,
source_checkout_path and virtualenv_path.
This commit is contained in:
Mark Goddard 2017-09-18 16:42:04 +01:00
parent 4acbf52867
commit a0f49cbd5c
3 changed files with 21 additions and 14 deletions

View File

@ -2,21 +2,24 @@
# Kayobe global configuration.
###############################################################################
# Path configuration.
# Local path configuration (ansible control host).
# Path to Kayobe configuration directory.
# Path to Kayobe configuration directory on ansible control host.
kayobe_config_path: "{{ lookup('env', 'KAYOBE_CONFIG_PATH') | default('/etc/kayobe', true) }}"
# Path in which to store data locally.
base_path: "{{ lookup('env', 'KAYOBE_BASE_PATH') | default('/opt/kayobe', true) }}"
###############################################################################
# Remote path configuration (seed, seed-hypervisor and overcloud hosts).
# Path in which to cache downloaded images.
# Base path for kayobe state on remote hosts.
base_path: "/opt/kayobe"
# Path in which to cache downloaded images on remote hosts.
image_cache_path: "{{ base_path ~ '/images' }}"
# Path on which to checkout source code repositories.
# Path on which to checkout source code repositories on remote hosts.
source_checkout_path: "{{ base_path ~ '/src' }}"
# Path on which to create python virtualenvs.
# Path on which to create python virtualenvs on remote hosts.
virtualenv_path: "{{ base_path ~ '/venvs' }}"
###############################################################################

View File

@ -43,7 +43,8 @@ kolla_external_vip_address: "{{ kolla_external_vip_address }}"
# kolla_external_vip_address.
kolla_external_fqdn: "{{ kolla_external_fqdn }}"
# Path to directory containing Kolla custom configuration files.
# Path to directory on control host containing Kolla custom configuration
# files.
node_custom_config: "{{ kolla_node_custom_config_path }}"
####################

View File

@ -2,21 +2,24 @@
# Kayobe global configuration.
###############################################################################
# Path configuration.
# Local path configuration (ansible control host).
# Path to Kayobe configuration.
# Path to Kayobe configuration directory on ansible control host.
#kayobe_config_path:
# Path in which to store data locally.
###############################################################################
# Remote path configuration (seed, seed-hypervisor and overcloud hosts).
# Base path for kayobe state on remote hosts.
#base_path:
# Path in which to cache downloaded images.
# Path in which to cache downloaded images on remote hosts.
#image_cache_path:
# Path on which to checkout source code repositories.
# Path on which to checkout source code repositories on remote hosts.
#source_checkout_path:
# Path on which to create python virtualenvs.
# Path on which to create python virtualenvs on remote hosts.
#virtualenv_path:
###############################################################################