Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ltamaster committed Mar 19, 2024
1 parent 50e0ccd commit 3fc42c9
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -713,13 +713,18 @@ public String encryptExtraVarsKey(String extraVars) throws Exception {
}
}

for (Map.Entry<String, String> entry : extraVarsMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
String encryptedKey = ansibleVault.encryptVariable(key, value);
if (encryptedKey != null) {
encryptedExtraVarsMap.put(key, encryptedKey);
try {
for (Map.Entry<String, String> entry : extraVarsMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
String encryptedKey = ansibleVault.encryptVariable(key, value);
if (encryptedKey != null) {
encryptedExtraVarsMap.put(key, encryptedKey);
}
}
} catch (Exception e) {
throw new AnsibleException("ERROR: cannot parse extra var values: " + e.getMessage(),
AnsibleException.AnsibleFailureReason.AnsibleNonZero);
}

StringBuilder stringBuilder = new StringBuilder();
Expand Down

0 comments on commit 3fc42c9

Please sign in to comment.