Run root password scripts only on Cluster Leaders
This commit is contained in:
@ -12,12 +12,14 @@ function genPasswordToFile()
|
||||
chmod 600 ${file}
|
||||
}
|
||||
|
||||
ROLE=$(CreoleGet dbClusterPosition)
|
||||
WRITERFILE="/root/.bddadm"
|
||||
SECURE_CMD="mysql_secure_installation"
|
||||
|
||||
|
||||
[[ ${ROLE} == "Node" ]] && exit 0
|
||||
[[ -e ${WRITERFILE} ]] && exit 0
|
||||
|
||||
|
||||
genPasswordToFile ${WRITERFILE}
|
||||
|
||||
pass=$(< ${WRITERFILE})
|
||||
|
Reference in New Issue
Block a user