Actions
Bug #11613
closedgeneric_variable_definition inserts spaces in multi lined values
Pull Request:
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&",
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
Updated by Nicolas CHARLES about 7 years ago
Hi Janos
How can you multiline with this technique ?
Updated by Florian Heigl about 7 years ago
it is my understanding that this use was never indented.
now the question is if it would be possible to fix it to actually work, since it seems to be pretty close to working.
Updated by Janos Matya about 7 years ago
You just have to remove some spaces in front of the variable substitution of string template, the diff is basically about 6x [space]...
Updated by Nicolas CHARLES about 7 years ago
- Assignee set to Nicolas CHARLES
- Target version set to 3.1.24
Updated by Nicolas CHARLES about 7 years ago
- Status changed from New to In progress
Updated by Nicolas CHARLES about 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1212
Updated by Nicolas CHARLES about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|8c5ef9893287b0fde468803a958791d97b128949.
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released
Actions