ansible / ansible.builtin / v2.9.13 / 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.9.13) — module
pip
Install with pip install ansible==2.9.13
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. baseurl: default: https://api.digitalocean.com/v2 description: - DigitalOcean API base url. 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. 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. certificate_chain: description: - The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate.