forked from saltbox/states
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
810 B
27 lines
810 B
--- |
|
|
|
{% set ca_path = salt.pillar.get("consul:config:ca_path", "/etc/pki/consul/ca") %} |
|
{% set pki_dir = salt.file.dirname(ca_path) %} |
|
|
|
{{ pki_dir }}: |
|
file.directory: |
|
- user: {{ salt.pillar.get("consul:user", "root") }} |
|
- group: {{ salt.pillar.get("consul:group", "root") }} |
|
- dir_mode: 0750 |
|
- file_mode: 0660 |
|
- makedirs: true |
|
|
|
{{ ca_path }}: |
|
file.directory: |
|
- user: {{ salt.pillar.get("consul:user", "root") }} |
|
- group: {{ salt.pillar.get("consul:group", "root") }} |
|
- dir_mode: 0750 |
|
- file_mode: 0660 |
|
- makedirs: true |
|
|
|
{{ ca_path | path_join("certificate.pem") }}: |
|
file.managed: |
|
- user: {{ salt.pillar.get("consul:user", "root") }} |
|
- group: {{ salt.pillar.get("consul:group", "root") }} |
|
- mode: 0660 |
|
- contents_pillar: "consul:tls:ca:certificate"
|
|
|