2024-07-19 21:31:41 +00:00
|
|
|
---
|
2024-10-06 10:18:07 +00:00
|
|
|
# task/prerequisites file for vault
|
2024-07-19 21:31:41 +00:00
|
|
|
- name: "Vault | Create group {{ vault_group }}"
|
|
|
|
ansible.builtin.group:
|
|
|
|
name: "{{ vault_group }}"
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: "Vault | Create user {{ vault_user }}"
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: "{{ vault_user }}"
|
|
|
|
group: "{{ vault_group }}"
|
|
|
|
shell: /bin/false
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: "Vault | Create directory {{ vault_config_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ vault_config_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ vault_user }}"
|
|
|
|
group: "{{ vault_group }}"
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
- name: "Vault | Create directory {{ vault_data_dir}}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ vault_data_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ vault_user }}"
|
|
|
|
group: "{{ vault_group }}"
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
- name: "Vault | Create directory {{ vault_certs_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ vault_certs_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ vault_user }}"
|
|
|
|
group: "{{ vault_group }}"
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
- name: "Vault | Create directory {{ vault_logs_dir }}"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ vault_logs_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ vault_user }}"
|
|
|
|
group: "{{ vault_group }}"
|
|
|
|
mode: "0755"
|
|
|
|
when: vault_enable_log_to_file
|