diff options
Diffstat (limited to 'test/integration/targets/lookup_unvault')
6 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/targets/lookup_unvault/aliases b/test/integration/targets/lookup_unvault/aliases new file mode 100644 index 0000000..8526691 --- /dev/null +++ b/test/integration/targets/lookup_unvault/aliases @@ -0,0 +1,2 @@ +shippable/posix/group4 +needs/root diff --git a/test/integration/targets/lookup_unvault/files/foot.txt b/test/integration/targets/lookup_unvault/files/foot.txt new file mode 100644 index 0000000..5716ca5 --- /dev/null +++ b/test/integration/targets/lookup_unvault/files/foot.txt @@ -0,0 +1 @@ +bar diff --git a/test/integration/targets/lookup_unvault/files/foot.txt.vault b/test/integration/targets/lookup_unvault/files/foot.txt.vault new file mode 100644 index 0000000..98ee41b --- /dev/null +++ b/test/integration/targets/lookup_unvault/files/foot.txt.vault @@ -0,0 +1,6 @@ +$ANSIBLE_VAULT;1.1;AES256 +35363932323438383333343462373431376162373631636238353061616565323630656464393939 +3937313630326662336264636662313163343832643239630a646436313833633135353834343364 +63363039663765363365626531643533616232333533383239323234393934356639373136323635 +3632356163343031300a373766636130626237346630653537633764663063313439666135623032 +6139 diff --git a/test/integration/targets/lookup_unvault/runme.sh b/test/integration/targets/lookup_unvault/runme.sh new file mode 100755 index 0000000..a7a0be5 --- /dev/null +++ b/test/integration/targets/lookup_unvault/runme.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -eux + +# run tests +ansible-playbook unvault.yml --vault-password-file='secret' -v "$@" diff --git a/test/integration/targets/lookup_unvault/secret b/test/integration/targets/lookup_unvault/secret new file mode 100644 index 0000000..f925edd --- /dev/null +++ b/test/integration/targets/lookup_unvault/secret @@ -0,0 +1 @@ +ssssshhhhhh diff --git a/test/integration/targets/lookup_unvault/unvault.yml b/test/integration/targets/lookup_unvault/unvault.yml new file mode 100644 index 0000000..f1f3b98 --- /dev/null +++ b/test/integration/targets/lookup_unvault/unvault.yml @@ -0,0 +1,9 @@ +- name: test vault lookup plugin + hosts: localhost + gather_facts: false + tasks: + - debug: msg={{lookup('unvault', 'foot.txt.vault')}} + - name: verify vault lookup works with both vaulted and unvaulted + assert: + that: + - lookup('unvault', 'foot.txt.vault') == lookup('unvault', 'foot.txt') |