--- - hosts: postgresql, matrix become: yes vars: postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc" # https://github.com/ANXS/postgresql/issues/523 ansible_python_interpreter: "/usr/bin/python3" pre_tasks: - name: Assert all database passwords have been configured. ansible.builtin.assert: that: - item.pass is defined - item.pass != '' fail_msg: "FAILED: Database password for {{ item.name }} is not configured." loop: "{{ postgresql_users }}" no_log: yes roles: - role: anxs.postgresql