Skip to content

Commit

Permalink
Use local_action - fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshumate committed Apr 23, 2017
1 parent 95918ab commit 4950172
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,7 @@
## v1.5.1

- Fixed vault_tls_cert_file and vault_tls_key_file vars

## v1.5.2

- Switch to local actions (addresses #13)
54 changes: 27 additions & 27 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,57 @@

- name: Check Vault package checksum file
become: no
connection: local
stat:
path: "{{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
local_action:
stat:
path: "{{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
run_once: true
register: vault_checksum

- name: Get Vault package checksum file
become: no
connection: local
get_url:
url: "{{ vault_checksum_file_url }}"
dest: "{{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
local_action:
get_url:
url: "{{ vault_checksum_file_url }}"
dest: "{{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
run_once: true
tags: installation
when: vault_checksum.stat.exists == False

- name: Get Vault package checksum
become: no
connection: local
shell: "grep {{ vault_pkg }} {{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
local_action:
shell: "grep {{ vault_pkg }} {{ role_path }}/files/vault_{{ vault_version }}_SHA256SUMS"
run_once: true
register: vault_sha256
tags: installation

- name: Check Vault package file
become: no
connection: local
stat:
path: "{{ role_path }}/files/{{ vault_pkg }}"
local_action:
stat:
path: "{{ role_path }}/files/{{ vault_pkg }}"
run_once: true
register: vault_package

- name: Download Vault
become: no
connection: local
get_url:
url: "{{ vault_zip_url }}"
dest: "{{ role_path }}/files/{{ vault_pkg }}"
checksum: "sha256:{{ vault_sha256.stdout.split(' ')|first }}"
timeout: "42"
local_action:
get_url:
url: "{{ vault_zip_url }}"
dest: "{{ role_path }}/files/{{ vault_pkg }}"
checksum: "sha256:{{ vault_sha256.stdout.split(' ')|first }}"
timeout: "42"
run_once: true
tags: installation
when: vault_package.stat.exists == False

- name: Unarchive Vault
become: no
connection: local
unarchive:
src: "{{ role_path }}/files/{{ vault_pkg }}"
dest: "{{ role_path }}/files/"
creates: "{{ role_path }}/files/vault"
local_action:
unarchive:
src: "{{ role_path }}/files/{{ vault_pkg }}"
dest: "{{ role_path }}/files/"
creates: "{{ role_path }}/files/vault"
run_once: true
tags: installation

Expand All @@ -75,10 +75,10 @@

- name: Cleanup
become: no
connection: local
file:
path: "{{ item }}"
state: absent
local_action:
file:
path: "{{ item }}"
state: absent
with_fileglob: "{{ role_path }}/files/vault"
run_once: true
tags: installation
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.1
v1.5.2

0 comments on commit 4950172

Please sign in to comment.