Best method to get external data source into Puppet
We need to query an external database that is the authoritative data source for one of our modules. The options we have come up with so far are:
- Create a custom function in lib/puppet/parser/functions that queries the external database and returns the data. One concern with this method is what will happen if the datasource is not available.
- Query the database from within the erb template within a block of ruby code. This doesn't feel right and would result in more connections than necessary as the module has around 10 templates.
- Create a custom ENC script ...