Client Management Suite

 View Only
  • 1.  Run tasks based on computer name or OS.

    Posted Jan 28, 2015 01:15 PM

    I have a multiple sets of server with both RedHat and Windows. We are using Altiris to patch these systems and currenlty run two jobs. One is linux based patches and scripts and the other is the windows patches and fixes.

    Is there a way to combine these jobs and have altiris run said job based on the systems OS or computer name?

    Also the issue is once all systems are patches we have to boot the system in a specific order. We are looking to create a job that would run again the group of server and run each reboot task against a specific computer name.

    Any advice would be great.



  • 2.  RE: Run tasks based on computer name or OS.
    Best Answer

    Broadcom Employee
    Posted Jan 29, 2015 05:01 AM

    Hi,

    Regarding: "Is there a way to combine these jobs and have altiris run said job based on the systems OS or computer name?".

    This might be possible if you create main job, add condition to evaluate script output for the computer name or OS name and add condition to run Linux or Windows job, depending or output results evaluation. For example:

    1. Task to return computer name (default token %COMPNAME% used in this task)

    01-task.png

    2. Condition to evaluate script output:

    02-task.png

    3. Main job execution results:

    03-task.png

    HTH,

    Alex.



  • 3.  RE: Run tasks based on computer name or OS.

    Posted Jan 29, 2015 04:46 PM

    Thanks, this lead us in the correct direction. The only change that we had to make, was creating a task that runs on server instead of a client task.

    With the client task set to command script the job would fail on linux with a 127 error. Also if we set it to Unix script it would fail on windows with a 127 error.

    Now that we have that working we created a job that would patch both linux and windows then reboot them in the correct order. This job is a bit long with the conditional statements. Since once a month we will neeed to run the same job just with different patch package, is there a way to create a template job with all the conditionals and reboots, and just having to add in the patch jobs?

     

    Thanks again.



  • 4.  RE: Run tasks based on computer name or OS.
    Best Answer

    Broadcom Employee
    Posted Jan 30, 2015 01:53 AM

    Hi,

    The easiest way: create a job with not yet added patch jobs, name it like "Job_template". If new patch has arrived then you clone initial job using right-click menu, add patch-specific jobs to cloned job and run it. But in that scenario all tasks from the "template job" will be cloned each time and it might be a bit messy after a while.

    Alternatively, you may create folder, name it like "Job Template", put all the tasks and jobs used in template job to this folder and export the whole folder to xml (right-click -> export):

    01-jobtemplate.png

     

    When new patch is available then you could create new folder and import exported xml into it - that will move all the tasks and template job itself to that folder:

    02-jobtemplate.png

    Now you will add new patch-specific job to the template job and run it:

    03-jobtemplate.png

    Probably the second way is more convenient. And it also will create an xml file with the prepared job that might be backed-up to some safe location or can be used to import he job to the different NS.

    HTH,

    Alex.



  • 5.  RE: Run tasks based on computer name or OS.

    Posted Jan 30, 2015 09:40 AM

    The first method is what were playing with. And yes for our application it would get messy as it creates the duplicate files with the _0 or _1.

    With exporting the entire folder it just moves the jobs and tasks to the new folder. The issue with this is we need to keep each montly job since we have to do restores and repatch.

    Is there anyother options?



  • 6.  RE: Run tasks based on computer name or OS.
    Best Answer

    Broadcom Employee
    Posted Jan 30, 2015 10:22 AM

    Hi,

    There is a pointfix (controllable by registry key) for the 7.1.SP2 version that allows to create copies of the tasks when importing from xml in the import destination location. Same functionality included to the not-yet-released ITMS version. If you are running 7.1.SP2 then please contact our support for the mentioned pointfix (the number of pointfix is "PF_ 2866656"). If you are running 7.5 then you also may ask support for the pointfix or wait for the next version - after upgrade option to copy imported tasks instead of moving them will be available once the proper registry key is specified.

    Thank you,

    Alex.