Package org.jenkinsci.plugins.ansible
Class AnsiblePlaybookInvocation
java.lang.Object
org.jenkinsci.plugins.ansible.AnsiblePlaybookInvocation
Invoke the ansible-playbook command
-
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
AnsiblePlaybookInvocation
(String exe, AbstractBuild<?, ?> build, BuildListener listener, EnvVars envVars) AnsiblePlaybookInvocation
(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) setCheckMode
(boolean checkMode) 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) setInventory
(Inventory inventory) setPlaybook
(String playbook) setSkippedTags
(String skippedTags) setStartTask
(String startAtTask) 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
-
AnsiblePlaybookInvocation
protected AnsiblePlaybookInvocation(String exe, AbstractBuild<?, ?> build, BuildListener listener, EnvVars envVars) throws IOException, InterruptedException, AnsibleInvocationException -
AnsiblePlaybookInvocation
public AnsiblePlaybookInvocation(String exe, Run<?, ?> build, FilePath ws, TaskListener listener, EnvVars envVars) throws IOException, InterruptedException, AnsibleInvocationException
-
-
Method Details
-
setPlaybook
-
setCheckMode
-
setLimit
-
setTags
-
setSkippedTags
-
setStartTask
-
appendCheckMode
-
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 AnsiblePlaybookInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials) -
setCredentials
public AnsiblePlaybookInvocation setCredentials(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials credentials, boolean copyCredentialsInWorkspace) -
setVaultCredentials
public AnsiblePlaybookInvocation 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
-