Ansible - Install PostgreSQL on Ubuntu
vi install_postgresql.yml
---
- hosts: all
become: yes
tasks:
- name: Install required packages
apt:
name: "{{ item }}"
update_cache: yes
loop:
- wget
- ca-certificates
- name: PostgreSQL Key
shell: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -