ryanuber / puppet-packagelist

Dynamically create package resources from lists
MIT License
6 stars 4 forks source link

Allow use of files from puppetmaster #5

Open ryanuber opened 10 years ago

ryanuber commented 10 years ago

Currently in an agent-master setup, packagelist will read the packagelist file from the disk of the agent. While this does technically work, a nicer solution would be to read the packagelist file off of the disk of the master, so that you could do something like:

packagelist { "/etc/puppet/packagelists/${hostname}.lst": }

This would also allow one to de-duplicate packagelists for common roles, say like:

pacakgelist { [
    "/etc/puppet/pacakgelists/base-os.lst",
    "/etc/puppet/packagelists/webserver.lst",
    "/etc/puppet/pacakgelists/app.lst"
]: }

This only affects file-based packagelists. Packagelists can also be loaded using hiera data or any variable for that matter by passing the packages => ... option. Nonetheless, reading a packagelist file off of the agent's disk doesn't feel right.