fixed a few mistakes

This commit is contained in:
Bertrand Lanson 2023-04-17 23:20:12 +02:00
parent 6f69826b40
commit db8f25992f
4 changed files with 26 additions and 3 deletions

View File

@ -11,7 +11,7 @@ renew_vault_certificates_cert_dest: /opt/vault/tls/cert.pem
renew_vault_certificates_key_dest: /opt/vault/tls/key.pem
renew_vault_certificates_info:
issuer_path: pki/issue/your-issuer
common_name: openstack01.ednz.fr
common_name: vault01.example.com
ttl: 90d
include_localhost: true
include_consul_service: false

View File

@ -0,0 +1,15 @@
---
- name: Prepare
hosts: all
tasks:
- name: "Create group vault"
ansible.builtin.group:
name: "vault"
state: present
- name: "Create user vault"
ansible.builtin.user:
name: "vault"
group: "vault"
shell: /bin/false
state: present

View File

@ -5,7 +5,7 @@
- "systemctl-enable-vault-certs"
- "systemctl-restart-vault-certs"
block:
- name: "Copy vault_cert.pem.tpl template"
- name: "Copy vault_config.hcl template"
ansible.builtin.template:
src: vault_config.hcl.j2
dest: "{{ renew_vault_certificates_config_dir }}/vault_config.hcl"
@ -15,7 +15,7 @@
- name: "Copy vault_cert.pem.tpl template"
ansible.builtin.template:
src: vault_cert.tpl.j2
src: vault_cert.pem.tpl.j2
dest: "{{ renew_vault_certificates_config_dir }}/templates/vault_cert.pem.tpl"
owner: "{{ renew_vault_certificates_vault_user }}"
group: "{{ renew_vault_certificates_vault_group }}"

View File

@ -15,3 +15,11 @@
owner: "{{ renew_vault_certificates_vault_user }}"
group: "{{ renew_vault_certificates_vault_group }}"
mode: '0755'
- name: "Create directory {{ renew_vault_certificates_config_dir }}/templates"
ansible.builtin.file:
path: "{{ renew_vault_certificates_config_dir }}/templates"
state: directory
owner: "{{ renew_vault_certificates_vault_user }}"
group: "{{ renew_vault_certificates_vault_group }}"
mode: '0755'