-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(planet): remove lego in favor of haproxy (#477)
* fix: remove lego from pythonplanet in favor of haproxy * chore: clean up unused server blocks
- Loading branch information
1 parent
37e194a
commit a91106b
Showing
2 changed files
with
0 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
include: | ||
- nginx | ||
- tls.lego | ||
|
||
git: | ||
pkg.installed | ||
|
@@ -33,30 +32,6 @@ planet-user: | |
- require: | ||
- pkg: consul-pkgs | ||
|
||
lego_bootstrap: | ||
cmd.run: | ||
- name: /usr/local/bin/lego -a --email="[email protected]" {% if pillar["dc"] == "vagrant" %}--server=https://salt-master.vagrant.psf.io:14000/dir{% endif %} --domains="{{ grains['fqdn'] }}" {%- for domain in pillar['planet']['subject_alternative_names'] %} --domains {{ domain }}{%- endfor %} --http --path /etc/lego --key-type ec256 run | ||
- creates: /etc/lego/certificates/{{ grains['fqdn'] }}.json | ||
lego_renew: | ||
cron.present: | ||
- name: sudo -u nginx /usr/local/bin/lego -a --email="[email protected]" {% if pillar["dc"] == "vagrant" %}--server=https://salt-master.vagrant.psf.io:14000/dir{% endif %} --domains="{{ grains['fqdn'] }}" {%- for domain in pillar['planet']['subject_alternative_names'] %} --domains {{ domain }}{%- endfor %} --http --http.webroot /etc/lego --path /etc/lego --key-type ec256 renew --days 30 && /usr/sbin/service nginx reload | ||
- identifier: roundup_lego_renew | ||
- hour: 0 | ||
- minute: random | ||
lego_config: | ||
file.managed: | ||
- name: /etc/nginx/conf.d/lego.conf | ||
- source: salt://tls/config/lego.conf.jinja | ||
- template: jinja | ||
- user: root | ||
- group: root | ||
- mode: "0644" | ||
- require: | ||
- sls: tls.lego | ||
- cmd: lego_bootstrap | ||
/srv/planet/: | ||
file.directory: | ||
- user: planet | ||
|