Disable metadata in cloud-init config
Rather than deleting cloud-init, which is going to take longer, just disable ec2 metadata service. This will be a no-op on rackspace, which already does this. Change-Id: I5e8baee50800f7aae474288a914333c21466855a
This commit is contained in:
parent
6113b274e4
commit
fc554ab821
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash -xe
|
||||
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# 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
|
||||
datasource_list: [ ConfigDrive, None ]
|
||||
EOF
|
|
@ -114,6 +114,12 @@ echo 'nameserver 127.0.0.1' > /etc/resolv.conf
|
|||
exit 0
|
||||
EOF
|
||||
|
||||
# Make all cloud-init data sources match rackspace- only attempt to look
|
||||
# at ConfigDrive, not at metadata service
|
||||
sudo dd of=/etc/cloud/cloud.cfg.d/95_real_datasources.cfg <<EOF
|
||||
datasource_list: [ ConfigDrive, None ]
|
||||
EOF
|
||||
|
||||
sudo bash -c "echo 'include: /etc/unbound/forwarding.conf' >> /etc/unbound/unbound.conf"
|
||||
if [ -e /etc/init.d/unbound ] ; then
|
||||
sudo /etc/init.d/unbound restart
|
||||
|
|
Loading…
Reference in New Issue