community / community.digitalocean / 1.3.0 / module / digital_ocean_certificate Manage certificates in DigitalOcean Authors: Abhijeet Kasurde (@Akasurde)community.digitalocean.digital_ocean_certificate (1.3.0) — module
Install with ansible-galaxy collection install community.digitalocean:==1.3.0
collections: - name: community.digitalocean version: 1.3.0
Create, Retrieve and remove certificates DigitalOcean.
- name: Create a certificate community.digitalocean.digital_ocean_certificate: name: production state: present private_key: "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkM8OI7pRpgyj1I\n-----END PRIVATE KEY-----" leaf_certificate: "-----BEGIN CERTIFICATE-----\nMIIFDmg2Iaw==\n-----END CERTIFICATE-----" oauth_token: b7d03a6947b217efb6f3ec3bd365652
- name: Create a certificate using file lookup plugin community.digitalocean.digital_ocean_certificate: name: production state: present private_key: "{{ lookup('file', 'test.key') }}" leaf_certificate: "{{ lookup('file', 'test.cert') }}" oauth_token: "{{ oauth_token }}"
- name: Create a certificate with trust chain community.digitalocean.digital_ocean_certificate: name: production state: present private_key: "{{ lookup('file', 'test.key') }}" leaf_certificate: "{{ lookup('file', 'test.cert') }}" certificate_chain: "{{ lookup('file', 'chain.cert') }}" oauth_token: "{{ oauth_token }}"
- name: Remove a certificate community.digitalocean.digital_ocean_certificate: name: production state: absent oauth_token: "{{ oauth_token }}"
name: description: - The name of the certificate. required: true type: str state: choices: - present - absent default: present description: - Whether the certificate should be present or absent. type: str timeout: default: 30 description: - The timeout in seconds used for polling DigitalOcean's API. type: int oauth_token: aliases: - api_token description: - DigitalOcean OAuth token. - There are several other environment variables which can be used to provide this value. - i.e., - 'DO_API_TOKEN', 'DO_API_KEY', 'DO_OAUTH_TOKEN' and 'OAUTH_TOKEN' type: str private_key: description: - A PEM-formatted private key content of SSL Certificate. type: str validate_certs: default: true description: - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool leaf_certificate: description: - A PEM-formatted public SSL Certificate. type: str certificate_chain: description: - The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate. type: str