Skip to content

Commit

Permalink
fix: bug fix (#2427)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbbDylan authored Oct 10, 2024
1 parent 87deeac commit b10dc00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/converter/tmpl/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func ParseBool(ctx map[string]any, inputs []string) (bool, error) {
// ParseString parse template string to actual string
func ParseString(ctx map[string]any, input string) (string, error) {
if !IsTmplSyntax(input) {
return input, nil
return strings.Trim(input, "\r\n"), nil
}

tl, err := internal.Template.Parse(input)
Expand Down
4 changes: 4 additions & 0 deletions pkg/executor/pipeline_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func (e pipelineExecutor) execBatchHosts(ctx context.Context, play kkprojectv1.P
}
// generate task from role
for _, role := range play.Roles {
if !role.Taggable.IsEnabled(e.pipeline.Spec.Tags, e.pipeline.Spec.SkipTags) {
// if not match the tags. skip
continue
}
if err := e.variable.Merge(variable.MergeRuntimeVariable(role.Vars, serials...)); err != nil {
return fmt.Errorf("merge variable error: %w", err)
}
Expand Down

0 comments on commit b10dc00

Please sign in to comment.