13 Replies Latest reply on Oct 11, 2016 1:20 PM by Bill Robinson

    List all Templates in a Smart Group and get DB Key

    James Donohue



      Is there a method where I may automate using blcli, that will list every Component Template in a Smart Group?


      This Smart Group will change every 'Release cycle' and I have automation that can add a Template to a Discovery and Compliance job and need to come up with a process that:

      1. Get every Template contained in Template Smart Group
      2. Create a loop that gets the first Template in the Smart Group
      3. Get the DBKey of the Template by referencing the Smart Group
      4. blcli_execute ComplianceJob addSJobTemplate "$TEMPLATE_DBKEY"
      5. loop


      Not sure if the above can done or how to do it; any info is appreciated.