diff options
author | Thedro Neely <thedroneely@gmail.com> | 2020-03-14 04:01:46 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2020-03-14 04:01:46 -0400 |
commit | f92c43c7e3e7540a72092a2870c900aff9a9f40b (patch) | |
tree | 4eb4a0c0f572fb3436f36a9f202aae673f850d47 /roles/vault/main.yml | |
parent | 7b1e554263201d509a8821e2834d6bfca3dad315 (diff) | |
download | playbooks-f92c43c7e3e7540a72092a2870c900aff9a9f40b.tar.gz playbooks-f92c43c7e3e7540a72092a2870c900aff9a9f40b.tar.bz2 playbooks-f92c43c7e3e7540a72092a2870c900aff9a9f40b.zip |
roles/vault/main: Move variables to variables file
Diffstat (limited to 'roles/vault/main.yml')
-rw-r--r-- | roles/vault/main.yml | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/roles/vault/main.yml b/roles/vault/main.yml index 31649fc..cfe48ac 100644 --- a/roles/vault/main.yml +++ b/roles/vault/main.yml @@ -1,26 +1,25 @@ --- -# Target: alpine3.10 +# Target: alpine3.11 - name: Install Vault hosts: vault - vars: - username: vault - deploy_path: "/opt/{{ username }}" - version: 1.3.2 + + vars_files: + - ../variables.yml tasks: - name: Ensuring group exists group: - name: "{{ username }}" + name: "{{ vault_user }}" state: present - name: Creating user and making home directory user: system: yes state: present - name: "{{ username }}" - groups: "{{ username }}" - home: "{{ deploy_path }}" + name: "{{ vault_user }}" + groups: "{{ vault_user }}" + home: "{{ vault_home }}" - name: Installing the required dependencies apk: @@ -36,29 +35,29 @@ - name: Downloading and extracting application unarchive: - src: "https://releases.hashicorp.com/vault/{{ version }}/vault_{{ version }}_linux_amd64.zip" - dest: "{{ deploy_path }}" + src: "https://releases.hashicorp.com/vault/{{ vault_version }}/vault_{{ vault_version }}_linux_amd64.zip" + dest: "{{ vault_home }}" remote_src: yes - name: Creating data folder file: - path: "{{ deploy_path }}/data" + path: "{{ vault_home }}/data" state: directory mode: '0755' - name: Copying config file copy: src: config.json - dest: "{{ deploy_path }}" + dest: "{{ vault_home }}" mode: '0644' register: vaultConfig become: true - become_user: "{{ username }}" + become_user: "{{ vault_user }}" - name: Allowing application to call mlock capabilities: - path: "{{ deploy_path }}/vault" + path: "{{ vault_home }}/vault" capability: cap_ipc_lock=+ep state: present |