--- - name: restart postgresql systemd: name: postgresql@{{ pg_version }}-{{ pg_cluster }} state: restarted ...