Package org.jenkinsci.plugins.ansible
Class AnsibleAdHocCommandBuilder
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
org.jenkinsci.plugins.ansible.AnsibleAdHocCommandBuilder
- All Implemented Interfaces:
ExtensionPoint,Describable<Builder>,BuildStep,SimpleBuildStep
A builder which wraps an Ansible Ad-Hoc command invocation.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanfinal StringThe id of the credentials to use.booleanintbooleanDeprecated.final Stringfinal InventoryPath to the inventory file.final StringbooleanbooleanFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionAnsibleAdHocCommandBuilder(String ansibleName, String hostPattern, Inventory inventory, String module, String command, String credentialsId, boolean sudo, String sudoUser, int forks, boolean unbufferedOutput, boolean colorizedOutput, boolean hostKeyChecking, String additionalParameters) Deprecated.AnsibleAdHocCommandBuilder(String hostPattern, Inventory inventory, String module, String command) -
Method Summary
Modifier and TypeMethodDescriptionvoidperform(Run<?, ?> run, FilePath ws, Launcher launcher, TaskListener listener) voidsetAdditionalParameters(String additionalParameters) voidsetAnsibleName(String ansibleName) voidsetBecome(boolean become) voidsetBecomeUser(String becomeUser) voidsetColorizedOutput(boolean colorizedOutput) voidsetCredentialsId(String credentialsId) voidsetDisableHostKeyChecking(boolean disableHostKeyChecking) voidsetExtraVars(List<ExtraVar> extraVars) voidsetForks(int forks) voidsetHostKeyChecking(boolean hostKeyChecking) Deprecated.voidsetSudo(boolean sudo) voidsetSudoUser(String sudoUser) voidsetUnbufferedOutput(boolean unbufferedOutput) voidsetVaultCredentialsId(String vaultCredentialsId) voidsetVaultTmpPath(String vaultTmpPath) Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Field Details
-
ansibleName
-
credentialsId
The id of the credentials to use. -
vaultCredentialsId
-
vaultTmpPath
-
hostPattern
-
inventory
Path to the inventory file. -
module
-
command
-
become
public boolean become -
becomeUser
-
sudo
public boolean sudo -
sudoUser
-
forks
public int forks -
unbufferedOutput
public boolean unbufferedOutput -
colorizedOutput
public boolean colorizedOutput -
disableHostKeyChecking
public boolean disableHostKeyChecking -
hostKeyChecking
Deprecated. -
additionalParameters
-
extraVars
-
-
Constructor Details
-
AnsibleAdHocCommandBuilder
@Deprecated public AnsibleAdHocCommandBuilder(String ansibleName, String hostPattern, Inventory inventory, String module, String command, String credentialsId, boolean sudo, String sudoUser, int forks, boolean unbufferedOutput, boolean colorizedOutput, boolean hostKeyChecking, String additionalParameters) Deprecated. -
AnsibleAdHocCommandBuilder
-
-
Method Details
-
setAnsibleName
-
setCredentialsId
-
setVaultCredentialsId
-
setVaultTmpPath
-
setBecome
public void setBecome(boolean become) -
setBecomeUser
-
setSudo
@DataBoundSetter public void setSudo(boolean sudo) -
setSudoUser
-
setForks
@DataBoundSetter public void setForks(int forks) -
setUnbufferedOutput
@DataBoundSetter public void setUnbufferedOutput(boolean unbufferedOutput) -
setColorizedOutput
@DataBoundSetter public void setColorizedOutput(boolean colorizedOutput) -
setDisableHostKeyChecking
@DataBoundSetter public void setDisableHostKeyChecking(boolean disableHostKeyChecking) -
setHostKeyChecking
Deprecated. -
setAdditionalParameters
-
setExtraVars
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath ws, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceSimpleBuildStep- Throws:
InterruptedExceptionIOException
-