Update to 2023-07-11 23:00

This commit is contained in:
Daniel Berteaud 2023-07-11 23:00:07 +02:00
parent b654733854
commit 971632bb70
2 changed files with 7 additions and 8 deletions

View File

@ -18,16 +18,16 @@
- copy: content={{ vault_agent_approle_role_id }} dest={{ vault_agent_root_dir }}/auth/role_id owner=root group=root mode=600 - copy: content={{ vault_agent_approle_role_id }} dest={{ vault_agent_root_dir }}/auth/role_id owner=root group=root mode=600
- copy: content={{ vault_agent_approle_secret_id }} dest={{ vault_agent_root_dir }}/auth/secret_id owner=root group=root mode=600 - copy: content={{ vault_agent_approle_secret_id }} dest={{ vault_agent_root_dir }}/auth/secret_id owner=root group=root mode=600
- file: path={{ vault_agent_root_dir }}/auth/token state=absent - file: path={{ vault_agent_root_dir }}/auth/token state=absent
when: when: vault_agent_auth == 'approle'
- vault_agent_auth == 'approle' notify: restart vault-agent
tags: nomad tags: vault,consul,nomad
- name: Setup Token auth - name: Setup Token auth
block: block:
- copy: content={{ vault_agent_token }} dest={{ vault_agent_root_dir }}/auth/token owner=root group=root mode=640 - copy: content={{ vault_agent_token }} dest={{ vault_agent_root_dir }}/auth/token owner=root group=root mode=640
- file: path={{ vault_agent_root_dir }}/auth/role_id state=absent - file: path={{ vault_agent_root_dir }}/auth/role_id state=absent
- file: path={{ vault_agent_root_dir }}/auth/secret_id state=absent - file: path={{ vault_agent_root_dir }}/auth/secret_id state=absent
when: when: vault_agent_auth == 'token'
- vault_agent_auth == 'token' notify: restart vault-agent
tags: nomad tags: vault,consul,nomad

View File

@ -7,8 +7,7 @@
[[ .CA | writeToFile "{{ consul_conf.tls.defaults.cert_file }}" "" "" "0644" "append,newline" ]] [[ .CA | writeToFile "{{ consul_conf.tls.defaults.cert_file }}" "" "" "0644" "append,newline" ]]
[[ .Key | writeToFile "{{ consul_conf.tls.defaults.key_file }}" "root" "{{ consul_user }}" "0640" ]] [[ .Key | writeToFile "{{ consul_conf.tls.defaults.key_file }}" "root" "{{ consul_user }}" "0640" ]]
[[ end ]] [[ end ]]
{% else %} {% endif %}
[[ with secret "{{ vault_agent_consul.consul_pki.path }}/cert/ca_chain" ]] [[ with secret "{{ vault_agent_consul.consul_pki.path }}/cert/ca_chain" ]]
[[ .Data.certificate | writeToFile "{{ consul_conf.tls.defaults.ca_file }}" "root" "{{ consul_user }}" "0644" ]] [[ .Data.certificate | writeToFile "{{ consul_conf.tls.defaults.ca_file }}" "root" "{{ consul_user }}" "0644" ]]
[[ end ]] [[ end ]]
{% endif %}