Quote strings in bash populated YAML files.

Quoting is hard.  When writing strings into YAML files, wrap them in single quotes.  Also escape any embedded single quotes in those strings via a double signle quote ('').
I tried this myself and saw it removing the single quotes instead of doubling them, so I think you need `\'\'` on the right side of the substitution.

```shell
$ x="aaaa'bbbbb''cccc"
$ cat <<EOF
> node: '${x//\'/''}'
> EOF
node: 'aaaabbbbbcccc'
```

But:

```shell
$ cat <<EOF
node: '${x//\'/\'\'}'
EOF
node: 'aaaa''bbbbb''''cccc'
```

I'm assuming that doubling the internal quotes is the correct way to escape quotes in YAML and that was the effect you were looking for...

Also, are backslashes a problem in the YAML strings? What if the variable ends with a backslash and you end up with a `\'` terminating the string?

Cheers,
Filipe