Andrew Bogott has submitted this change and it was merged.

Change subject: labs firstboot.sh: Add instance hostname to /etc/hosts
......................................................................


labs firstboot.sh: Add instance hostname to /etc/hosts

Bug: T120830
Change-Id: I9cb20eff91682e5fc3a4029ce8eda33f41b82c49
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index f11a2e7..5d86d25 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -141,6 +141,8 @@
 options timeout:5 ndots:2
 EOF
 
+echo "$ip      $hostname $fqdn" >> /etc/hosts
+
 # This is only needed when running bootstrap-vz on
 # a puppetmaster::self instance, and even then
 # it isn't perfect
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index 79ad558..e110c01 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -83,6 +83,8 @@
 options timeout:5 ndots:2
 EOF
 
+echo "$ip      $hostname $fqdn" >> /etc/hosts
+
 /etc/init.d/nslcd restart
 /etc/init.d/nscd restart
 dpkg-reconfigure -fnoninteractive -pcritical openssh-server

-- 
To view, visit https://gerrit.wikimedia.org/r/311212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9cb20eff91682e5fc3a4029ce8eda33f41b82c49
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to