Bug #12914
closedWindows agent windows syntax to use variable is different than the linux one
Description
To access a dict variable or a node property in powershell in a string we need to use:
$(${prefix.variable}['key']) $(${node}['properties']['key'])
And on the linux agent we only use:
${prefix.variable[key]}
The syntax is quite different, moreover, the windows expression is prohibited in cf_engine and is not accepted by the technique editor.
We should be able to use the variables and node properties in the windows agent.
Documentation should be added, the "node properties" json variable should be changed in order to let the node properties be accessible with the syntax:
$(${node.properties}['key'])
This can be done by renaming the variable which holds the node properties content and removing the "first step" of the json file associated (the "properties" step).
The Rudder server should let the user enter a syntax like $(${node}['properties']['key']) or parse the classic linux syntax and change it when generating policies for windows agent...
Updated by Benoît PECCATTE over 5 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | Technique editor and level 1 Techniques
- Priority changed from 0 to 61
Updated by Félix DALLIDET over 5 years ago
- Priority changed from 61 to 59
This is now almost supported since the call to properties or variable is extended in powershell by wrapping the rudder variable all under a $().
Though, we are missing a quote wrapping the key used in the dict part. See #15049
Updated by Vincent MEMBRÉ over 1 year ago
- Subtask deleted (
#15049) - Priority changed from 59 to 0
Updated by Vincent MEMBRÉ over 1 year ago
- Related to Bug #15049: Rudder dict variable call is non compatible with windows powershell one added
Updated by Vincent MEMBRÉ over 1 year ago
- Regression set to No
I reject this one, because comment abose state that it's almost ok apart a case that will be treated in #15049