From: Steven Dake Date: Thu, 12 Apr 2012 20:33:27 +0000 (-0700) Subject: Install cloudinit specific files that are loaded into the mime userdata X-Git-Tag: 2014.1~2040^2~5 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=797ea880d982e0f25b5c18f3689da0a994658c05;p=openstack-build%2Fheat-build.git Install cloudinit specific files that are loaded into the mime userdata Partially fixes Issue #48 Signed-off-by: Steven Dake --- diff --git a/MANIFEST.in b/MANIFEST.in index 1b20be51..1f41d535 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,6 +16,8 @@ include heat/jeos/F17-x86_64-cfntools-jeos.tdl include heat/cfntools/cfn-init include heat/cfntools/cfn-hup include heat/cfntools/cfn-signal +include heat/cloudinit/config +include heat/cloudinit/part-handler.py include heat/db/sqlalchemy/migrate_repo/migrate.cfg graft etc graft docs diff --git a/heat/cloudinit/config b/heat/cloudinit/config new file mode 100644 index 00000000..494f9d83 --- /dev/null +++ b/heat/cloudinit/config @@ -0,0 +1,9 @@ +#cloud-config +cloud_config_modules: + - locale + - scripts_user + - set_hostname + - ssh + - timezone + - update_etc_hosts + - update_hostname diff --git a/heat/cloudinit/part-handler.py b/heat/cloudinit/part-handler.py new file mode 100644 index 00000000..6dfc89b2 --- /dev/null +++ b/heat/cloudinit/part-handler.py @@ -0,0 +1,14 @@ +#part-handler +def list_types(): + return(["text/x-cfninitdata"]) + +def handle_part(data,ctype,filename,payload): + if ctype == "__begin__": + return + if ctype == "__end__": + return + + if ctype == 'text/x-cfninitdata': + f = open('/var/lib/cloud/data/%s' % filename, 'w') + f.write(payload) + f.close()