---
- name: Configuration tasks
  module_defaults:
    vault_ci_token_create: '{{ vault_plugins_module_defaults_common }}'
  block:
    - name: Create a test non-root token
      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"]
