-
Notifications
You must be signed in to change notification settings - Fork 611
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1396 from SimonHoenscheid/shoenscheid_systemd_cle…
…anup Cleanup Systemd drop-in file handling
- Loading branch information
Showing
10 changed files
with
75 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# @summary This define handles systemd drop-in files for the postgres main instance (default) or additional instances | ||
# @param service_name Overrides the default PostgreSQL service name. | ||
# @param drop_in_ensure sets the Systemd drop-in file to present or absent | ||
# @api private | ||
define postgresql::server::instance::systemd ( | ||
Variant[String[1], Stdlib::Port] $port, | ||
Stdlib::Absolutepath $datadir, | ||
Optional[String[1]] $extra_systemd_config = undef, | ||
String[1] $service_name = $name, | ||
Enum[present, absent] $drop_in_ensure = 'present', | ||
|
||
) { | ||
# Template uses: | ||
# - $port | ||
# - $datadir | ||
# - $extra_systemd_config | ||
systemd::dropin_file { "${service_name}.conf": | ||
ensure => $drop_in_ensure, | ||
unit => "${service_name}.service", | ||
owner => 'root', | ||
group => 'root', | ||
content => template('postgresql/systemd-override.erb'), | ||
notify => Class['postgresql::server::service'], | ||
before => Class['postgresql::server::reload'], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters