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 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
Modifier and TypeFieldDescriptionboolean
boolean
final String
The id of the credentials to use.boolean
int
boolean
Deprecated.final String
final Inventory
Path to the inventory file.final String
boolean
boolean
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
ConstructorDescriptionAnsibleAdHocCommandBuilder
(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 TypeMethodDescriptionvoid
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 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:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-