Skip to content

Instantly share code, notes, and snippets.

@cmattoon
Created September 10, 2019 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmattoon/a694f41607b4509a64b50a5fae05c567 to your computer and use it in GitHub Desktop.
Save cmattoon/a694f41607b4509a64b50a5fae05c567 to your computer and use it in GitHub Desktop.
Get ACM Certificate with Ansible
---
- 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