Skip to content

Commit

Permalink
fix: linting issues within deploy-openbao-kayobe-automation
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhodgkiss committed Jan 22, 2025
1 parent d0de34b commit e1e5994
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions etc/kayobe/ansible/deploy-openbao-kayobe-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@
hosts: github-runners,gitlab-runners
tasks:
- name: Set a fact about the virtualenv on the remote system
set_fact:
ansible.builtin.set_fact:
virtualenv: "{{ ansible_python_interpreter | dirname | dirname }}"
when:
- ansible_python_interpreter is defined
- not ansible_python_interpreter.startswith('/bin/')
- not ansible_python_interpreter.startswith('/usr/bin/')

- name: Ensure Python hvac module is installed
pip:
ansible.builtin.pip:
name: hvac
state: latest
extra_args: "{% if pip_upper_constraints_file %}-c {{ pip_upper_constraints_file }}{% endif %}"
virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}"
become: "{{ virtualenv is not defined }}"

- name: Ensure /opt/kayobe/vault exists
file:
ansible.builtin.file:
path: /opt/kayobe/vault
state: directory
become: true

- import_role:
- name: Import OpenBao role
ansible.builtin.import_role:
name: stackhpc.hashicorp.openbao
vars:
openbao_config_dir: "/opt/kayobe/vault"
Expand All @@ -36,12 +37,13 @@
openbao_write_keys_file_path: "{{ kayobe_env_config_path }}/vault/kayobe-automation-keys.json"

- name: Include OpenBao keys
include_vars:
ansible.builtin.include_vars:
file: "{{ kayobe_env_config_path }}/vault/kayobe-automation-keys.json"
name: openbao_keys
tags: always

- import_role:
- name: Import Vault unseal role
ansible.builtin.import_role:
name: stackhpc.hashicorp.vault_unseal
vars:
vault_api_addr: "{{ openbao_api_addr }}"
Expand Down

0 comments on commit e1e5994

Please sign in to comment.