From a4f4eabf0af1be7fee0e7f3069edcfcbc7f5601d Mon Sep 17 00:00:00 2001 From: AlteredCoder <64792091+AlteredCoder@users.noreply.github.com> Date: Wed, 22 Jun 2022 17:01:27 +0200 Subject: [PATCH] support yml file (#1605) --- pkg/leakybucket/manager_load.go | 2 +- pkg/parser/stage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/leakybucket/manager_load.go b/pkg/leakybucket/manager_load.go index 1fcd6a7a9..11f0e0a3a 100644 --- a/pkg/leakybucket/manager_load.go +++ b/pkg/leakybucket/manager_load.go @@ -153,7 +153,7 @@ func LoadBuckets(cscfg *csconfig.CrowdsecServiceCfg, files []string, tomb *tomb. response = make(chan types.Event, 1) for _, f := range files { log.Debugf("Loading '%s'", f) - if !strings.HasSuffix(f, ".yaml") { + if !strings.HasSuffix(f, ".yaml") && !strings.HasSuffix(f, ".yml") { log.Debugf("Skipping %s : not a yaml file", f) continue } diff --git a/pkg/parser/stage.go b/pkg/parser/stage.go index 77c6295a1..5c51cde95 100644 --- a/pkg/parser/stage.go +++ b/pkg/parser/stage.go @@ -43,7 +43,7 @@ func LoadStages(stageFiles []Stagefile, pctx *UnixParserCtx, ectx EnricherCtx) ( pctx.Stages = []string{} for _, stageFile := range stageFiles { - if !strings.HasSuffix(stageFile.Filename, ".yaml") { + if !strings.HasSuffix(stageFile.Filename, ".yaml") && !strings.HasSuffix(stageFile.Filename, ".yml") { log.Warningf("skip non yaml : %s", stageFile.Filename) continue }