-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathacme.sls
More file actions
33 lines (28 loc) · 824 Bytes
/
acme.sls
File metadata and controls
33 lines (28 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
acme_dependencies:
pkg.installed:
- pkgs:
- curl
- git
acme_git:
git.latest:
- name: https://github.com/Neilpang/acme.sh.git
- rev: 2.9.0 # TODO install a process to upgrade this on a regular basis
- target: /opt/acme.sh
- force_reset: True
- require:
- pkg: acme_dependencies
acme_install:
cmd.run:
- name: 'mkdir -p /var/lib/acme && cd /opt/acme.sh && ./acme.sh --install --nocron --home /var/lib/acme'
- onchanges:
- git: acme_git
# cronjob to update certs
acme_cert_cron:
cron.present:
- identifier: acme_cert_cron
- name: '/var/lib/acme/acme.sh --cron --home "/var/lib/acme" --reloadcmd "systemctl reload nginx" >> /var/log/acme.log 2>&1'
- minute: random
- hour: 3
- require:
- cmd: acme_install
# TODO acme logrotate