Ask Your Question
0

Preventing UserData Script Execution In Cloud-Init

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

thel1zardking gravatar image

Hello,

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
0

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

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

Seen: 184 times

Last updated: Mar 30 '17