2017-02-08 21:41:36 +00:00
|
|
|
---
|
2018-05-11 16:11:38 +00:00
|
|
|
- name: cluster/configure | Ensure the vault directories exist
|
2017-02-08 21:41:36 +00:00
|
|
|
file:
|
2018-05-11 16:11:38 +00:00
|
|
|
dest: "{{ item }}"
|
|
|
|
owner: vault
|
2017-02-08 21:41:36 +00:00
|
|
|
mode: 0750
|
|
|
|
state: directory
|
2018-05-11 16:11:38 +00:00
|
|
|
recurse: true
|
|
|
|
with_items:
|
|
|
|
- "{{ vault_base_dir }}"
|
|
|
|
- "{{ vault_cert_dir }}"
|
|
|
|
- "{{ vault_config_dir }}"
|
|
|
|
- "{{ vault_roles_dir }}"
|
|
|
|
- "{{ vault_secrets_dir }}"
|
|
|
|
- "{{ vault_log_dir }}"
|
|
|
|
- "{{ vault_lib_dir }}"
|
2017-02-08 21:41:36 +00:00
|
|
|
|
|
|
|
- name: cluster/configure | Lay down the configuration file
|
|
|
|
copy:
|
|
|
|
content: "{{ vault_config | to_nice_json(indent=4) }}"
|
|
|
|
dest: "{{ vault_config_dir }}/config.json"
|
|
|
|
mode: 0640
|
|
|
|
register: vault_config_change
|