Add base_path variable to simplify configuration of paths

The base path defaults to /opt/kayobe.

Also modifies the following default paths:

Image cache: /opt/kayobe/images
Source code: /opt/kayobe/src
This commit is contained in:
Mark Goddard 2017-07-28 12:27:23 +00:00
parent e1b2730e85
commit 3eb7f686f9
2 changed files with 16 additions and 4 deletions

View File

@ -2,16 +2,22 @@
# Kayobe global configuration. # Kayobe global configuration.
############################################################################### ###############################################################################
# Miscellaneous configuration. # Path configuration.
# Path to Kayobe configuration directory. # Path to Kayobe configuration directory.
kayobe_config_path: "{{ lookup('env', 'KAYOBE_CONFIG_PATH') | default('/etc/kayobe') }}" kayobe_config_path: "{{ lookup('env', 'KAYOBE_CONFIG_PATH') | default('/etc/kayobe') }}"
# Path in which to store data locally.
base_path: "/opt/kayobe"
# Path in which to cache downloaded images. # Path in which to cache downloaded images.
image_cache_path: "{{ ansible_user_dir ~ '/kayobe-image-cache' }}" image_cache_path: "{{ base_path ~ '/images' }}"
# Path on which to checkout source code repositories. # Path on which to checkout source code repositories.
source_checkout_path: "{{ ansible_user_dir ~ '/kayobe-source' }}" source_checkout_path: "{{ base_path ~ '/src' }}"
###############################################################################
# User configuration.
# User with which to access seed and controller nodes. This user will be # User with which to access seed and controller nodes. This user will be
# created if it does not exist. # created if it does not exist.

View File

@ -2,17 +2,23 @@
# Kayobe global configuration. # Kayobe global configuration.
############################################################################### ###############################################################################
# Miscellaneous configuration. # Path configuration.
# Path to Kayobe configuration. # Path to Kayobe configuration.
#kayobe_config_path: #kayobe_config_path:
# Path in which to store data locally.
#base_path:
# Path in which to cache downloaded images. # Path in which to cache downloaded images.
#image_cache_path: #image_cache_path:
# Path on which to checkout source code repositories. # Path on which to checkout source code repositories.
#source_checkout_path: #source_checkout_path:
###############################################################################
# User configuration.
# User with which to access seed and controller nodes. This user will be # User with which to access seed and controller nodes. This user will be
# created if it does not exist. # created if it does not exist.
#kayobe_ansible_user: #kayobe_ansible_user: