Browse Source

PKI CA certs

tags/0.4
Ales Komarek 8 years ago
parent
commit
7a911e0f2f
1 changed files with 8 additions and 9 deletions
  1. +8
    -9
      salt/minion/cert.sls

+ 8
- 9
salt/minion/cert.sls View File

- days_remaining: 30 - days_remaining: 30
- backup: True - backup: True


{%- endfor %}

{#
/usr/local/share/ca-certificates:
file.directory: []
{%- for ca_path,ca_cert in salt['mine.get'](cert.host, 'x509.get_pem_entries')[cert.host].iteritems() %}


{%- for ca_path,ca in salt['mine.get']('ca', 'x509.get_pem_entries')['ca'].iteritems() %}
{%- if '/etc/pki/ca/'+cert.authority in ca_path %}


/usr/local/share/ca-certificates/{{ ca }}.crt:
/etc/pki/cert/{{ cert.authority }}/ca.crt:
x509.pem_managed: x509.pem_managed:
- text: {{ salt['mine.get']('ca', 'x509.get_pem_entries')['ca']['/etc/pki/ca.crt']|replace('\n', '') }}
- text: {{ ca_cert|replace('\n', '') }}

{%- endif %}

{%- endfor %}


{%- endfor %} {%- endfor %}
#}


{%- endif %} {%- endif %}

Loading…
Cancel
Save