Package org.kiwiproject.ansible.vault
Class VaultEncryptCommand
- java.lang.Object
-
- org.kiwiproject.ansible.vault.VaultEncryptCommand
-
-
Constructor Summary
Constructors Constructor Description VaultEncryptCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VaultEncryptCommandfrom(VaultConfiguration configuration, String plainTextFilePath)Create an instance.static VaultEncryptCommandfrom(VaultConfiguration configuration, String vaultIdLabel, String plainTextFilePath)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 VaultEncryptCommand from(VaultConfiguration configuration, String plainTextFilePath)
Create an instance.- Parameters:
configuration- theVaultConfigurationto useplainTextFilePath- path to the plain text file to encrypt- Returns:
- the command
-
from
public static VaultEncryptCommand from(VaultConfiguration configuration, @Nullable String vaultIdLabel, String plainTextFilePath)
Create an instance.- Parameters:
configuration- theVaultConfigurationto usevaultIdLabel- the label of the vault (for use with the--vault-idargumentplainTextFilePath- path to the plain text file to encrypt- Returns:
- the command
-
getCommandParts
public List<String> getCommandParts()
Description copied from interface:OsCommandReturns a list containing the command and all its arguments, which can then be used to construct aProcessBuilder.- Specified by:
getCommandPartsin interfaceOsCommand- Returns:
- a list of command arguments
- See Also:
ProcessBuilder(List)
-
-