Creating Task with TaskTypeManagement
-
Sorry to resurrect an old thread, but this just came up as something we need to be able to do (assign a custom boot task to hosts/groups of hosts). My understanding of the discussion below is that I should
- Enable plugins (
Fog Configuration->Fog Settings->Plugin System->PluginSys Enabled) - Activate the
tasktypeeditplugin - Edit
lib/hooks/boottask.hook.php, settingpublic $active = true;
Then I should be able to visit a
host page -> Basic Tasks -> Advanced Tasksand see ‘trusty-install’ as one of the options, but I don’t see any change to the menu. Have I missed something in the configuration? - Enable plugins (
-
@ianabc Have not had any time to look into this. Haven’t used that plugin in a long time and need to fiddle with it before I can give you any answer. Might be on the weekend.
-
@ianabc Had a bit more time to look into this now. You have missed one important point here. You need to manually create a new TaskType (web UI -> main menu -> TaskTypes -> Create New Task Type) and name that
trusty-install- exactly the name of the task that is used inlib/hooks/boottask.hook.php(line 73). As soon as you’ve created this task type you should see it inHost -> Basic Tasks(orHost -> Basic Tasks -> Advanced Tasksif you’ve checked the “Is Advanced” checkbox when creating it!).Now you can schedule this task type for any client or group and when it boots up it uses the arguments you set in
lib/hooks/boottask.hook.php(line 83 to 93). But only if the names match. So if you name your new taskbababooyou need to have that in yourlib/hooks/boottask.hook.phpline 73 as well. -
J JJ Fullmer referenced this topic on