title: CFENGINE: policy to perform bunch of commands on bunch of packages
body: <p>I have to create one CFENGINE 3 Policy which should take input from defined input list and then want to perform some bunch of commands on that set one by one.</p>
  
  <p>For Eg:</p>
  
  <p>For only one Package here I have the example:</p>
  
  <pre><code>bundle agent test_tester_install
  
  {
  
  commands:
  
      "/usr/bin/wget  http://something.example.com/perl-modules/Test-Tester-0.104.tar.gz;
      /usr/bin/gunzip Test-Tester-0.104.tar.gz;
      tar -xf Test-Tester-0.104.tar;
      cd Test-Tester-0.104;
      /usr/bin/perl Makefile.PL;
      /usr/bin/make;
      /usr/bin/make install"
  
  
      contain =&gt;  standard,
              classes =&gt; satisfied("Test-Tester Installed");
       }
  body contain standard
  
  {
  
      useshell =&gt; "true";
      exec_owner =&gt; "root";
  }
  
  body classes satisfied(new_class)
  
  
  {
  
      promise_repaired =&gt; { "$(new_class)" };
  }
  </code></pre>
  
  <p>But I am not sure that how to do it if I want to do the same for 100 packages. I think "slist would do this but how exactly i need to draft that policy i am not sure"</p>
  
  <p>This is very similar to applying "for" loop in bash shell where we iterate input one by one and perform some operations </p>
  
  <p>Experts Please help</p>