11 Replies Latest reply on Mar 10, 2013 6:58 PM by Bill Robinson

    Dynamically add server to patching/remediation job on blcli

      Hi everyone,


      I'm trying to script my way through Blade-Logic-Patches right now. The situation's the following:


      I have a lot of systems, which have to be patched. Some SLES, some RHEL and some Win2003/Win2008. I cannot patch them alltogether, because there are strict rules on the order in which they have to be rebooted (dependencies of different applications, databases). The order is already scripted via third party software.


      I have created patch catalogues for Windows, RHEL and SLES and created patching-jobs for the linux-os's and analyse-jobs for the Windows-os's, without adding targets.


      What I intend to do is to add the target server (one at a time) to the Job, execute the job with the target and afterwards remove the target. As an alternative, I could use some kind of parameter of the execution-call. Ihave searched the blcli help that ships with the AC, but find nothing that proved usefull.


      I thought to do (relevant part only) something like that:


      SERVER_KEY=`blcli -v BladeLogic_Testing -r BLAdmins Server getServerDBKeyByName "$host"`

      JOB_KEY=`blcli -v BladeLogic_Testing -r BLAdmins PatchingJob getDBKeyByGroupAndName "/TDS-ITsec Jobs" "RHEL-2013-01"`

      blcli -v BladeLogic_Testing -r BLAdmins PatchingJob addServerToJob $host $SERVER_KEY $JOB_KEY

      blcli -v BladeLogic_Testing -r BLAdmins PatchingJob executeJobAndWait $JOB_KEY



      So my question is, is it possible to do what I intend to do? If so, what's the best way to complete this task? And, more important, if not, how could I achieve the same result in another way?



      Jascha Sticher