--- - 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: Set password become: true become_user: postgres ignore_errors: yes shell: psql -c "ALTER USER joystream WITH PASSWORD '123';" - 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" - name: Reload postgres systemd: name: postgresql state: reloaded enabled: true become: true #TODO #host all joystream 127.0.0.1/8 trust #sudo -u postgres psql #ALTER USER joystream WITH PASSWORD '123'; #cd /home/joystream/jsstats #createdb jsstats #npm run seed