Package org.jenkinsci.plugins.ansible
Class AnsibleAdHocCommandInvocation
java.lang.Object
org.jenkinsci.plugins.ansible.AnsibleAdHocCommandInvocation
Invoke the ansible command
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected Stringprotected final Run<?, ?> protected com.cloudbees.plugins.credentials.common.StandardUsernameCredentialsprotected final EnvVarsprotected Stringprotected intprotected final TaskListenerprotected booleanprotected Stringprotected com.cloudbees.plugins.credentials.common.StandardCredentialsprotected FilePath -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAnsibleAdHocCommandInvocation(String exe, AbstractBuild<?, ?> build, BuildListener listener) AnsibleAdHocCommandInvocation(String exe, Run<?, ?> build, FilePath ws, TaskListener listener, EnvVars envVars) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddKeyValuePair(ArgumentListBuilder args, String key, String value) protected voidaddOptionAndValue(ArgumentListBuilder args, String option, String value) protected ArgumentListBuilderprotected ArgumentListBuilderprotected ArgumentListBuilderprotected ArgumentListBuilderprotected ArgumentListBuilderprotected ArgumentListBuilderprotected ArgumentListBuilderbooleanprotected ArgumentListBuildersetAdditionalParameters(String additionalParameters) setColorizedOutput(boolean colorizedOutput) 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) setHostPattern(String hostPattern) setInventory(Inventory inventory) setModuleCommand(String command) 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
-
AnsibleAdHocCommandInvocation
protected AnsibleAdHocCommandInvocation(String exe, AbstractBuild<?, ?> build, BuildListener listener) throws IOException, InterruptedException, AnsibleInvocationException -
AnsibleAdHocCommandInvocation
public AnsibleAdHocCommandInvocation(String exe, Run<?, ?> build, FilePath ws, TaskListener listener, EnvVars envVars) throws IOException, InterruptedException, AnsibleInvocationException
-
-
Method Details
-
setHostPattern
-
setModule
-
setModuleCommand
-
appendModuleCommand
-
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 AnsibleAdHocCommandInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials) -
setCredentials
public AnsibleAdHocCommandInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials, boolean copyCredentialsInWorkspace) -
setVaultCredentials
public AnsibleAdHocCommandInvocation setVaultCredentials(com.cloudbees.plugins.credentials.common.StandardCredentials vaultCredentials) -
setVaultTmpPath
-
prependPasswordCredentials
-
appendCredentials
protected ArgumentListBuilder appendCredentials(ArgumentListBuilder args) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
appendVaultPasswordFile
protected ArgumentListBuilder appendVaultPasswordFile(ArgumentListBuilder args) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
setUnbufferedOutput
-
setColorizedOutput
-
setDisableHostKeyCheck
-
execute
public boolean execute(CLIRunner runner) throws IOException, InterruptedException, AnsibleInvocationException
-