From 24789f358796161bb2f0df39be8c385407269c55 Mon Sep 17 00:00:00 2001 From: Matthias Baur Date: Mon, 11 Mar 2024 13:55:58 +0100 Subject: [PATCH] Don't allow ensure=file anymore @cocker-cc correctly mentioned in https://github.com/voxpupuli/puppet-systemd/commit/7f63dfa49850a860b24a93874fe5c5f4430f9edc#commitcomment-139614892 that after #405 `ensure=file` breaks due to `stdlib::ensure` not being able to handle that. As `file` is any way only a synonym for `present`, let's just remove it from the possible values. --- REFERENCE.md | 2 +- manifests/unit_file.pp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index afc63faf..7f238892 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -2073,7 +2073,7 @@ The target unit file to create ##### `ensure` -Data type: `Enum['present', 'absent', 'file']` +Data type: `Enum['present', 'absent']` The state of the unit file to ensure diff --git a/manifests/unit_file.pp b/manifests/unit_file.pp index 5d35011e..9d0430f4 100644 --- a/manifests/unit_file.pp +++ b/manifests/unit_file.pp @@ -66,7 +66,7 @@ # } # define systemd::unit_file ( - Enum['present', 'absent', 'file'] $ensure = 'present', + Enum['present', 'absent'] $ensure = 'present', Stdlib::Absolutepath $path = '/etc/systemd/system', Optional[Variant[String, Sensitive[String], Deferred]] $content = undef, Optional[String] $source = undef,