ansible / ansible.builtin / v2.5.15 / module / digital_ocean_certificate Manage certificates in DigitalOcean. | "added in version" 2.5 of ansible.builtin" Authors: Abhijeet Kasurde (@akasurde) preview | supported by communityansible.builtin.digital_ocean_certificate (v2.5.15) — module
pip
Install with pip install ansible==2.5.15
Create, Retrieve and remove certificates DigitalOcean.
- name: create a certificate digital_ocean_certificate: name: production state: present private_key: "-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkM8OI7pRpgyj1I -----END PRIVATE KEY-----" leaf_certificate: "-----BEGIN CERTIFICATE----- MIIFDmg2Iaw== -----END CERTIFICATE-----" oauth_token: b7d03a6947b217efb6f3ec3bd365652
- name: create a certificate using file lookup plugin 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 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 digital_ocean_certificate: name: production state: absent oauth_token: "{{ oauth_token }}"
name: description: - The name of the certificate. required: true state: choices: - present - absent default: present description: - Whether the certificate should be present or absent. oauth_token: aliases: - DO_API_TOKEN - DO_API_KEY - DO_OAUTH_TOKEN description: - DigitalOcean OAuth token. required: true private_key: description: - A PEM-formatted private key content of SSL Certificate. leaf_certificate: description: - A PEM-formatted public SSL Certificate. certificate_chain: description: - The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate.