From cae694d1ceea9a94acda4d595bf5fbeae2d609c6 Mon Sep 17 00:00:00 2001 From: Johan Wassberg Date: Tue, 7 Feb 2023 08:49:31 +0100 Subject: [PATCH] Make sure of separator We use the separator later on to determine where the yaml document starts. `eyaml edit` adds the separator to new (non-existing) files by itself but since we want to create the file before in order to diff later the separator needs to be added in order to get a valid document. --- edit-secrets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit-secrets b/edit-secrets index b4d816c..a2c67ac 100755 --- a/edit-secrets +++ b/edit-secrets @@ -151,7 +151,7 @@ function edit_file_on_host() { edit_gpg_file ${SECRETFILE} elif [ -f /etc/hiera/eyaml/public_certkey.pkcs7.pem ]; then # default to eyaml if the key exists and none of the secrets-file above exist - touch ${EYAMLFILE} + echo "---" > ${EYAMLFILE} edit_eyaml_file ${EYAMLFILE} fi }