Ask Your Question

Preventing UserData Script Execution In Cloud-Init

asked 2017-03-30 18:09:49 -0500

thel1zardking gravatar image


I am attempting to create a secured image that doesn't allow the execution of UserData scripts. However I have the need to execute a local script (/etc/cloud/scripts) embedded within the image for bootstrapping purposes. It appears the same Cloud-Init module "scripts-user" is responsible for the execution of both.

I have attempted to use other means to execute the local script, like using the "runcmd" module however I haven't had any luck. I'd prefer to disable this functionality in the image rather than the cloud. Any information would be greatly appreciated.

Cheers! -LzK

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-03-30 18:37:54 -0500

thel1zardking gravatar image

I figured my own issues out. The local script needed to be moved to (/var/lib/cloud/scripts/per-boot) in conjunction with the "scripts-per-boot" module. Together with the removal of the "scripts-user" module I was able to get the configuration I was after.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2017-03-30 18:09:49 -0500

Seen: 242 times

Last updated: Mar 30 '17