added functionality to trigger ansibles from cli

This commit is contained in:
2021-08-08 00:21:44 +04:00
parent af4b129bee
commit 5ff6702d9c
12 changed files with 354 additions and 17 deletions

View File

@@ -164,6 +164,23 @@ var CliAction = func(ctx *cli.Context) error {
client.PrettyPrint(trackedContainers)
}
//Executing plugin when the plugin flag is called
// --plugin
if ExecutePlugin != "" {
// The execute plugin requires the container ID provided when being executed
if ID != "" {
err := plugin.RunPluginCli(ExecutePlugin, ID)
if err != nil {
fmt.Println(err)
} else {
fmt.Println("Success")
}
} else {
fmt.Println("provide container ID")
}
}
return nil
}