summaryrefslogtreecommitdiff
path: root/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml
diff options
context:
space:
mode:
authorPilou <pierre-louis@libregerbil.fr>2018-09-13 20:13:57 +0200
committerJohn R Barker <john@johnrbarker.com>2018-09-13 19:13:57 +0100
commit9984c0fd4056d10c225439e79c31754c8d896ea4 (patch)
tree3f79c815eaf54a0613de01fcb4d04a17e05a16a6 /test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml
parentafea00fa9fe3e5a04b17e4016e61b9399d4a1a50 (diff)
downloadansible-9984c0fd4056d10c225439e79c31754c8d896ea4.tar.gz
hashi_vault lookup: add integration tests (#44814)
* hashi_vault lookup: add integration tests * hashi_vault lookup tests: use ansible-ci-files
Diffstat (limited to 'test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml')
-rw-r--r--test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml b/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml
new file mode 100644
index 0000000000..49c250462f
--- /dev/null
+++ b/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml
@@ -0,0 +1,19 @@
+- hosts: testhost
+ tasks:
+ - name: Install openssl
+ import_role:
+ name: setup_openssl
+
+ - name: "RedHat <= 7, select last version compatible with request 2.6.0 (this version doesn't support approle auth)"
+ set_fact:
+ hvac_package: 'hvac==0.2.5'
+ when: ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('7', '<=')
+
+ - name: 'CentOS < 7, select last version compatible with Python 2.6'
+ set_fact:
+ hvac_package: 'hvac==0.5.0'
+ when: ansible_distribution == 'CentOS' and ansible_distribution_major_version is version('7', '<')
+
+ - name: 'Install hvac Python package'
+ pip:
+ name: "{{ hvac_package|default('hvac') }}"