47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
|
---
|
||
|
# task/prerequisites file for hashicorp_vault
|
||
|
- 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
|