diff --git a/roles/kubernetes/node/files/kube-gen-token.sh b/roles/kubernetes/node/files/kube-gen-token.sh index fa6a5ddc7..121b52263 100644 --- a/roles/kubernetes/node/files/kube-gen-token.sh +++ b/roles/kubernetes/node/files/kube-gen-token.sh @@ -19,7 +19,10 @@ token_file="${token_dir}/known_tokens.csv" create_accounts=($@) -touch "${token_file}" +if [ ! -e "${token_file}" ]; then + touch "${token_file}" +fi + for account in "${create_accounts[@]}"; do if grep ",${account}," "${token_file}" ; then continue