diff --git a/cdist/core/cdist_type.py b/cdist/core/cdist_type.py index b68448bca..fa5470fcf 100644 --- a/cdist/core/cdist_type.py +++ b/cdist/core/cdist_type.py @@ -268,7 +268,7 @@ def parameter_defaults(self): for name in cdist.core.listdir(defaults_dir): try: with open(os.path.join(defaults_dir, name)) as fd: - defaults[name] = fd.read().strip() + defaults[name] = fd.read().rstrip("\n") except EnvironmentError: pass # Swallow errors raised by open() or read() except EnvironmentError: diff --git a/docs/changelog b/docs/changelog index 4008e3c2c..3af27c56d 100644 --- a/docs/changelog +++ b/docs/changelog @@ -12,6 +12,7 @@ next: * Type __debconf_set_selections: Fix bug where --file was unsupported (Evilham) * Types __letsencrypt_cert, __grafana_dashboard: Improve bullseye support (Evilham) * Type __package_apt: Mark already installed packages as manual (Dennis Camera) + * Core: Strip only trailing new lines from parameter defaults, instead of leading and trailing whitespace (Dennis Camera) 6.9.8: 2021-08-24 * Type __rsync: Rewrite (Ander Punnar)