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 almost 6 years ago. Updated about 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 (1 open0 closed)

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

Updated by Benoît PECCATTE about 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
Actions #2

Updated by Félix DALLIDET almost 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

Actions #3

Updated by Vincent MEMBRÉ about 1 year ago

  • Subtask deleted (#15049)
  • Priority changed from 59 to 0
Actions #4

Updated by Vincent MEMBRÉ about 1 year ago

  • Related to Bug #15049: Rudder dict variable call is non compatible with windows powershell one added
Actions #5

Updated by Vincent MEMBRÉ about 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

Actions #6

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF