Files
kayobe/ansible/inventory/group_vars/all/seed-vm
Mark Goddard af3b719b73 Move group_vars to an inventory directory
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
2022-09-08 10:11:23 +01:00

68 lines
2.0 KiB
Plaintext

---
###############################################################################
# Seed node VM configuration.
# Name of the seed VM.
seed_vm_name: "{{ inventory_hostname }}"
# Memory in MB.
seed_vm_memory_mb: "{{ 16 * 1024 }}"
# Number of vCPUs.
seed_vm_vcpus: 4
# List of volumes.
seed_vm_volumes:
- "{{ seed_vm_root_volume }}"
- "{{ seed_vm_data_volume }}"
# Root volume.
seed_vm_root_volume:
name: "{{ seed_vm_name }}-root"
pool: "{{ seed_vm_pool }}"
capacity: "{{ seed_vm_root_capacity }}"
format: "{{ seed_vm_root_format }}"
image: "{{ seed_vm_root_image }}"
# Data volume.
seed_vm_data_volume:
name: "{{ seed_vm_name }}-data"
pool: "{{ seed_vm_pool }}"
capacity: "{{ seed_vm_data_capacity }}"
format: "{{ seed_vm_data_format }}"
# Name of the storage pool for the seed VM volumes.
seed_vm_pool: default
# Capacity of the seed VM root volume.
seed_vm_root_capacity: 50G
# Format of the seed VM root volume.
seed_vm_root_format: qcow2
# Base image for the seed VM root volume. Default is
# "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu",
# https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2
# when os_distribution is "rocky",
# or
# "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2"
# otherwise.
seed_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %}
https://dl.rockylinux.org/pub/rocky/8/images/Rocky-8-GenericCloud.latest.x86_64.qcow2
{%- else -%}
https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20210603.0.x86_64.qcow2
{%- endif %}
# Capacity of the seed VM data volume.
seed_vm_data_capacity: 100G
# Format of the seed VM data volume.
seed_vm_data_format: qcow2
# List of network interfaces to attach to the seed VM.
seed_vm_interfaces: "{{ network_interfaces | sort | map('net_libvirt_vm_network') | list }}"