pmcf 6.26.2 → 6.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cluster.mjs +8 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.26.2",
3
+ "version": "6.26.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cluster.mjs CHANGED
@@ -88,7 +88,7 @@ export class Cluster extends Host {
88
88
  ""
89
89
  ];
90
90
 
91
- const credentials = [];
91
+ const credentials = new Map();
92
92
  for (const cluster of [...this.owner.clusters.values()].sort((a, b) =>
93
93
  a.name.localeCompare(b.name)
94
94
  )) {
@@ -121,13 +121,15 @@ export class Cluster extends Host {
121
121
  }
122
122
 
123
123
  const credential = name.toUpperCase() + "_PASSWORD";
124
- credentials.push(credential);
124
+ credentials.set(credential,name);
125
125
  cfg.push(` priority ${host.priority - reducedPrio}`);
126
126
  cfg.push(" smtp_alert");
127
127
  cfg.push(" advert_int 5");
128
128
  cfg.push(" authentication {");
129
129
  cfg.push(" auth_type PASS");
130
- cfg.push(" auth_pass ${" + credential + "}");
130
+ cfg.push(" auth_pass pass1234");
131
+ cfg.push(" # auth_pass ${_ENV " + credential + "}");
132
+ cfg.push(" # auth_pass ${" + credential + "}");
131
133
  cfg.push(" }");
132
134
 
133
135
  cfg.push(
@@ -221,9 +223,9 @@ export class Cluster extends Host {
221
223
  "credentials.conf",
222
224
  [
223
225
  "[Service]",
224
- ...credentials.map(
225
- c =>
226
- `LoadCredentialEncrypted=${c}:/etc/credstore.encrypted/keepalived.password`
226
+ ...credentials.entries().map(
227
+ ([credName,instance]) =>
228
+ `LoadCredentialEncrypted=${credName}:/etc/credstore.encrypted/keepalived.${instance}.password`
227
229
  )
228
230
  ]
229
231
  );