From 23d2a31c176a7f808052c5d492732b95457884cd Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Sat, 22 Oct 2016 12:13:34 -0400 Subject: [PATCH] download once/copy many, docs updates --- CHANGELOG.md | 6 ++++++ README.md | 8 ++++---- tasks/CentOS.yml | 23 ++++++++++++++++++----- tasks/Debian.yml | 19 ++++++++++++++++--- tasks/RedHat.yml | 23 ++++++++++++++++++----- tasks/Ubuntu.yml | 19 ++++++++++++++++--- vars/main.yml | 40 ---------------------------------------- version.txt | 2 +- 8 files changed, 79 insertions(+), 61 deletions(-) delete mode 100644 vars/main.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index a8bde4b0..ae74ba42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,3 +16,9 @@ - Move all vars to defaults - Documentation updates + +# v1.0.4 + +- Correct URL in docs +- Remove vars dir +- Enable download once / copy many install diff --git a/README.md b/README.md index 1daed4c8..93aee38a 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/brianshumate/ansible-vault.svg)](http://isitmaintained.com/project/brianshumate/ansible-vault "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/brianshumate/ansible-vault.svg)](http://isitmaintained.com/project/brianshumate/ansible-vault "Percentage of issues still open") -This Ansible role performs a basic [Vault](https://vault.io/) installation, -including filesystem structure and example configuration. +This Ansible role performs a basic [Vault](https://vaultproject.io/) +installation, including filesystem structure and example configuration. -It can also bootstrap a minimal development or evaluation server in a -Vagrant and VirtualBox based environment. See +It can also bootstrap a minimal development or evaluation server or HA +Consul-backed cluster in a Vagrant and VirtualBox based environment. See [README_VAGRANT.md](https://github.com/brianshumate/ansible-vault/blob/master/examples/README_VAGRANT.md) and the associated [Vagrantfile](https://github.com/brianshumate/ansible-vault/blob/master/examples/Vagrantfile) for more details about the developer mode setup. ## Requirements diff --git a/tasks/CentOS.yml b/tasks/CentOS.yml index c3497391..0d84d75b 100644 --- a/tasks/CentOS.yml +++ b/tasks/CentOS.yml @@ -9,14 +9,27 @@ with_items: "{{ vault_centos_os_packages }}" tags: installation -- name: Download Vault - get_url: "url={{ vault_zip_url }} dest=/tmp/{{ vault_centos_pkg }} sha256sum={{ vault_centos_sha256 }} timeout=74" +- name: Download vault + become: no + connection: local + get_url: "url={{ vault_zip_url }} dest={{ role_path }}/files/{{ vault_centos_pkg }} sha256sum={{ vault_zip_sha256 }} timeout=74" + run_once: true tags: installation -- name: Install Vault - unarchive: "copy=no creates=/usr/local/bin/vault src=/tmp/{{ vault_centos_pkg }} dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" +- name: Unarchive vault + become: no + connection: local + unarchive: "src={{ role_path }}/files/{{ vault_centos_pkg }} dest={{ role_path }}/files/ creates={{ role_path }}/files/vault" + run_once: true + tags: installation + +- name: Install vault + copy: "src={{ role_path }}/files/vault dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" tags: installation - name: Cleanup - file: path=/tmp/"{{ vault_centos_pkg }}" state=absent + become: no + connection: local + file: "dest={{ role_path }}/files/vault* state=absent" + run_once: true tags: installation diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 63eee0af..689f3414 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -10,13 +10,26 @@ tags: installation - name: Download Vault - get_url: "url={{ vault_zip_url }} dest=/tmp/{{ vault_debian_pkg }} sha256sum={{ vault_debian_sha256 }} timeout=74 validate_certs=False" + become: no + connection: local + get_url: "url={{ Vault_zip_url }} dest={{ role_path }}/files/{{ Vault_debian_pkg }} sha256sum={{ Vault_zip_sha256 }} timeout=74" + run_once: true + tags: installation + +- name: Unarchive Vault + become: no + connection: local + unarchive: "src={{ role_path }}/files/{{ Vault_debian_pkg }} dest={{ role_path }}/files/ creates={{ role_path }}/files/Vault" + run_once: true tags: installation - name: Install Vault - unarchive: "copy=no creates=/usr/local/bin/vault src=/tmp/{{ vault_debian_pkg }} dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" + copy: "src={{ role_path }}/files/Vault dest=/usr/local/bin/ owner={{ Vault_user }} group={{ Vault_group }} mode=0755" tags: installation - name: Cleanup - file: path=/tmp/"{{ vault_debian_pkg }}" state=absent + become: no + connection: local + file: "dest={{ role_path }}/files/Vault* state=absent" + run_once: true tags: installation diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index b9303997..679a39d7 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -14,14 +14,27 @@ when: "vault_dnsmasq == true" tags: installation -- name: Download Vault - get_url: "url={{ vault_zip_url }} dest=/tmp/{{ vault_redhat_pkg }} sha256sum={{ vault_redhat_sha256 }} timeout=74" +- name: Download vault + become: no + connection: local + get_url: "url={{ vault_zip_url }} dest={{ role_path }}/files/{{ vault_centos_pkg }} sha256sum={{ vault_zip_sha256 }} timeout=74" + run_once: true tags: installation -- name: Install Vault - unarchive: "copy=no creates=/usr/loca/bin/vault src=/tmp/{{ vault_redhat_pkg }} dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" +- name: Unarchive vault + become: no + connection: local + unarchive: "src={{ role_path }}/files/{{ vault_centos_pkg }} dest={{ role_path }}/files/ creates={{ role_path }}/files/vault" + run_once: true + tags: installation + +- name: Install vault + copy: "src={{ role_path }}/files/vault dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" tags: installation - name: Cleanup - file: path=/tmp/"{{ vault_redhat_pkg }}" state=absent + become: no + connection: local + file: "dest={{ role_path }}/files/vault* state=absent" + run_once: true tags: installation diff --git a/tasks/Ubuntu.yml b/tasks/Ubuntu.yml index d4d2fac1..b11e7144 100644 --- a/tasks/Ubuntu.yml +++ b/tasks/Ubuntu.yml @@ -15,13 +15,26 @@ tags: installation - name: Download Vault - get_url: "url={{ vault_zip_url }} dest=/tmp/{{ vault_ubuntu_pkg }} sha256sum={{ vault_ubuntu_sha256 }} timeout=74" + become: no + connection: local + get_url: "url={{ Vault_zip_url }} dest={{ role_path }}/files/{{ Vault_debian_pkg }} sha256sum={{ Vault_zip_sha256 }} timeout=74" + run_once: true + tags: installation + +- name: Unarchive Vault + become: no + connection: local + unarchive: "src={{ role_path }}/files/{{ Vault_debian_pkg }} dest={{ role_path }}/files/ creates={{ role_path }}/files/Vault" + run_once: true tags: installation - name: Install Vault - unarchive: "copy=no creates=/usr/local/bin/vault src=/tmp/{{ vault_ubuntu_pkg }} dest=/usr/local/bin/ owner={{ vault_user }} group={{ vault_group }} mode=0755" + copy: "src={{ role_path }}/files/Vault dest=/usr/local/bin/ owner={{ Vault_user }} group={{ Vault_group }} mode=0755" tags: installation - name: Cleanup - file: path=/tmp/"{{ vault_ubuntu_pkg }}" state=absent + become: no + connection: local + file: "dest={{ role_path }}/files/Vault* state=absent" + run_once: true tags: installation diff --git a/vars/main.yml b/vars/main.yml deleted file mode 100644 index 58597295..00000000 --- a/vars/main.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# vars file for vault - -# CentOS vars -vault_centos_pkg: "{{ vault_version }}_linux_amd64.zip" -vault_centos_url: "{{ vault_zip_url }}" -vault_centos_sha256: "{{ vault_zip_sha256 }}" - -vault_centos_os_packages: - - libselinux-python - - git - - unzip - -# Debian vars -vault_debian_pkg: "{{ vault_version }}_linux_amd64.zip" -vault_debian_url: "{{ vault_zip_url }}" -vault_debian_sha256: "{{ vault_zip_sha256 }}" - -vault_debian_os_packages: - - git - - unzip - -# Red Hat vars -vault_redhat_pkg: "{{ vault_version }}_linux_amd64.zip" -vault_redhat_url: "{{ vault_zip_url }}" -vault_redhat_sha256: "{{ vault_zip_sha256 }}" - -vault_redhat_os_packages: - - libselinux-python - - git - - unzip - -# Ubuntu vars -vault_ubuntu_pkg: "{{ vault_version }}_linux_amd64.zip" -vault_ubuntu_url: "{{ vault_zip_url }}" -vault_ubuntu_sha256: "{{ vault_zip_sha256 }}" - -vault_ubuntu_os_packages: - - git - - unzip diff --git a/version.txt b/version.txt index e946d6bb..3e7bcf08 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.0.3 +v1.0.4