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.
This commit is contained in:
Johan Wassberg 2023-02-07 08:49:31 +01:00
parent 0db8d1fd9a
commit cae694d1ce
Signed by untrusted user: jocar
GPG key ID: BE4EC2EEADF2C31B

View file

@ -151,7 +151,7 @@ function edit_file_on_host() {
edit_gpg_file ${SECRETFILE} edit_gpg_file ${SECRETFILE}
elif [ -f /etc/hiera/eyaml/public_certkey.pkcs7.pem ]; then 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 # default to eyaml if the key exists and none of the secrets-file above exist
touch ${EYAMLFILE} echo "---" > ${EYAMLFILE}
edit_eyaml_file ${EYAMLFILE} edit_eyaml_file ${EYAMLFILE}
fi fi
} }