add vault import if available

This commit is contained in:
Louis Abel 2023-07-25 02:08:20 -07:00
parent c2c4a82b85
commit ed1aafc13f
Signed by: label
GPG Key ID: 2A6975660E424560

View File

@ -10,7 +10,7 @@
pre_tasks: pre_tasks:
- name: Check if ansible cannot be run here - name: Check if ansible cannot be run here
stat: ansible.builtin.stat:
path: /etc/no-ansible path: /etc/no-ansible
register: no_ansible register: no_ansible
@ -29,6 +29,12 @@
success_msg: "We are on a supported system" success_msg: "We are on a supported system"
fail_msg: "Only Rocky Linux versions 9 or higher are supported." fail_msg: "Only Rocky Linux versions 9 or higher are supported."
- name: Import vault if available
ansible.builtin.include_vars:
file: "{{ vault_file }}"
vars:
vault_file: "{{ lookup('ansible.builtin.first_found', 'vars/vaults/gerrit.yml', errors='ignore') }}"
- name: Check that variables are set properly - name: Check that variables are set properly
ansible.builtin.assert: ansible.builtin.assert:
that: that: