Bug #5397
closed
The file_from_template generic method can not use mustache templates on pre-3.6 CFEngine
Added by Matthieu CERDA over 10 years ago.
Updated over 2 years ago.
Description
If the current ncf version is used on pre-3.6 CFEngine versions, it fails as the template_method attribute does not exist yet.
We should offer a way to offer this method without breaking old CFEngines!
Note, a workaround exists to solve the problem temporary until it is fixed upstream:
rm /usr/share/ncf/tree/30_generic_methods/file_from_template*
rm /var/rudder/ncf/common/30_generic_methods/file_from_template*
curl https://raw.githubusercontent.com/Normation/ncf/0efb9eb11191fdf31ebb6fba1f4c3a338d925e45/tree/30_generic_methods/file_from_template.cf > /usr/share/ncf/tree/30_generic_methods/file_from_template.cf
cp /usr/share/ncf/tree/30_generic_methods/file_from_template.cf /var/rudder/ncf/common/30_generic_methods/
- Status changed from 8 to In progress
- Target version set to 0.x
First define a new optional attribute to ncf bundles: @agent_version that defines the agent version compatible with this bundle. Currently only >=x.y will be supported.
Then create a shell script that list all .cf files compatible with a given cf-agent version.
This script will be used in body common control to include compatible methods only.
Finally rewrite file_from_template_* to separate 3.5 version and 3.6 version (with mustache suport) and add @agent_version to them.
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Jonathan CLARKE
- Pull Request set to https://github.com/Normation/ncf/pull/100
- Status changed from Pending technical review to Pending release
Applied in changeset commit:7ae0f6dbcf02c1205d82c2ead9f097e54213cbc7.
Applied in changeset commit:17161bad9c6c3fc4448fbf0c58830b29f788f4ee.
- Status changed from Pending release to Released
- Target version changed from 0.x to ncf-0.x
- Priority set to 0
- Project changed from 41 to Rudder
- Category set to Generic methods
Also available in: Atom
PDF