Closed simpoir closed 4 years ago
lxd.profiles and lxd.containers don't properly escape config values.
pillars: lxd: profiles: local: my_profile: config: user.user-data: | #cloud-config ssh_authorized_keys: - "ssh-rsa AAAA..."
Then run state.highstate You'll get something like this
$ lxc profile show my_profile config: user.user-data: '#cloud-config\nssh_authorized_keys:\n - "ssh-rsa AAAA..."'
At first glance the config looks equivalent, but the escaped newlines are single-quoted, which means they will not get reinterpreted as newlines.
$ lxc profile show my_profile config: user.user-data: | #cloud-config ssh_authorized_keys: - "ssh-rsa AAAA..."
@simpoir Apologies for the delay and thanks for the contribution -- merged.
Bug details
lxd.profiles and lxd.containers don't properly escape config values.
Steps to reproduce the bug
Then run state.highstate You'll get something like this
At first glance the config looks equivalent, but the escaped newlines are single-quoted, which means they will not get reinterpreted as newlines.
Expected behaviour