Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ It is possible to access build and environment variables in ansible playbooks. T

## Job DSL support

Note that some of these parameters are passed in to ansible as CLI arguments and take presedent over other ansible configurations.

```groovy
steps {
ansiblePlaybook(String playbook) {
Expand All @@ -35,7 +37,7 @@ steps {
becomeUser(String user = 'root')
sudo(boolean sudo = true)
sudoUser(String user = 'root')
forks(int forks = 5)
forks(int forks = 0)
unbufferedOutput(boolean unbufferedOutput = true)
colorizedOutput(boolean colorizedOutput = false)
hostKeyChecking(boolean hostKeyChecking = false)
Expand All @@ -55,7 +57,7 @@ steps {
becomeUser(String user = 'root')
sudo(boolean sudo = true)
sudoUser(String user = 'root')
forks(int forks = 5)
forks(int forks = 0)
unbufferedOutput(boolean unbufferedOutput = true)
colorizedOutput(boolean colorizedOutput = false)
hostKeyChecking(boolean hostKeyChecking = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AnsibleContext implements Context {
private String becomeUser = "root";
private boolean sudo = false;
private String sudoUser = "root";
private int forks = 5;
private int forks;
private boolean unbufferedOutput = true;
private boolean colorizedOutput = false;
private boolean disableHostKeyChecking = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void shouldCreateJobAdhocDsl() throws Exception {
assertThat("hostPattern", step.hostPattern, is("pattern"));
assertThat("become", step.become, is(false));
assertThat("becomeUser", step.becomeUser, is("root"));
assertThat("forks", step.forks, is(5));
assertThat("forks", step.forks, is(0));
assertThat("unbufferedOutput", step.unbufferedOutput, is(true));
assertThat("colorizedOutput", step.colorizedOutput, is(false));
assertThat("disableHostKeyChecking", step.disableHostKeyChecking, is(false));
Expand Down