From daa86341709352854b4969f498313786e78f0bc0 Mon Sep 17 00:00:00 2001 From: Brielle Bruns Date: Tue, 15 May 2018 14:07:32 -0600 Subject: [PATCH] no message --- meta-data | 1 - user-data | 17 ++++++++++++++--- virt-install-cloud.sh | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meta-data b/meta-data index f28fdde..3bce72b 100644 --- a/meta-data +++ b/meta-data @@ -1,5 +1,4 @@ instance-id: iid-%GUEST_NAME%; hostname: %GUEST_NAME% local-hostname: %GUEST_NAME% -manage_resolv_conf: true dsmode: local \ No newline at end of file diff --git a/user-data b/user-data index 354c31f..46d40ce 100644 --- a/user-data +++ b/user-data @@ -11,13 +11,24 @@ users: ssh_pwauth: True package_upgrade: true + apt_upgrade: false -#manage_etc_hosts: localhost + manage_etc_hosts: true + fqdn: %FQDN% + timezone: US/Mountain -datasource_list: - - ConfigDrive + +manage_resolv_conf: true +resolv_conf: + nameservers: ['%NAMESERVER1%', '%NAMESERVER2%'] + searchdomains: + - %DOMAIN% + domain: %DOMAIN% + +#datasource_list: +# - ConfigDrive packages: - openssh-server diff --git a/virt-install-cloud.sh b/virt-install-cloud.sh index 186896a..d60674f 100755 --- a/virt-install-cloud.sh +++ b/virt-install-cloud.sh @@ -118,7 +118,7 @@ arch="amd64" source distros sed -e "s/%GUEST_NAME%/${hostname}/" ${WORKING_DIR}/meta-data > ${WORKING_DIR}/output/meta-data -sed -e "s/%FQDN%/${hostname}.${domain}/" ${WORKING_DIR}/user-data > ${WORKING_DIR}/output/user-data +sed -e "s/%FQDN%/${hostname}.${domain}/" -e "s/%DOMAIN%/${domain}/" -e "s/%NAMESERVER1%/${nameserver1}/" -e "s/%NAMESERVER2%/${nameserver2}/" ${WORKING_DIR}/user-data > ${WORKING_DIR}/output/user-data if [[ ${virt_netinfo_type} == "eni" ]]; then cat ${WORKING_DIR}/network/legacy-eni >> ${WORKING_DIR}/output/meta-data @@ -230,6 +230,6 @@ virt-install \ sleep 5 virsh change-media ${hostname}.${domain} vdb --eject --config - + # cleanup rm configuration.iso output/meta-data output/user-data output/network-config