File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ var embeddedRunbooks embed.FS
17
17
18
18
var runbooks map [string ]Runbook
19
19
20
+ var otherEmbeddedRunbooks []embed.FS
21
+
20
22
type Runbook struct {
21
23
22
24
// The name of the runbook
@@ -61,6 +63,13 @@ func Reset() {
61
63
62
64
func InitializeBuiltInRunbooks () {
63
65
LoadBuiltInRunbooks (embeddedRunbooks )
66
+
67
+ log .Tracef ("Processing other embedded runbooks" )
68
+
69
+ for _ , fs := range otherEmbeddedRunbooks {
70
+ LoadBuiltInRunbooks (fs )
71
+ }
72
+
64
73
env := config .GetEnv ()
65
74
if env .EPCC_RUNBOOK_DIRECTORY != "" {
66
75
if loadedRunbookCount := LoadRunbooksFromDirectory (env .EPCC_RUNBOOK_DIRECTORY ); loadedRunbookCount == 0 {
@@ -69,6 +78,10 @@ func InitializeBuiltInRunbooks() {
69
78
}
70
79
}
71
80
81
+ func AddOtherEmbeddedRunbooks (fs embed.FS ) {
82
+ otherEmbeddedRunbooks = append (otherEmbeddedRunbooks , fs )
83
+ }
84
+
72
85
func LoadRunbooksFromDirectory (dir string ) uint32 {
73
86
74
87
entries , err := os .ReadDir (dir )
You can’t perform that action at this time.
0 commit comments