--- - name: Add Postgresql apt key apt_key: url: https://www.postgresql.org/media/keys/ACCC4CF8.asc state: present - name: Add Postgresql Repository apt_repository: repo: deb http://apt.postgresql.org/pub/repos/apt {{ debian_version }}-pgdg main state: present - name: Install Postresql Server apt: name: - postgresql - postgresql-contrib - python3-psycopg2