Merge pull request #2 from blbradley/archive-extracted
download and extract Vault using archive.extracted
This commit is contained in:
commit
213d512994
2 changed files with 9 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
||||||
vault:
|
vault:
|
||||||
vault_version: 0.7.0
|
vault_version: 0.7.0
|
||||||
|
source_hash: c6d97220e75335f75bd6f603bb23f1f16fe8e2a9d850ba59599b1a0e4d067aaa
|
||||||
listen_protocol: tcp
|
listen_protocol: tcp
|
||||||
listen_port: 8200
|
listen_port: 8200
|
||||||
listen_address: 0.0.0.0
|
listen_address: 0.0.0.0
|
||||||
|
|
|
@ -1,18 +1,8 @@
|
||||||
vault packages:
|
{%- set version = salt.pillar.get('vault:vault_version', '0.7.0') %}
|
||||||
pkg.installed:
|
{%- set source_hash = salt.pillar.get('vault:source_hash', 'c6d97220e75335f75bd6f603bb23f1f16fe8e2a9d850ba59599b1a0e4d067aaa') %}
|
||||||
- names:
|
install Vault:
|
||||||
- unzip
|
archive.extracted:
|
||||||
- curl
|
- name: /usr/local/bin
|
||||||
|
- source: https://releases.hashicorp.com/vault/{{ version }}/vault_{{ version }}_linux_amd64.zip
|
||||||
download vault:
|
- source_hash: {{ source_hash }}
|
||||||
cmd.run:
|
- enforce_toplevel: False
|
||||||
- name: curl --silent -L https://releases.hashicorp.com/vault/{{ pillar['vault']['vault_version'] }}/vault_{{ pillar['vault']['vault_version'] }}_linux_amd64.zip -o /tmp/vault.zip
|
|
||||||
- unless: test -e /tmp/vault.zip
|
|
||||||
|
|
||||||
install vault:
|
|
||||||
cmd.run:
|
|
||||||
- name: unzip /tmp/vault.zip -d /usr/local/bin && chmod 0755 /usr/local/bin/vault && chown root:root /usr/local/bin/vault
|
|
||||||
- require:
|
|
||||||
- cmd: download vault
|
|
||||||
- pkg: unzip
|
|
||||||
- unless: test -e /usr/local/bin/vault
|
|
||||||
|
|
Loading…
Reference in a new issue