
The group variables originally in ansible/group_vars/ were playbook group variables, due to being adjacent to the playbooks. Typically they provided default values for global variables in the all group, as well as some more specific groups. This has worked fairly well, but results in (at least) a couple of problems. 1. The default variable precedence rules mean that these playbook group variables have a higher precedence than inventory group variables (for a given group). This can make it challenging to override playbook group variables in the inventory in Kayobe configuration. 2. Any playbook run by Kayobe must be in the same directory as the playbook group variables in order to use them. Given that they include variables required for connectivity such as ansible_host and ansible_user, this is quite critical. For Kayobe custom playbooks, we work around this by symlinking to the group_vars directory from the directory containing the custom playbook. This is not an elegant workaround, and has assumptions about the relative paths of the Kayobe configuration and virtual environment in which Kayobe is installed. Story: 2010280 Task: 46233 Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
69 lines
2.6 KiB
Plaintext
69 lines
2.6 KiB
Plaintext
---
|
|
# Kayobe global configuration.
|
|
|
|
###############################################################################
|
|
# Local path configuration (Ansible control host).
|
|
|
|
# Path to Kayobe configuration directory on Ansible control host.
|
|
kayobe_config_path: "{{ lookup('env', 'KAYOBE_CONFIG_PATH') | default('/etc/kayobe', true) }}"
|
|
|
|
# Name of Kayobe environment to use. Default is $KAYOBE_ENVIRONMENT, or an
|
|
# empty string if $KAYOBE_ENVIRONMENT is not set. Can also be set via the
|
|
# --environment argument when invoking kayobe.
|
|
kayobe_environment: "{{ lookup('env', 'KAYOBE_ENVIRONMENT') }}"
|
|
|
|
# Path to Kayobe configuration directory on Ansible control host with an
|
|
# environment path appended if kayobe_environment is set.
|
|
kayobe_env_config_path: "{{ kayobe_config_path ~ ('/environments/' ~ kayobe_environment if kayobe_environment else '') }}"
|
|
|
|
###############################################################################
|
|
# Remote path configuration (seed, seed-hypervisor and overcloud hosts).
|
|
|
|
# Base path for kayobe state on remote hosts.
|
|
base_path: "/opt/kayobe"
|
|
|
|
# Path in which to store configuration on remote hosts.
|
|
config_path: "{{ base_path ~ '/etc' }}"
|
|
|
|
# Path in which to cache downloaded images on remote hosts.
|
|
image_cache_path: "{{ base_path ~ '/images' }}"
|
|
|
|
# Path on which to checkout source code repositories on remote hosts.
|
|
source_checkout_path: "{{ base_path ~ '/src' }}"
|
|
|
|
# Path on which to create python virtualenvs on remote hosts.
|
|
virtualenv_path: "{{ base_path ~ '/venvs' }}"
|
|
|
|
###############################################################################
|
|
# User configuration.
|
|
|
|
# User with which to access remote hosts. This user will be created if it does
|
|
# not exist.
|
|
kayobe_ansible_user: "stack"
|
|
|
|
###############################################################################
|
|
# OS distribution.
|
|
|
|
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
|
|
# is "centos".
|
|
os_distribution: "centos"
|
|
|
|
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
|
|
# "8" when os_distribution is "rocky", or "jammy" when os_distribution is
|
|
# "ubuntu".
|
|
os_release: >-
|
|
{{ '8-stream' if os_distribution == 'centos'
|
|
else '8' if os_distribution == 'rocky'
|
|
else 'jammy' }}
|
|
|
|
###############################################################################
|
|
# Ansible configuration.
|
|
|
|
# Filter to apply to the setup module when gathering facts. Default is to not
|
|
# specify a filter.
|
|
kayobe_ansible_setup_filter: "{{ omit }}"
|
|
|
|
# Gather subset to apply to the setup module when gathering facts. Default is
|
|
# to not specify a gather subset.
|
|
kayobe_ansible_setup_gather_subset: "{{ omit }}"
|