Benoît PECCATTE wrote:
The technique would:
- take a template from shared-files
I am working on a technique taking a raw input template or a local template file to expand it on a given location
- put it in a standard place on the agent
Template files can be anywhere but the path asked for is relative to /var/rudder/configuration-repository/repository/shared-files/
- expand it with a given templating system
supporting Mustache and Jinja2
- change the file's permission
Change the permissions of the destination conf file generated
- have a post-modification hook
post-hook started when the generated file is different from what the expansion expected or when its permissions are changed
TODO:
Raise an error when the raw input exceed 16K char, make an option for the posthook to be persistant