Don't disable cloud-init if it is not installed

When we're building nodepool images on top of minimal elements, there
will be no cloud-init, and therefore no need to disable cloud-init
datasources. In fact, trying to do so will be an error.

Change-Id: I98887c43566e07f2be9d2dc5fae6538078c7348e
This commit is contained in:
Monty Taylor
2015-05-10 12:57:09 -04:00
parent e60dc2a3c1
commit 449d432feb

View File

@ -13,7 +13,10 @@
# implied.
# Make all cloud-init data sources match rackspace- only attempt to look
# at ConfigDrive, not at metadata service
dd of=/etc/cloud/cloud.cfg.d/95_real_datasources.cfg <<EOF
# at ConfigDrive, not at metadata service. This is not needed if there
# is no cloud-init
if [ -d /etc/cloud/cloud.cfg.d ] ; then
dd of=/etc/cloud/cloud.cfg.d/95_real_datasources.cfg <<EOF
datasource_list: [ ConfigDrive, None ]
EOF
fi