mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2022-09-13 17:00
This commit is contained in:
@@ -100,26 +100,14 @@
|
||||
when: consul_vault_secrets.pki.enabled or consul_vault_secrets.tokens.enabled
|
||||
tags: consul
|
||||
|
||||
- name: Deploy consul-template agent cert template
|
||||
template: src=agent_cert.tpl.j2 dest={{ consul_root_dir }}/consul-template/{{ item.where }} owner=root group=root
|
||||
loop:
|
||||
- what: certificate
|
||||
where: agent.crt.tpl
|
||||
- what: private_key
|
||||
where: agent.key.tpl
|
||||
- what: issuing_ca
|
||||
where: ca.crt.tpl
|
||||
- name: Deploy agent bundle template
|
||||
template: src=agent_bundle.pem.tpl.j2 dest={{ consul_root_dir }}/consul-template/agent_bundle.pem.tpl owner=root group=root
|
||||
notify: restart consul-template-consul
|
||||
when: consul_vault_secrets.pki.enabled
|
||||
tags: consul
|
||||
|
||||
- name: Deploy consul-template cli cert template
|
||||
template: src=cli_cert.tpl.j2 dest={{ consul_root_dir }}/consul-template/{{ item.where }} owner=root group=root
|
||||
loop:
|
||||
- what: certificate
|
||||
where: cli.crt.tpl
|
||||
- what: private_key
|
||||
where: cli.key.tpl
|
||||
- name: Deploy consul-template cli bundle template
|
||||
template: src=cli_bundle.pem.tpl.j2 dest={{ consul_root_dir }}/consul-template/cli_bundle.pem.tpl owner=root group=root
|
||||
notify: restart consul-template-consul
|
||||
when: consul_vault_secrets.pki.enabled and consul_conf.server
|
||||
tags: consul
|
||||
@@ -132,10 +120,11 @@
|
||||
|
||||
- name: Set ACL on the TLS dir
|
||||
shell: |
|
||||
setfacl -R -b -x {{ consul_root_dir }}/tls
|
||||
setfacl -R -b -k {{ consul_root_dir }}/tls
|
||||
{% if consul_admin_groups | length > 0 %}
|
||||
setfacl -R -m {% for group in consul_admin_groups %}g:{{ group }}:rX{{ ',' if not loop.last }}{% endfor %} {{ consul_root_dir }}/tls
|
||||
setfacl -R -m {% for group in consul_admin_groups %}d:g:{{ group }}:rX{{ ',' if not loop.last }}{% endfor %} {{ consul_root_dir }}/tls
|
||||
setfacl -m {% for group in consul_admin_groups %}g:{{ group }}:rx{{ ',' if not loop.last }}{% endfor %} {{ consul_root_dir }}/tls
|
||||
setfacl -m {% for group in consul_admin_groups %}d:g:{{ group }}:r{{ ',' if not loop.last }}{% endfor %} {{ consul_root_dir }}/tls
|
||||
setfacl -m {% for group in consul_admin_groups %}g:{{ group }}:r{{ ',' if not loop.last }}{% endfor %} {{ consul_root_dir }}/tls/*
|
||||
{% endif %}
|
||||
changed_when: False
|
||||
failed_when: False # Do not fail if eg, the FS doesn't support ACL
|
||||
|
Reference in New Issue
Block a user