Created
September 10, 2019 14:38
-
-
Save cmattoon/a694f41607b4509a64b50a5fae05c567 to your computer and use it in GitHub Desktop.
Get ACM Certificate with Ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
tasks: | |
- name: Get ACM Certificates | |
shell: aws acm list-certificates --region=us-east-1 | |
register: acm | |
- name: Set ACM Certificate | |
set_fact: | |
acm_arn: "{{ item.CertificateArn }}" | |
when: item.DomainName == "{{ domain }}" | |
with_items: "{{ (acm.stdout | from_json).CertificateSummaryList }}" | |
- debug: msg="Using ACM Cert {{ acm_arn }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment