|
5 | 5 | hosts: github-runners,gitlab-runners |
6 | 6 | tasks: |
7 | 7 | - name: Set a fact about the virtualenv on the remote system |
8 | | - set_fact: |
| 8 | + ansible.builtin.set_fact: |
9 | 9 | virtualenv: "{{ ansible_python_interpreter | dirname | dirname }}" |
10 | 10 | when: |
11 | 11 | - ansible_python_interpreter is defined |
12 | 12 | - not ansible_python_interpreter.startswith('/bin/') |
13 | 13 | - not ansible_python_interpreter.startswith('/usr/bin/') |
14 | 14 |
|
15 | 15 | - name: Ensure Python hvac module is installed |
16 | | - pip: |
| 16 | + ansible.builtin.pip: |
17 | 17 | name: hvac |
18 | 18 | state: latest |
19 | 19 | extra_args: "{% if pip_upper_constraints_file %}-c {{ pip_upper_constraints_file }}{% endif %}" |
20 | 20 | virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}" |
21 | 21 | become: "{{ virtualenv is not defined }}" |
22 | 22 |
|
23 | 23 | - name: Ensure /opt/kayobe/vault exists |
24 | | - file: |
| 24 | + ansible.builtin.file: |
25 | 25 | path: /opt/kayobe/vault |
26 | 26 | state: directory |
27 | 27 | become: true |
28 | 28 |
|
29 | | - - import_role: |
| 29 | + - name: Import OpenBao role |
| 30 | + ansible.builtin.import_role: |
30 | 31 | name: stackhpc.hashicorp.openbao |
31 | 32 | vars: |
32 | 33 | openbao_config_dir: "/opt/kayobe/vault" |
|
36 | 37 | openbao_write_keys_file_path: "{{ kayobe_env_config_path }}/vault/kayobe-automation-keys.json" |
37 | 38 |
|
38 | 39 | - name: Include OpenBao keys |
39 | | - include_vars: |
| 40 | + ansible.builtin.include_vars: |
40 | 41 | file: "{{ kayobe_env_config_path }}/vault/kayobe-automation-keys.json" |
41 | 42 | name: openbao_keys |
42 | 43 | tags: always |
43 | 44 |
|
44 | | - - import_role: |
| 45 | + - name: Import Vault unseal role |
| 46 | + ansible.builtin.import_role: |
45 | 47 | name: stackhpc.hashicorp.vault_unseal |
46 | 48 | vars: |
47 | 49 | vault_api_addr: "{{ openbao_api_addr }}" |
|
52 | 54 | https_proxy: '' |
53 | 55 |
|
54 | 56 | - name: Create secret store |
55 | | - hashivault_secret_engine: |
| 57 | + ansible.legacy.hashivault_secret_engine: |
56 | 58 | name: kayobe-automation |
57 | 59 | backend: kv |
58 | 60 | url: "{{ openbao_api_addr }}" |
|
0 commit comments