Hi,
I believe:
https://github.com/cloudify-incubator/cloudify-utilities-plugin/blob/master/cloudify_cloudinit/__init__.py#L56`
f['content'] = '|\n' + new_content
Is incorrect and it should not include '|\n'.
I believe the intent was that
write-files:
content: |
string
would have been the result, but that is not what the code does. The code simply is prefixing the string with | as the first line. Simply by changing f['content'] = '|\n' + new_content to f['content'] = new_content should fix the issue in all cases as then the cloud-init write-file looks like this.
write-files:
contnet: "{\"parameter\": \"value\"}"
and this is also valid.
I changed the code on my system and tested it but only with using the jinja2 templating functionality.
Hi,
I believe:
https://github.com/cloudify-incubator/cloudify-utilities-plugin/blob/master/cloudify_cloudinit/__init__.py#L56`
f['content'] = '|\n' + new_contentIs incorrect and it should not include
'|\n'.I believe the intent was that
would have been the result, but that is not what the code does. The code simply is prefixing the string with
|as the first line. Simply by changingf['content'] = '|\n' + new_contenttof['content'] = new_contentshould fix the issue in all cases as then the cloud-init write-file looks like this.and this is also valid.
I changed the code on my system and tested it but only with using the jinja2 templating functionality.