Unable to specify embedded newline in nova_vendor_data_overrides
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
High
|
Unassigned |
Bug Description
I'm trying to configure static vendor data in nova-api-metadata so we can automatically register instances with Ubuntu Pro on boot. The process works when I manually create `/etc/nova/
```
# cat /etc/nova/
{"cloud-init": "#cloud-
```
However, I'm unable to create the same content using the `nova_vendor_
I can get close if I specify the string value in single-quotes:
```
nova_vendor_
cloud-init: '#cloud-
```
but the rendered JSON includes an extraneous backslash character for each newline:
```
# cat /etc/nova/
{"cloud-init": "#cloud-
```
i.e. '\\n` instead of '\n'
Perhaps this is just the natural consequence of converting YAML strings containing embedded newlines to JSON. If so, I'm hoping that someone has found an alternate way to achieve this and can offer a working example.
Cheers,
/rjg
I think it's a valid bug.
Logic which leads to the result is part of config_template module: /opendev. org/openstack/ ansible- config_ template/ src/branch/ master/ plugins/ action/ config_ template. py#L613- L619
https:/
So far I can't tell why it's done this way and what a good usecase it's covering.