--- # Apps: MRDevs Tools # Include: bin/ansible/includes/sops_credentials.yaml # Description: Get sops secure encrypted credentials # Author: Mauro Rosero P. # Email: mauro@rosero.one (mauro.rosero@gmail.com) # Created: 2025-01-04 12:00:00 # Modified: 2025-01-05 00:00:00 - name: Get if credential access exists ansible.builtin.stat: path: "{{ sops_file }}" register: credentials_access connection: local become: no - name: Check if credentials access exists ansible.builtin.assert: that: - credentials_access.stat.exists fail_msg: "{{ messages.console.error.no_credentials }}" quiet: true - name: Get sops credentials access vars set_fact: sops_vars: "{{ lookup('community.sops.sops', sops_file, input_type='yaml', output_type='yaml') | from_yaml }}"