diff --git a/.kitchen.yml b/.kitchen.yml index b70ad56..aa52c30 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -50,8 +50,8 @@ suites: - vault vault.sls: vault: -# version: 0.11.1 # test upgrades by doing a double-converge, changing the version pillar between each one - version: 0.11.2 +# version: 1.0.3 # test upgrades by doing a double-converge, changing the version pillar between each one + version: 1.1.0 verify_download: False - name: dev_server diff --git a/vault/defaults.yaml b/vault/defaults.yaml index 6680566..7283c30 100644 --- a/vault/defaults.yaml +++ b/vault/defaults.yaml @@ -2,8 +2,7 @@ # vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent vault: - version: 1.1.0 - platform: linux_amd64 + version: 1.0.3 dev_mode: False verify_download: True self_signed_cert: diff --git a/vault/osfamilymap.yaml b/vault/osfamilymap.yaml index 63343a0..d15d7f4 100644 --- a/vault/osfamilymap.yaml +++ b/vault/osfamilymap.yaml @@ -2,7 +2,12 @@ # vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent RedHat: + platform: linux_amd64 gpg_pkg: gnupg2 Debian: gpg_pkg: gnupg2 + platform: linux_amd64 + +MacOS: + platform: darwin_amd64 diff --git a/vault/package/gpg/init.sls b/vault/package/gpg/init.sls index e5b7000..a1e6ef6 100644 --- a/vault/package/gpg/init.sls +++ b/vault/package/gpg/init.sls @@ -19,13 +19,6 @@ vault-package-gpg-cmd-run-import: - name: gpg --import /opt/vault/hashicorp.asc - unless: gpg --list-keys {{ vault.hashicorp_key_id }} -vault-package-gpg-file-managed-checksum: - file.managed: - - name: /opt/vault/{{ vault.version }}_SHA256SUMS - - source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS - - skip_verify: True - - makedirs: True - vault-package-gpg-file-managed-signature: file.managed: - name: /opt/vault/{{ vault.version }}_SHA256SUMS.sig @@ -37,5 +30,5 @@ vault-package-gpg-cmd-run-verify: cmd.run: - name: gpg --verify /opt/vault/{{ vault.version }}_SHA256SUMS.sig /opt/vault/{{ vault.version }}_SHA256SUMS - onchanges: - - file: vault-package-gpg-file-managed-checksum + - file: vault-package-install-file-managed - file: vault-package-gpg-file-managed-signature diff --git a/vault/package/install.sls b/vault/package/install.sls index ae2e420..f940580 100644 --- a/vault/package/install.sls +++ b/vault/package/install.sls @@ -20,13 +20,29 @@ vault-package-install-file-directory: - name: /opt/vault/bin - makedirs: True +vault-package-install-file-managed: + file.managed: + - name: /opt/vault/{{ vault.version }}_SHA256SUMS + - source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS + - skip_verify: True + - makedirs: True + +vault-package-install-service-dead: + service.dead: + - name: vault + - onchanges: + - file: vault-package-install-file-managed + vault-package-install-archive-extracted: archive.extracted: - name: /opt/vault/bin - source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_{{ vault.platform }}.zip - source_hash: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS - source_hash_name: vault_{{ vault.version }}_{{ vault.platform }}.zip - - enforce_toplevel: false + - enforce_toplevel: False + - overwrite: True + - onchanges: + - file: vault-package-install-file-managed vault-package-install-file-symlink: file.symlink: