Managing Dynamic File Generation
I am running puppet 3.3.2. I am trying to understand what would be the best solution to generate a file dynamically from code blocks within a manifest file. As an example to better illustrate the ask would be /etc/hosts. I have the below file as a generic template however I want to use that as a template for all my hosts, and if I wanted to add an additional entry I would inherit the module and just append my new host line. In essence I want to be able to dynamically manage the file on each run, so if I remove an entry from my manifest it also formats accordingly.
#/etc/hosts # hosts entry added by post kickstart 126.96.36.199 pupmaster-bob-01.helloworld.com pupmaster-bob-01
Want to add line:
188.8.131.52 pupmaster-suzy-01.helloworld.com pupmaster-suzy-01