User story #8737
closedUser story #6733: Allow Node properties to be used in directives and ncf techniques
Expose node properties as a global CFEngine data variable
Files
Updated by Benoît PECCATTE over 8 years ago
Node specific values will be written in a specific directory and put on the agent.
In this directory, there will be many different JSON files.
Those files will be of the form { "namespace": { "key1": ..., "key2": ...} }
Where namespace can be "properties", "inventory", ...
First, a specific rudder bundle (let's call it property_reader) will read those files in a per file variable.
So property will exist under the form property_reader.myfile[thenamespace][key1]
Let's not document this form at first.
Then, this bundle will translate this content into the "node" namespace (or bundle).
They will then be accessible under the general form node.thenamespace[key1]
This will be the documented way to access them.
This is consistent with the node.env existing namespace.
This translation can only be done using a merging strategy, not defining one is equivalent to :
"for each namespace take the exact content of the last read file that contains it "
Updated by Vincent MEMBRÉ over 8 years ago
Properties are available for each nodes in: <inputs>/properties.d/properties.json
Updated by Benoît PECCATTE over 8 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
Updated by Vincent MEMBRÉ over 8 years ago
- File properties.json properties.json added
An example of generated file:
{ "properties":{ "env_type":"production", "shell":"/bin/sh", "utf-8 poetry":"ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ" } }
Updated by Benoît PECCATTE over 8 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/998
Updated by Benoît PECCATTE over 8 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-techniques|cba913e6e764444261f5022d4a795211ba492289.
Updated by Alexis Mousset over 8 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.12 and 3.2.5 which were released today.
- 3.1: Announce Changelog
- 3.2: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Nicolas CHARLES about 8 years ago
- Related to Bug #9087: Error on promises generation when there are no properties files added