debug "Generatet content of '${yfile}':\n${content}"
echo "${content}" > "${yfile}"
- if [[ "${INITIAL_INSTALL}" ]] ; then
- yfile="${facts_dir}/initial_install.yaml"
+ yfile="${facts_dir}/initial_install.yaml"
+ if [[ "${INITIAL_INSTALL}" == "y" ]] ; then
info "Generating '${GREEN}${yfile}${NORMAL}' ..."
content=$( cat <<-EOF
---
)
debug "Generatet content of '${yfile}':\n${content}"
echo "${content}" > "${yfile}"
+ elif [[ -f "${yfile}" ]] ; then
+ info "Removing '${GREEN}${yfile}${NORMAL}' ..."
+ RM "${yfile}"
fi
wrong_file="${facts_dir}/host"