From a0f49cbd5cbfedf2cee0f08aaccba053bf26e205 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 18 Sep 2017 16:42:04 +0100 Subject: [PATCH] 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. --- ansible/group_vars/all/globals | 17 ++++++++++------- .../kolla-ansible/templates/globals.yml.j2 | 3 ++- etc/kayobe/globals.yml | 15 +++++++++------ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ansible/group_vars/all/globals b/ansible/group_vars/all/globals index cdc554b0a..1eec6d372 100644 --- a/ansible/group_vars/all/globals +++ b/ansible/group_vars/all/globals @@ -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' }}" ############################################################################### diff --git a/ansible/roles/kolla-ansible/templates/globals.yml.j2 b/ansible/roles/kolla-ansible/templates/globals.yml.j2 index 66e0f6c80..f79710387 100644 --- a/ansible/roles/kolla-ansible/templates/globals.yml.j2 +++ b/ansible/roles/kolla-ansible/templates/globals.yml.j2 @@ -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 }}" #################### diff --git a/etc/kayobe/globals.yml b/etc/kayobe/globals.yml index ad20ca411..5f3edc701 100644 --- a/etc/kayobe/globals.yml +++ b/etc/kayobe/globals.yml @@ -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: ###############################################################################