#!/bin/bash if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then set -x fi set -eu set -o pipefail DIB_CLOUD_INIT_DATASOURCES=${DIB_CLOUD_INIT_DATASOURCES:-""} # NOTE(TheJulia): If your looking at slightly more exotic configuration, the # following links may be wortwhile to review. Specifically: ConfigDrive is just # initial datasource configuration, and fallback network configuration basically # always happens. Plus, cloud-init by default ignores other data in the # configuration drive unless "openstack" is referenced. :\ # https://cloudinit.readthedocs.io/en/latest/reference/datasources/configdrive.html # https://cloudinit.readthedocs.io/en/latest/reference/datasources/openstack.html#openstack-ironic-bare-metal if [ -z "$DIB_CLOUD_INIT_DATASOURCES" ] ; then echo "DIB_CLOUD_INIT_DATASOURCES must be set to a comma-separated list " echo "of cloud-init data sources you wish to use, ie 'Ec2, NoCloud, ConfigDrive'" exit 1 fi if [ -d /etc/cloud/cloud.cfg.d ]; then cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg < /etc/cloud/cloud.cfg.d/92-ec2-datasource.cfg < /etc/cloud/cloud.cfg.d/93-dib-cloud-init-disable-datasource-network-activation.cfg <