Fix loading Nomad policies
This commit is contained in:
parent
653dc437c7
commit
9a14ef5d3b
2
ctctl
2
ctctl
|
@ -314,7 +314,7 @@ ctctl_load_policies(){
|
|||
echo "No valid nomad token. You have to authenticate first"
|
||||
ctctl_exit
|
||||
fi
|
||||
for PFILE in $(ls ${DIR}nomad/policies/*.hcl 2>/dev/null); do
|
||||
for PFILE in $(ls ${DIR}/nomad/policies/*.hcl 2>/dev/null); do
|
||||
PNAME=$(basename ${PFILE} .hcl)
|
||||
if [ "${DIR}" = "./output" -a -e "$(echo ${PFILE} | sed -E 's|^\./output/|./|')" ]; then
|
||||
echo "Skiping ${PFILE} as $(echo ${PFILE} | sed -E 's|^\./output/|./|') will take precedence"
|
||||
|
|
Loading…
Reference in New Issue