---
- name: Configuration tasks
  module_defaults:
    vault_ci_enable_engine: '{{ vault_plugins_module_defaults_common }}'
    vault_ci_read: '{{ vault_plugins_module_defaults_common }}'
    vault_ci_write: '{{ vault_plugins_module_defaults_common }}'
    vault_ci_policy_put: '{{ vault_plugins_module_defaults_common }}'
    vault_ci_token_create: '{{ vault_plugins_module_defaults_common }}'
  block:
    - name: Canary for Vault Database engine setup
      vault_ci_read:
        path: '{{ vault_configure_engine_database_canary.path }}'
      register: canary

    - name: Configure Vault Database engine basic setup
      include_tasks: configure.yml
      when: canary.result is none
