diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-07-11 01:33:40 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-07-11 01:33:40 -0400 |
commit | 5c22a2a78960b4327fccfab5fc483e2761f93486 (patch) | |
tree | 08f35fccede7d049196a6ea0004ae6f81c5b46ac /modules/postgres/manifests | |
parent | 4d2fb213b04a30a2d9e7b65244f4af38b2e183ad (diff) | |
download | puppet-tozt-5c22a2a78960b4327fccfab5fc483e2761f93486.tar.gz puppet-tozt-5c22a2a78960b4327fccfab5fc483e2761f93486.zip |
add helper for systemd overrides
Diffstat (limited to 'modules/postgres/manifests')
-rw-r--r-- | modules/postgres/manifests/init.pp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/postgres/manifests/init.pp b/modules/postgres/manifests/init.pp index 646196d..af60384 100644 --- a/modules/postgres/manifests/init.pp +++ b/modules/postgres/manifests/init.pp @@ -1,6 +1,4 @@ class postgres { - include systemd - $dbpath = "${persistent_data}/postgres" # lint:ignore:variable_scope package { "postgresql": @@ -22,12 +20,10 @@ class postgres { Package["postgresql"], File[$dbpath], ]; - "/etc/systemd/system/postgresql.service.d": - ensure => directory; - "/etc/systemd/system/postgresql.service.d/override.conf": - content => template('postgres/postgres-service'), - notify => Exec["/usr/bin/systemctl daemon-reload"], - require => File["/etc/systemd/system/postgresql.service.d"]; + } + + systemd::override { "postgresql": + content => template('postgres/postgres-service'); } exec { "fixup db path permissions": @@ -55,6 +51,7 @@ class postgres { enable => true, require => [ Package["postgresql"], + Systemd::Override['postgresql'], Exec["initialize db path"], ]; } |