hashes passwords support

This commit is contained in:
Mikaël Cluseau
2023-12-17 17:29:08 +01:00
parent c02f701c04
commit b616b710cb
8 changed files with 130 additions and 99 deletions

View File

@ -13,8 +13,8 @@ func clusterFuncs(clusterSpec *clustersconfig.Cluster) map[string]interface{} {
cluster := clusterSpec.Name
return map[string]interface{}{
"password": func(name string) (s string) {
return fmt.Sprintf("{{ password %q %q }}", cluster, name)
"password": func(name, hash string) (s string) {
return fmt.Sprintf("{{ password %q %q %q | quote }}", cluster, name, hash)
},
"token": func(name string) (s string) {