Compare commits
2 Commits
0ebfabbe5f
...
503a15a3ab
Author | SHA1 | Date |
---|---|---|
Amrut | 503a15a3ab | |
Souldiv | b281caf880 |
|
@ -1,13 +1,20 @@
|
|||
---
|
||||
- name: Check if key is present
|
||||
stat:
|
||||
path: /etc/apt/trusted.gpg.d/pgdg.asc
|
||||
register: st_pgdg
|
||||
|
||||
- name: Add PostgreSQL APT repo
|
||||
command: sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||
become: true
|
||||
when: not st_pgdg.stat.exists
|
||||
|
||||
- name: Import and Write gpg key to pgdg.asc
|
||||
get_url:
|
||||
url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||
dest: /etc/apt/trusted.gpg.d/pgdg.asc
|
||||
become: true
|
||||
when: not st_pgdg.stat.exists
|
||||
|
||||
- name: Update cache
|
||||
apt: update_cache=yes state=latest
|
||||
|
|
Loading…
Reference in New Issue