acm_certificate
Upload and delete certificates in the AWS Certificate Manager service
Collection: community.aws
Full Name: community.aws.acm_certificate
Synopsis
Upload and delete certificates in the AWS Certificate Manager service
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| certificate | str | |||
| certificate_arn | str | |||
| certificate_chain | str | |||
| debug_botocore_endpoint_logs | bool | false | ||
| domain_name | str | |||
| endpoint_url | str | |||
| name_tag | str | |||
| private_key | str | |||
| profile | str | |||
| purge_tags | bool | true | ||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| tags | dict | |||
| validate_certs | bool | true |
Example
yaml
- name: upload a self-signed certificate
community.aws.acm_certificate:
certificate: "{{ lookup('file', 'cert.pem' ) }}"
privateKey: "{{ lookup('file', 'key.pem' ) }}"
name_tag: my_cert # to be applied through an AWS tag as "Name":"my_cert"
region: ap-southeast-2 # AWS region
- name: create/update a certificate with a chain
community.aws.acm_certificate:
certificate: "{{ lookup('file', 'cert.pem' ) }}"
private_key: "{{ lookup('file', 'key.pem' ) }}"
name_tag: my_cert
certificate_chain: "{{ lookup('file', 'chain.pem' ) }}"
state: present
region: ap-southeast-2
register: cert_create
- name: delete the cert we just created
community.aws.acm_certificate:
name_tag: my_cert
state: absent
region: ap-southeast-2
- name: delete a certificate with a particular ARN
community.aws.acm_certificate:
certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/01234567-abcd-abcd-abcd-012345678901"
state: absent
region: ap-southeast-2
- name: delete all certificates with a particular domain name
community.aws.acm_certificate:
domain_name: acm.ansible.com
state: absent
region: ap-southeast-2
- name: add tags to an existing certificate with a particular ARN
community.aws.acm_certificate:
certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/01234567-abcd-abcd-abcd-012345678901"
tags:
Name: my_certificate
Application: search
Environment: development
purge_tags: true