Testing
--- - name: Validate Password Safe input ansible.builtin.assert: that: - account_name is defined - account_name | string | length > 0 fail_msg: "Password Safe account_name is missing" - name: Fetch password from BeyondTrust Password Safe ansible.builtin.command: argv: - /bin/sh - /root/api.sh - "{{ account_name }}" delegate_to: localhost register: password_safe_result changed_when: false no_log: true - name: Validate retrieved password ansible.builtin.assert: that: - password_safe_result.stdout | length > 0 fail_msg: "Password Safe returned an empty password" no_log: true - name: Store retrieved password for subsequent tasks ansible.builtin.set_fact: retrieved_password: "{{ password_safe_result.stdout }}" ...