File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
ansible/roles/deploy-ecs-proxies Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 6868 src : ' {{ item.src }}'
6969 dest : " {{ out_dir }}/{{ item.path }}"
7070 mode : ' {{ item.mode }}'
71+ vars :
72+ use_ecs_tag : " {{ lookup('env', 'TF_VAR_use_ecs_tag') | default('false') | bool }}"
7173 with_filetree : " {{ '../templates' }}"
7274 when : item.state == 'file'
7375
Original file line number Diff line number Diff line change @@ -46,17 +46,25 @@ locals {
4646ecs_service = [
4747{% for container in ecs_service % }
4848
49+ # DEBUG: print the boolean value Jinja sees
50+ {% if use_ecs_tag % }
51+ {% set _ = print (" DEBUG: use_ecs_tag = TRUE" ) % }
52+ {% else % }
53+ {% set _ = print (" DEBUG: use_ecs_tag = FALSE" ) % }
54+ {% endif % }
55+
4956 {% set image_tag = (
5057 '${local.account_id}.dkr.ecr.eu- west- 2 .amazonaws.com/ '
5158 + service_id + '_' + container.name
5259 + (
5360 " :ecs-" + build_label
54- if var . use_ecs_tag and container . name == " canary-api"
61+ if use_ecs_tag and container . name == " canary-api"
5562 else " :" + build_label
5663 )
5764 )
5865 % }
5966
67+
6068 {{
6169 (
6270 container
You can’t perform that action at this time.
0 commit comments