Package org.jenkinsci.plugins.ansible
Class AnsibleVaultInvocation
java.lang.Object
org.jenkinsci.plugins.ansible.AnsibleVaultInvocation
Invoke the ansible-vault command
- Author:
- Michael Cresswell
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected boolean
protected String
protected final Run<?,
?> protected com.cloudbees.plugins.credentials.common.StandardUsernameCredentials
protected final EnvVars
protected String
protected int
protected final TaskListener
protected boolean
protected String
protected com.cloudbees.plugins.credentials.common.StandardCredentials
protected FilePath
-
Constructor Summary
ModifierConstructorDescriptionprotected
AnsibleVaultInvocation
(String exe, AbstractBuild<?, ?> build, BuildListener listener, EnvVars envVars) AnsibleVaultInvocation
(String exe, Run<?, ?> build, FilePath ws, TaskListener listener, EnvVars envVars) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addKeyValuePair
(ArgumentListBuilder args, String key, String value) protected void
addOptionAndValue
(ArgumentListBuilder args, String option, String value) protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
protected ArgumentListBuilder
boolean
protected ArgumentListBuilder
setAdditionalParameters
(String additionalParameters) setColorizedOutput
(boolean colorizedOutput) setContent
(String content) setCredentials
(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials) setCredentials
(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials, boolean copyCredentialsInWorkspace) setDisableHostKeyCheck
(boolean disableHostKeyChecking) setExtraVars
(List<ExtraVar> extraVars) setForks
(int forks) setInventory
(Inventory inventory) setNewVaultCredentials
(com.cloudbees.plugins.credentials.common.StandardCredentials newVaultCredentials) setUnbufferedOutput
(boolean unbufferedOutput) setVaultCredentials
(com.cloudbees.plugins.credentials.common.StandardCredentials vaultCredentials) setVaultTmpPath
(FilePath vaultTmpPath)
-
Field Details
-
envVars
-
listener
-
build
-
environment
-
exe
-
forks
protected int forks -
become
protected boolean become -
becomeUser
-
sudo
protected boolean sudo -
sudoUser
-
vaultCredentials
protected com.cloudbees.plugins.credentials.common.StandardCredentials vaultCredentials -
vaultTmpPath
-
credentials
protected com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials -
extraVars
-
additionalParameters
-
-
Constructor Details
-
AnsibleVaultInvocation
protected AnsibleVaultInvocation(String exe, AbstractBuild<?, ?> build, BuildListener listener, EnvVars envVars) throws IOException, InterruptedException, AnsibleInvocationException -
AnsibleVaultInvocation
public AnsibleVaultInvocation(String exe, Run<?, ?> build, FilePath ws, TaskListener listener, EnvVars envVars) throws IOException, InterruptedException, AnsibleInvocationException
-
-
Method Details
-
setAction
-
setContent
-
setInput
-
setNewVaultCredentials
public AnsibleVaultInvocation setNewVaultCredentials(com.cloudbees.plugins.credentials.common.StandardCredentials newVaultCredentials) -
appendNewVaultPasswordFile
protected ArgumentListBuilder appendNewVaultPasswordFile(ArgumentListBuilder args) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
setOutput
-
buildCommandLine
protected ArgumentListBuilder buildCommandLine() throws InterruptedException, AnsibleInvocationException, IOException -
appendExecutable
-
setInventory
-
appendInventory
protected ArgumentListBuilder appendInventory(ArgumentListBuilder args) throws IOException, InterruptedException, AnsibleInvocationException -
setForks
-
appendForks
-
setExtraVars
-
appendExtraVars
-
setAdditionalParameters
-
appendAdditionalParameters
-
setBecome
-
appendBecome
-
setSudo
-
appendSudo
-
addOptionAndValue
-
addKeyValuePair
-
setCredentials
public AnsibleVaultInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials) -
setCredentials
public AnsibleVaultInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials, boolean copyCredentialsInWorkspace) -
setVaultCredentials
public AnsibleVaultInvocation setVaultCredentials(com.cloudbees.plugins.credentials.common.StandardCredentials vaultCredentials) -
setVaultTmpPath
-
prependPasswordCredentials
-
appendCredentials
protected ArgumentListBuilder appendCredentials(ArgumentListBuilder args) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
appendVaultPasswordFile
protected ArgumentListBuilder appendVaultPasswordFile(ArgumentListBuilder args) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
setUnbufferedOutput
-
setColorizedOutput
-
setDisableHostKeyCheck
-
execute
public boolean execute(CLIRunner runner) throws IOException, InterruptedException, AnsibleInvocationException
-