<%- if scope.lookupvar('::operatingsystem') == 'Fedora' -%> .include /lib/systemd/system/<%= @service_name %>.service <% else -%> .include /usr/lib/systemd/system/<%= @service_name %>.service <% end -%> [Service] Environment=PGPORT=<%= @port %> Environment=PGDATA=<%= @datadir %>