cloud-config should support some method for passing scripts
Asked by
Scott Moser
Binary package hint: cloud-init
Gustavo asked if there was a way to put scripts to run into cloud-config. At the current point there is no easy way to get the same functionality entirely within cloud-config of user-data like:
#!/bin/sh
echo hello world
There are 2 ways to accomplish this, but possibly less than ideal:
a.) use multi-part mime, one section for cloud-config, one for #!/bin/sh
b.) use runcmd with 'sh -c':
runcmd:
- [ sh, -c, echo "=========hello world'=========" ]
-
- sh
- -c
- |
#!/bin/sh
echo hi
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Scott Moser
- Solved:
- Last query:
- Last reply:
This question was originally filed as bug #541907.
To post a message you must log in.