--- - name: Install PostgreSQL become: true apt: name: postgresql state: present - name: Install PostgreSQL tools become: true apt: name: postgresql-contrib state: present - name: Create user become: true become_user: postgres ignore_errors: yes shell: "createuser -d joystream" - name: Setup user become: true lineinfile: state: present path: "/etc/postgresql/12/main/pg_hba.conf" line: "host all joystream 127.0.0.1/8 trust"