Help with cloud init syntax for runcmd
I’m just getting started with cloud-config etc for setting up a droplet, and I’m just running into a slight issue with running commands.
I’m trying to run some commands which have characters that upset the YAML parser, for instance:
runcmd: - \curl -sSL https://get.rvm.io | bash -s stable
The cloud init logs are giving me an error for runcmd, I’m assuming because it’s incorrectly parsing characters like “:” etc.
What is the correct way to specify this kind of command? Can I just put quotes around part of it, or should I escape the special characters somehow?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×