Ask Your Question
0

Cloudbase-Init is removing all line breaks

asked 2016-12-05 06:57:50 -0500

whenever i attach a script to a server using the --user-data parameter in combination with --config-drive True the script file on the server is without any line breaks:

#ps1_sysnative
$ErrorActionPreference = "Stop"

"$(Get-Date) - Test" | Out-File 'C:\test.log' -Append

will be

#ps1_sysnative$ErrorActionPreference = "Stop""$(Get-Date) - Test" | Out-File 'C:\test.log' -Append

on the server D:\openstack\latest\user-data. Obviously the script will not be executed, how can i fix this issue? is there any encoding I have to be aware?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-20 15:09:54 -0500

ader1990 gravatar image

Hello,

There shouldn't be any issues with the encoding, can you put the exact user data file online so that we can reproduce the problem?

Thank you, Adrian Vladu

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-12-05 06:57:50 -0500

Seen: 26 times

Last updated: Mar 20