File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
ansible/roles/build-ecs-proxies/tasks Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2828- name : create new repos
2929 command : " {{ aws_cmd }} ecr create-repository --repository-name {{ item }} --tags Key=api-service,Value={{ service_id }}"
3030 with_items : " {{ new_repos }}"
31- when : new_repos
31+ when : new_repos | length > 0
3232
3333- name : Read lifecycle policy file
3434 ansible.builtin.slurp :
3535 src : " {{ playbook_dir }}/ecr-lifecycle/ecr_lifecycle.json"
3636 register : desired_policy_raw
37- when : new_repos
37+ when : new_repos | length > 0
3838
3939- name : Decode lifecycle policy JSON
4040 set_fact :
4141 desired_policy_json : " {{ desired_policy_raw.content | b64decode | from_json }}"
42- when : new_repos
42+ when : new_repos | length > 0
4343
4444- name : Apply lifecycle policy to each new repo
4545 ansible.builtin.command : >
4949 with_items : " {{ new_repos }}"
5050 register : lifecycle_update
5151 ignore_errors : yes
52+ when : new_repos | length > 0
5253
5354- name : ecr login
5455 shell : " eval $({{ aws_cmd }} ecr get-login --no-include-email)"
You can’t perform that action at this time.
0 commit comments