Skip to content

Commit 6a4223c

Browse files
authored
Merge pull request #10 from haccht/feature_add_commands_to_inventory
Add feature to append any commands to original commands.
2 parents 1aa835c + 984cda3 commit 6a4223c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

commando/inventory.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ func (app *appCfg) loadInventoryFromYAML(i *inventory) error {
2929
app.credentials = i.Credentials
3030
app.transports = i.Transports
3131

32+
cmds := strings.Split(app.commands, "::")
33+
34+
for _, device := range i.Devices {
35+
device.SendCommands = cmds
36+
}
37+
3238
return nil
3339
}
3440

0 commit comments

Comments
 (0)