Package org.kiwiproject.ansible.vault
Class VaultEncryptStringCommand
- java.lang.Object
-
- org.kiwiproject.ansible.vault.VaultEncryptStringCommand
-
-
Constructor Summary
Constructors Constructor Description VaultEncryptStringCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VaultEncryptStringCommand
from(VaultConfiguration configuration, String plainText, String variableName)
Create an instance.static VaultEncryptStringCommand
from(VaultConfiguration configuration, String vaultIdLabel, String plainText, String variableName)
Create an instance.List<String>
getCommandParts()
Returns a list containing the command and all its arguments, which can then be used to construct aProcessBuilder
.
-
-
-
Method Detail
-
from
public static VaultEncryptStringCommand from(VaultConfiguration configuration, String plainText, String variableName)
Create an instance.- Parameters:
configuration
- theVaultConfiguration
to useplainText
- the plain text to encryptvariableName
- the name of the variable- Returns:
- the command
-
from
public static VaultEncryptStringCommand from(VaultConfiguration configuration, @Nullable String vaultIdLabel, String plainText, String variableName)
Create an instance.- Parameters:
configuration
- theVaultConfiguration
to usevaultIdLabel
- the label of the vault (for use with the--vault-id
argumentplainText
- the plain text to encryptvariableName
- the name of the variable- Returns:
- the command
-
getCommandParts
public List<String> getCommandParts()
Description copied from interface:OsCommand
Returns a list containing the command and all its arguments, which can then be used to construct aProcessBuilder
.- Specified by:
getCommandParts
in interfaceOsCommand
- Returns:
- a list of command arguments
- See Also:
ProcessBuilder(List)
-
-