kayobe/ansible/kolla-bifrost.yml
Pierre Riteau 1419636930 Support multiple environments from a single configuration
Change-Id: I848d834aa36943027c126e26e93e4a4680521144
Story: 2002009
Task: 40037
2021-03-31 17:01:35 +02:00

33 lines
1.2 KiB
YAML

---
- name: Ensure Kolla Bifrost is configured
hosts: localhost
tags:
- kolla-bifrost
vars:
kolla_bifrost_extra_globals_path: "{{ kayobe_env_config_path ~ '/kolla/config/bifrost/bifrost.yml' }}"
pre_tasks:
- name: Check whether a Kolla Bifrost extra globals configuration file exists
stat:
path: "{{ kolla_bifrost_extra_globals_path }}"
get_checksum: False
get_md5: False
mime: False
register: globals_stat
- name: Read the Kolla Bifrost extra globals configuration file
set_fact:
kolla_bifrost_extra_globals: "{{ lookup('template', kolla_bifrost_extra_globals_path) | from_yaml }}"
when: globals_stat.stat.exists
roles:
- role: kolla-bifrost
# Network configuration.
kolla_bifrost_dhcp_pool_start: "{{ provision_oc_net_name | net_inspection_allocation_pool_start }}"
kolla_bifrost_dhcp_pool_end: "{{ provision_oc_net_name | net_inspection_allocation_pool_end }}"
kolla_bifrost_dnsmasq_router: "{{ provision_oc_net_name | net_gateway }}"
kolla_bifrost_dnsmasq_dns_servers: "{{ resolv_nameservers | default([]) }}"
kolla_bifrost_domain: "{{ resolv_domain | default }}"
kolla_bifrost_download_ipa: "{{ not ipa_build_images | bool }}"