---
- name: Install postgres
apt:
name: "{{ postgres_packages }}"
state: present
become: true
- name: Start and enable the service
systemd:
name: postgresql
state: started
daemon_reload: true
enabled: true