Project

General

Profile

Actions

Bug #11613

closed

generic_variable_definition inserts spaces in multi lined values

Added by Janos Mattyasovszky over 6 years ago. Updated over 6 years ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
52
Name check:
Fix check:
Regression:

Description

If you have a generic_variable_definition value that consists of multiple lines, due to how the .st file is built up, it inserts spaces as of the second line, indenting the content.

    &GENERIC_VARIABLE_NAME, GENERIC_VARIABLE_CONTENT:{name, content |"&name&" string => "&content&",

https://github.com/Normation/rudder-techniques/blob/91dc9d9e48d300afd76edcf37a961fa7069a3d5a/techniques/systemSettings/misc/genericVariableDefinition/2.0/genericVariableDefinition.st#L24

Resulting generated code example:

    "var_authorized_key_final" string => "${generic_variable_definition.auth_key_1}
    ${generic_variable_definition.auth_key_2}",

That results in a content, when written to a file:

ssh-rsa AAAAB3NzaC1yc2EAAA
    ssh-rsa AAAAB3NzaC1yc2


Subtasks 1 (0 open1 closed)

Bug #11629: Same as parent ticket for technique "Variables (any)"ReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF