Allow for jinja2 templating of docker_config

In support of the wider Multi-RHEL effort. We will
need to support templating to allow for Ansible to
determine which container needs to be pulled to
the hosts based on their OS version.

This change adds support for that templating of
the docker_config files.

Change-Id: Id56a4670507524f41fde238887fce4dd19e90a87
This commit is contained in:
Brendan Shephard 2022-07-08 00:02:41 +10:00
parent 4513cb5985
commit 3d40e77a66
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@
become: true
container_startup_config:
config_base_dir: /var/lib/tripleo-config/container-startup-config
config_data: "{{ lookup('file', (tripleo_role_name + '/docker_config.yaml'), errors='ignore') | default({}, True) | from_yaml }}"
config_data: "{{ lookup('template', (tripleo_role_name + '/docker_config.yaml'), errors='ignore') | default({}, True) | from_yaml }}"
tags:
- container_startup_configs

View File

@ -169,7 +169,7 @@ outputs:
delay: 5
loop_control:
loop_var: prefetch_image
loop: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default('{}', True) | from_yaml | recursive_get_key_from_dict(key='image') | unique }}"
loop: "{{ lookup('template', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default('{}', True) | from_yaml | recursive_get_key_from_dict(key='image') | unique }}"
- name: Manage tripleo container services
include_role: