Diff mode test

This commit is contained in:
anarchistcat 2022-10-28 05:05:13 +02:00
parent d92ffb07bb
commit b27611e565
5 changed files with 12 additions and 0 deletions

View File

@ -1448,6 +1448,8 @@ paths:
type: boolean
dry_run:
type: boolean
diff:
type: boolean
playbook:
type: string
environment:

View File

@ -25,6 +25,7 @@ type Task struct {
Debug bool `db:"debug" json:"debug"`
DryRun bool `db:"dry_run" json:"dry_run"`
Diff bool `db:"diff" json:"diff"`
// override variables
Playbook string `db:"playbook" json:"playbook"`

View File

@ -0,0 +1 @@
ALTER TABLE task ADD diff boolean NOT NULL DEFAULT false;

View File

@ -707,6 +707,10 @@ func (t *TaskRunner) getPlaybookArgs() (args []string, err error) {
args = append(args, "-vvvv")
}
if t.task.Diff {
args = append(args, "--diff")
}
if t.task.DryRun {
args = append(args, "--check")
}

View File

@ -123,6 +123,10 @@ Example:
v-model="item.dry_run"
label="Dry Run"
></v-checkbox>
<v-checkbox
v-model="item.diff"
label="Diff Mode"
></v-checkbox>
</v-col>
</v-row>