Files
ansible_role_package/tasks/pkgs/vault.yml
2025-03-22 17:36:09 -06:00

42 lines
1.1 KiB
YAML

# vim: set filetype=yaml.ansible :
---
- name: Add vault
when:
- vault_configured is undefined
block:
- name: Load vault config
ansible.builtin.include_tasks:
file: config/vault.yml
- name: Append vault
when:
- vault.method == 'sys'
block:
- name: Append vault to pkg_tap
when:
- ansible_system == 'Darwin'
notify:
- Depend hashicorp repo
changed_when: true
ansible.builtin.set_fact:
pkg_tap: "{{ pkg_tap + vault.pkgs }}"
- name: Append vault to pkg_sys
when:
- ansible_system == 'Linux'
notify:
- Depend hashicorp repo
changed_when: true
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + vault.pkgs }}"
- name: Append vault to pkg_archive
when:
- vault.method == 'archive'
ansible.builtin.set_fact:
pkg_archive: "{{ pkg_archive + ['vault'] }}"
- name: Set vault_configured
ansible.builtin.set_fact:
vault_configured: true