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
public class AnsibleAdHocCommandBuilder extends Builder implements SimpleBuildStep
A builder which wraps an Ansible Ad-Hoc command invocation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnsibleAdHocCommandBuilder.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
Fields Modifier and Type Field Description String
additionalParameters
String
ansibleName
boolean
become
String
becomeUser
boolean
colorizedOutput
String
command
String
credentialsId
The id of the credentials to use.boolean
disableHostKeyChecking
List<ExtraVar>
extraVars
int
forks
boolean
hostKeyChecking
Deprecated.String
hostPattern
Inventory
inventory
Path to the inventory file.String
module
boolean
sudo
String
sudoUser
boolean
unbufferedOutput
String
vaultCredentialsId
String
vaultTmpPath
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description 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(String hostPattern, Inventory inventory, String module, String command)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
perform(Run<?,?> run, FilePath ws, Launcher launcher, TaskListener listener)
void
setAdditionalParameters(String additionalParameters)
void
setAnsibleName(String ansibleName)
void
setBecome(boolean become)
void
setBecomeUser(String becomeUser)
void
setColorizedOutput(boolean colorizedOutput)
void
setCredentialsId(String credentialsId)
void
setDisableHostKeyChecking(boolean disableHostKeyChecking)
void
setExtraVars(List<ExtraVar> extraVars)
void
setForks(int forks)
void
setHostKeyChecking(boolean hostKeyChecking)
Deprecated.void
setSudo(boolean sudo)
void
setSudoUser(String sudoUser)
void
setUnbufferedOutput(boolean unbufferedOutput)
void
setVaultCredentialsId(String vaultCredentialsId)
void
setVaultTmpPath(String vaultTmpPath)
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Field Detail
-
ansibleName
public String ansibleName
-
credentialsId
public String credentialsId
The id of the credentials to use.
-
vaultCredentialsId
public String vaultCredentialsId
-
vaultTmpPath
public String vaultTmpPath
-
hostPattern
public final String hostPattern
-
inventory
public final Inventory inventory
Path to the inventory file.
-
module
public final String module
-
command
public final String command
-
become
public boolean become
-
becomeUser
public String becomeUser
-
sudo
public boolean sudo
-
sudoUser
public String sudoUser
-
forks
public int forks
-
unbufferedOutput
public boolean unbufferedOutput
-
colorizedOutput
public boolean colorizedOutput
-
disableHostKeyChecking
public boolean disableHostKeyChecking
-
hostKeyChecking
@Deprecated public transient boolean hostKeyChecking
Deprecated.
-
additionalParameters
public String additionalParameters
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
setAnsibleName
@DataBoundSetter public void setAnsibleName(String ansibleName)
-
setCredentialsId
@DataBoundSetter public void setCredentialsId(String credentialsId)
-
setVaultCredentialsId
@DataBoundSetter public void setVaultCredentialsId(String vaultCredentialsId)
-
setVaultTmpPath
@DataBoundSetter public void setVaultTmpPath(String vaultTmpPath)
-
setBecome
public void setBecome(boolean become)
-
setBecomeUser
@DataBoundSetter public void setBecomeUser(String becomeUser)
-
setSudo
@DataBoundSetter public void setSudo(boolean sudo)
-
setSudoUser
@DataBoundSetter public void setSudoUser(String sudoUser)
-
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
@DataBoundSetter @Deprecated public void setHostKeyChecking(boolean hostKeyChecking)
Deprecated.
-
setAdditionalParameters
@DataBoundSetter public void setAdditionalParameters(String additionalParameters)
-
perform
public void perform(@Nonnull Run<?,?> run, @Nonnull FilePath ws, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
-