Browse Source

docker: add pki deployment

master
Sean Johnson 3 years ago
parent
commit
9eb2d0e11e
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 9FA15B87469EA850
  1. 15
      app/docker/tls.sls

15
app/docker/tls.sls

@ -9,6 +9,10 @@
{% set ca_file = salt.pillar.get("docker:config:tlscacert") %}
{% set key_file = salt.pillar.get("docker:config:tlskey") %}
{% set cert_data = salt.pillar.get("docker:tls:cert") %}
{% set ca_data = salt.pillar.get("docker:tls:ca") %}
{% set key_data = salt.pillar.get("docker:tls:key") %}
{{ ssl_dir }}:
file.directory:
- user: root
@ -22,6 +26,9 @@
- group: docker
- mode: 0660
- onlyif: "test -f {{ cert_file }}"
{% if cert_data %}
- contents_pillar: "docker:tls:cert"
{% endif %}
{{ key_file }}:
file.managed:
@ -29,10 +36,16 @@
- group: docker
- mode: 0660
- onlyif: "test -f {{ key_file }}"
{% if key_data %}
- content_pillar: "docker:tls:key"
{% endif %}
{{ ca_file }}:
file.managed:
- user: root
- group: docker
- mode: 0660
- onlyif: "test -f {{ ca_file }}"
- onlyif: "test -f {{ ca_file }}"
{% if ca_data %}
- content_pillar: "docker:tls:ca"
{% endif %}
Loading…
Cancel
Save