kayobe/ansible/roles/kolla-build/tasks/main.yml
Mark Goddard 6c4f179b6e Add support for free-form configuration of kolla-build.conf
Provide extra configuration of kolla-build.conf via
$KAYOBE_CONFIG_PATH/kolla/kolla-build.conf.
2017-11-21 17:51:07 +00:00

24 lines
728 B
YAML

---
- name: Check whether a Kolla build extra configuration file exists
local_action:
module: stat
path: "{{ kolla_build_extra_config_path }}"
get_checksum: False
get_md5: False
mime: False
register: stat_result
- name: Set a fact containing extra configuration
set_fact:
kolla_build_extra_config: "{{ lookup('template', kolla_build_extra_config_path) }}"
when: stat_result.stat.exists
- name: Ensure the Kolla build configuration files exist
template:
src: "{{ item.src }}"
dest: "{{ kolla_build_config_path }}/{{ item.dest }}"
mode: 0644
with_items:
- { src: kolla-build.conf.j2, dest: kolla-build.conf }
- { src: template-override.j2.j2, dest: template-override.j2 }