Skip to content

Commit a2e5cfb

Browse files
jovialmarkgoddard
authored andcommitted
Make it possible to override automatic fluentd version detection
One use case for this is so that you can generate config in a CI job without access to the container repository. It also removes the dependency of having docker configured for config generation. TrivialFix Change-Id: I0d388851c8b953af0494e44ae569e7eb9e15c326 (cherry picked from commit 25c33f9)
1 parent d41e014 commit a2e5cfb

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

ansible/roles/common/tasks/config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
action: "ensure_image"
3434
common_options: "{{ docker_common_options }}"
3535
image: "{{ service.image }}"
36-
when: service | service_enabled_and_mapped_to_host
36+
when:
37+
- fluentd_version is not defined or fluentd_binary is not defined
38+
- service | service_enabled_and_mapped_to_host
3739

3840
- name: Fetch fluentd image labels
3941
vars:
@@ -43,12 +45,16 @@
4345
docker_image_info:
4446
name: "{{ service.image }}"
4547
register: fluentd_labels
46-
when: service | service_enabled_and_mapped_to_host
48+
when:
49+
- fluentd_version is not defined or fluentd_binary is not defined
50+
- service | service_enabled_and_mapped_to_host
4751

4852
- name: Set fluentd facts
4953
set_fact:
5054
fluentd_binary: "{{ fluentd_labels.images.0.ContainerConfig.Labels.fluentd_binary }}"
51-
when: common_services.fluentd | service_enabled_and_mapped_to_host
55+
when:
56+
- fluentd_binary is not defined
57+
- common_services.fluentd | service_enabled_and_mapped_to_host
5258

5359
- include_tasks: copy-certs.yml
5460
when:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Adds the ability to override the automatic detection of `fluentd_version`
5+
and `fluentd_binary`. These can now be defined as extra variables. This
6+
removes the dependency of having docker configured for config generation.

0 commit comments

Comments
 (0)