Debian Codegraph @

ansible_collections/community/hashi_vault/tests/integration/targets/auth_token/tasks/main.yml

raw
1 ---
2 # task vars are not templated when used as vars, so we'll need to set_fact this evaluate the template
3 # see: https://github.com/ansible/ansible/issues/73268
4 - name: Persist defaults
5 set_fact:
6 '{{ item.key }}': "{{ lookup('vars', item.key) }}"
7 loop: "{{ lookup('file', role_path ~ '/defaults/main.yml') | from_yaml | dict2items }}"
8 loop_control:
9 label: '{{ item.key }}'
10
11 - name: Configuration tasks
12 module_defaults:
13 vault_ci_token_create: '{{ vault_plugins_module_defaults_common }}'
14 block:
15 - name: 'Create a test non-root token'
16 vault_ci_token_create:
17 policies: test-policy
18 register: user_token_cmd
19
20 - name: 'Create a test non-root token with no default policy'
21 vault_ci_token_create:
22 policies: test-policy
23 no_default_policy: true
24 register: user_token_no_default_policy_cmd
25
26 - import_tasks: token_test_target.yml
27 module_defaults:
28 assert:
29 quiet: true
30
31 - import_tasks: token_test_controller.yml
32 module_defaults:
33 assert:
34 quiet: true