Browse Source

no message

Brielle Bruns 9 months ago
parent
commit
daa8634170
3 changed files with 16 additions and 6 deletions
  1. 0
    1
      meta-data
  2. 14
    3
      user-data
  3. 2
    2
      virt-install-cloud.sh

+ 0
- 1
meta-data View File

@@ -1,5 +1,4 @@
1 1
 instance-id: iid-%GUEST_NAME%;
2 2
 hostname: %GUEST_NAME%
3 3
 local-hostname: %GUEST_NAME%
4
-manage_resolv_conf: true
5 4
 dsmode: local

+ 14
- 3
user-data View File

@@ -11,13 +11,24 @@ users:
11 11
 
12 12
 ssh_pwauth: True
13 13
 package_upgrade: true
14
+
14 15
 apt_upgrade: false
15
-#manage_etc_hosts: localhost
16
+
16 17
 manage_etc_hosts: true
18
+
17 19
 fqdn: %FQDN%
20
+
18 21
 timezone: US/Mountain
19
-datasource_list:
20
- - ConfigDrive
22
+
23
+manage_resolv_conf: true
24
+resolv_conf:
25
+  nameservers: ['%NAMESERVER1%', '%NAMESERVER2%']
26
+  searchdomains:
27
+    - %DOMAIN%
28
+  domain: %DOMAIN%
29
+
30
+#datasource_list:
31
+# - ConfigDrive
21 32
 
22 33
 packages:
23 34
   - openssh-server

+ 2
- 2
virt-install-cloud.sh View File

@@ -118,7 +118,7 @@ arch="amd64"
118 118
 source distros
119 119
 
120 120
 sed -e "s/%GUEST_NAME%/${hostname}/" ${WORKING_DIR}/meta-data > ${WORKING_DIR}/output/meta-data
121
-sed -e "s/%FQDN%/${hostname}.${domain}/" ${WORKING_DIR}/user-data > ${WORKING_DIR}/output/user-data
121
+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
122 122
 
123 123
 if [[ ${virt_netinfo_type} == "eni" ]]; then
124 124
 	cat ${WORKING_DIR}/network/legacy-eni >> ${WORKING_DIR}/output/meta-data
@@ -230,6 +230,6 @@ virt-install \
230 230
 sleep 5
231 231
 
232 232
 virsh change-media ${hostname}.${domain} vdb --eject --config
233
-  
233
+
234 234
 # cleanup
235 235
 rm configuration.iso output/meta-data output/user-data output/network-config

Loading…
Cancel
Save