Skip to content

Commit

Permalink
Move setup to test specific setup
Browse files Browse the repository at this point in the history
Moves the setup for vault_kv2_delete into a test specific setup instead of the general setup.
  • Loading branch information
idwagner committed Oct 6, 2022
1 parent 6db80c8 commit 6c0c2d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@
vault_ci_token_create:
policies: [test-policy]
register: user_token_cmd

- name: Configuration tasks
module_defaults:
vault_ci_kv2_destroy_all: '{{ vault_plugins_module_defaults_common }}'
vault_ci_kv_put: '{{ vault_plugins_module_defaults_common }}'
block:

- name: Remove existing multi-version secret
vault_ci_kv2_destroy_all:
mount_point: '{{ vault_kv2_mount_point }}'
path: '{{ vault_kv2_versioned_path }}/secret6'

- name: Set up a multi versioned secret for delete (v2)
vault_ci_kv_put:
version: 2
mount_point: '{{ vault_kv2_mount_point }}'
path: '{{ vault_kv2_versioned_path }}/secret6'
secret:
v: value{{item}}
loop: ["1", "2", "3", "4", "5"]
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@
a: two
v: 2

- name: Set up a multi versioned secret for delete (v2)
vault_ci_kv_put:
version: 2
mount_point: '{{ vault_kv2_mount_point }}'
path: '{{ vault_kv2_versioned_path }}/secret6'
secret:
v: value{{item}}
loop: ["1", "2", "3", "4", "5"]

- name: 'Write Canary'
vault_ci_write:
path: '{{ vault_configure_canary.path }}'
Expand Down

0 comments on commit 6c0c2d6

Please sign in to comment.