--- - name: install postgresql debian packages apt: pkg: - python-psycopg2 - python3-psycopg2 - postgresql - autopostgresqlbackup - block: - name: postgresql user postgresql_user: name: "{{kanboard_db_user}}" password: "{{kanboard_db_pass}}" - name: postgresql database postgresql_db: name: "{{kanboard_db_name}}" owner: "{{kanboard_db_user}}" become: true become_user: postgres