## postgresql_cd::server::service.pp
# Module name: postgresql_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages the postgresql service
###############################################################################
class postgresql_cd::server::service (

) inherits postgresql_cd::params {
  if $fqdn == $pl_server_fqdn {
    require postgresql_cd::firewall::iptables
    require postgresql_cd::server::initdb
    require postgresql_cd::server::pghba::pg_hba

    service { $pl_service:
      ensure     => running,
      hasstatus  => true,
      hasrestart => true,
      enable     => true,
    }
  }
}
