Enable service at boot

Issue #3 new
Patrick Brideau created an issue

Currently, the pgbouner service is disabled at boot by default (i'm testing in RockyLinux 8). Puppet must run at least once to start the service, or it must be started manually.

:~# systemctl status pgbouncer
● pgbouncer.service - A lightweight connection pooler for PostgreSQL
   Loaded: loaded (/usr/lib/systemd/system/pgbouncer.service; disabled; vendor preset: disabled)
[...]

This simple change could be done to start at boot, in init.pp:

service { 'pgbouncer':
  enable => true,
}

or more complex with parameter in the class if you want to keep this default behavior, but allow users to change it:

class pgbouncer (
  [...]
  Boolean $enable = False,
){
  [...]
  service { 'pgbouncer':
    [...]
    enable => $enable,
  }
}

Comments (1)

  1. Log in to comment