Ansible roles by Evolix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
705 B

---
- name: Open firewall for PGDG repository
replace:
name: /etc/default/minifirewall
regexp: "^(HTTPSITES='((?!apt\\.postgresql\\.org).)*)'$"
replace: "\\1 apt.postgresql.org'"
notify: Restart minifirewall
- meta: flush_handlers
- name: Add PGDG repository
apt_repository:
repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main"
update_cache: yes
- name: Add GPG key for PGDG repository
apt_key:
#url: http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc
data: "{{ lookup('file', 'ACCC4CF8.asc') }}"
- name: Add APT preference file
template:
src: postgresql.pref.j2
dest: /etc/apt/preferences.d/
mode: "0644"