Skip to content

Commit

Permalink
Get caller identify information during specific scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
ovlords committed May 31, 2024
1 parent 4c8fe7b commit 8268877
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions provisioners/ansible/playbooks/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
aws_caller_info:
region: "{{ aws.region }}"
register: caller_info
when: docker.repository.find('amazonaws.com') != -1

- name: Login to repository for AWS ECR for pushing the Docker image
shell: "aws ecr get-login-password --region {{ aws.region }} | docker login --username AWS --password-stdin {{ caller_info.account }}.dkr.ecr.{{ aws.region }}.amazonaws.com"
Expand Down

0 comments on commit 8268877

Please sign in to comment.