You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,18 @@
1
1
# Ansible Role: certkit_io.sync
2
2
3
-
An Ansible Role for Linux that installs a script which synchronizes SSL certificates managed by [Certkit.io](https://www.certkit.io/).
3
+
An Ansible Role for Linux that installs a script which synchronizes SSL certificates managed by [Certkit.io](https://www.certkit.io/). It is published on Ansible Galaxy [here](https://galaxy.ansible.com/ui/standalone/roles/certkit_io/sync/install/).
4
+
5
+
## Overview
6
+
7
+
* Installs a simple synchronization script to whichever directory you specify.
8
+
* Builds a configuration file from variables you give it.
9
+
* Once installed, the script:
10
+
* Syncs the latest certificate from CertKit into a local directory using [minio-client](https://docs.min.io/community/minio-object-store/reference/minio-mc.html#quickstart).
11
+
* Copies the certificate into place if it is changed or missing.
12
+
* Optionally runs a post-update command (e.g. `nginx -s reload`).
13
+
* Logs all activity to `certkit.log` (keeping last 2000 log lines)
14
+
* Is periodically run on a Cron schedule.
15
+
* To sync multiple certificates, call the role multiple times. See the [Syncing Multiple Certificates](#syncing-multiple-certificates) section.
4
16
5
17
## Requirements
6
18
@@ -21,7 +33,7 @@ All variables are listed below. They are all required, unless otherwise specifie
21
33
-`certkit_bucket`: The name of your certkit storage bucket. Get this from the Certkit UI.
22
34
-`certkit_access_key`: The access key for your certkit storage bucket. Get this from the Certkit UI.
23
35
-`certkit_secret_key`: The secret key for your certkit storage bucket. Get this from the Certkit UI.
24
-
-`certkit_common_name`: The domain name of the certificate. Prefix with * if it's a wildcard.
36
+
-`certkit_certificate_id`: The ID of the certificate to sync. Get this from the Certkit UI.
25
37
-`certkit_dir`: The directory where the certkit sync script and config file will be placed. Arbitrary, pick what you'd like. Should be unique if multiple certkit scripts are installed on the same box!
26
38
-`certkit_update_cmd`: Certkit sync runs this command whenever the certificates are updated. Use to inform the server of a new certificate.
27
39
-`certkit_pem_destination`: File path where Certkit sync will write the certificate PEM file. This is wherever your server software expects the certificate to live.
@@ -45,8 +57,8 @@ None.
45
57
certkit_access_key: YOUR_ACCESS_KEY
46
58
certkit_secret_key: YOUR_SECRET_KEY
47
59
48
-
#This is the common name/domain of the certificate. If it's wildcard, prefix with *.
49
-
certkit_common_name: "*.yourdomain.com"
60
+
#The ID of the certificate to sync. Get this from the Certkit UI.
61
+
certkit_certificate_id: ab12
50
62
51
63
# The directory where the certkit sync script and config file will be placed. Arbitrary, pick what you'd like.
52
64
# When syncing multiple certificates, each configuration should use a different directory.
@@ -64,10 +76,11 @@ None.
64
76
## Syncing Multiple Certificates
65
77
66
78
Sync more than one certificate by simply calling the role again. These variables will differ between each certificate:
Copy file name to clipboardExpand all lines: tasks/main.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
# certkit_bucket - The name of your certkit storage bucket. Get this from the Certkit UI.
11
11
# certkit_access_key - The access key for your certkit storage bucket. Get this from the Certkit UI.
12
12
# certkit_secret_key - The secret key for your certkit storage bucket. Get this from the Certkit UI.
13
-
#certkit_common_name - The domain name of the certificate. Prefix with * if it's a wildcard.
13
+
#certkit_certificate_id - The ID of the certificate to sync. Get this from the Certkit UI.
14
14
# certkit_dir - The directory where the certkit sync script and config file will be placed. Arbitrary, pick what you'd like. Should be unique if multiple certkit scripts are installed on the same box!
15
15
# certkit_update_cmd - Certkit sync runs this command whenever the certificates are updated. Use to inform the server of a new certificate.
16
16
# certkit_pem_destination - File path where Certkit sync will write the certificate PEM file. This is wherever your server software expects the certificate to live.
0 commit comments