It's been a long time since I've used cloud-init, but I believe that your
script needs to start with a bangline (#!/bin/sh) for cloud-init to
interpret it as an on-boot script.

Regardless, I think a better approach would be to use Ansible and the apt
module to ensure that the package is installed post-boot, not just running
a script on boot.

-Tim

On Mon, Jul 27, 2015 at 1:57 PM, Jon Hadfield <[email protected]> wrote:

> I had the same issue on Centos, i.e. I added a script and nothing
> happened. Not tried on Debian based distros, but I found building a base
> AMI with cloud-init installed and, in /etc/cloud/cloud.cfg set
> 'disable_root: false', solved it for me. Then launch an instance of that
> base AMI, setting the user-data.
> In my case it wasn't an ansible issue, but a limitation of the AMI I chose.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ed829261-5858-4457-b6f3-01ce4d2566e2%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ed829261-5858-4457-b6f3-01ce4d2566e2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH4wdVWJ4eOBvEjC%3DVMy-Z7WGpXFUZAz%2B%3Db-7yhpc%2BY%2BcjAY8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to