I'd suggest two options: 1) Don't install all RPMs from a directory, but instead create a yum repository, and use packages: promises to handle the installation of the packages, including any dependencies that may be required. You can store the list of packages you want installed in an slist, and iterate over that.
2) Generate an slist via a module, or perhaps clever use of execresult() and and possibly plitstring() to get a directory listing, and break it into an slist. You can then pass that to a direct call to rpm or yum with each package installed separately (i.e. one call to yum/rpm for each package), or in bulk (i.e. rpm -ivh pkg1.rpm pkg2.rpm etc...). You could also use a module to generate a list of packages, and pass that to the packages: promise as well. On Thu, Oct 13, 2011 at 06:59:15PM -0400, [email protected] wrote: >Forum: CFEngine Help >Subject: how to install more than many rpm's from a directory >Author: pamelas >Link to topic: https://cfengine.com/forum/read.php?3,23746,23746#msg-23746 > >I'm currently trying to install many rpms (I would like to setup the names >using a wildcard) from a specified directory located on my client. I'm >successful at installing only 1 rpm with the specified name listed in the >package promise type in my policy file. > >But can't seem to find any documentation on how to configure Cfengine to >install more than 1 rpm with unknown names. >We would like to have cfengine install up to 50 packages for our client. > >What should I add to the packages: promise type to indicate the rpms that I >need to install. And also how to specify where I want the directory of Repos >to be used. > > >Thanks so much! >Pam > >_______________________________________________ >Help-cfengine mailing list >[email protected] >https://cfengine.org/mailman/listinfo/help-cfengine -- Jesse Becker NHGRI Linux support (Digicon Contractor) _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
