Project

General

Profile

Actions

Bug #12914

closed

Windows agent windows syntax to use variable is different than the linux one

Added by Félix DALLIDET over 6 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
-
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
0
Name check:
Fix check:
Regression:
No

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...


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #15049: Rudder dict variable call is non compatible with windows powershell one ResolvedActions
Actions

Also available in: Atom PDF