X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fsystemd%2Fmanifests%2Fdropin_file.pp;fp=3rdparty%2Fmodules%2Fsystemd%2Fmanifests%2Fdropin_file.pp;h=0000000000000000000000000000000000000000;hb=c7e7bcc28cc5dc48a7e284a3c82f33df27d1f57d;hp=55a8542fb212196ccb670ed23754e7bbcbaa68e9;hpb=f89d8091bbf5a7bd8f86ee80abb03c729cea8d74;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/systemd/manifests/dropin_file.pp b/3rdparty/modules/systemd/manifests/dropin_file.pp deleted file mode 100644 index 55a8542fb..000000000 --- a/3rdparty/modules/systemd/manifests/dropin_file.pp +++ /dev/null @@ -1,68 +0,0 @@ -# Creates a drop-in file for a systemd unit -# -# @api public -# -# @see systemd.unit(5) -# -# @attr name [Pattern['^.+\.conf$']] -# The target unit file to create -# -# * Must not contain ``/`` -# -# @attr path -# The main systemd configuration path -# -# @attr content -# The full content of the unit file -# -# * Mutually exclusive with ``$source`` -# -# @attr source -# The ``File`` resource compatible ``source`` -# -# * Mutually exclusive with ``$content`` -# -# @attr target -# If set, will force the file to be a symlink to the given target -# -# * Mutually exclusive with both ``$source`` and ``$content`` -# -define systemd::dropin_file( - Systemd::Unit $unit, - Systemd::Dropin $filename = $name, - Enum['present', 'absent', 'file'] $ensure = 'present', - Stdlib::Absolutepath $path = '/etc/systemd/system', - Optional[String] $content = undef, - Optional[String] $source = undef, - Optional[Stdlib::Absolutepath] $target = undef, -) { - include systemd - - if $target { - $_ensure = 'link' - } else { - $_ensure = $ensure ? { - 'present' => 'file', - default => $ensure, - } - } - - if $ensure != 'absent' { - ensure_resource('file', "${path}/${unit}.d", { - ensure => directory, - owner => 'root', - group => 'root', - }) - } - - file { "${path}/${unit}.d/${filename}": - ensure => $_ensure, - content => $content, - source => $source, - target => $target, - owner => 'root', - group => 'root', - mode => '0444', - notify => Class['systemd::systemctl::daemon_reload'], - } -}