--- - name: Get the signing key for the postgresql.org repository apt_key: url=https://www.postgresql.org/media/keys/ACCC4CF8.asc state=present when: pg_use_postgresql_org_repo tags: - postgresql - postgresql_repo - name: Setup the postgresql.org repository apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_lsb.codename }}-pgdg main' when: pg_use_postgresql_org_repo tags: - postgresql - postgresql_repo