• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Creating Task with TaskTypeManagement

Scheduled Pinned Locked Moved Solved
General Problems
5
23
5.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    ianabc Testers
    last edited by May 7, 2019, 1:38 AM

    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

    1. Enable plugins (Fog Configuration->Fog Settings->Plugin System->PluginSys Enabled)
    2. Activate the tasktypeedit plugin
    3. Edit lib/hooks/boottask.hook.php, setting public $active = true;

    Then I should be able to visit a host page -> Basic Tasks -> Advanced Tasks and 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?

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by May 9, 2019, 8:32 PM

      @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.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by May 12, 2019, 12:26 PM

        @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 in lib/hooks/boottask.hook.php (line 73). As soon as you’ve created this task type you should see it in Host -> Basic Tasks (or Host -> Basic Tasks -> Advanced Tasks if 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 task bababoo you need to have that in your lib/hooks/boottask.hook.php line 73 as well.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • J JJ Fullmer referenced this topic on Nov 22, 2023, 2:20 PM
        • 1
        • 2
        • 2 / 2
        2 / 2
        • First post
          22/23
          Last post

        221

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project