Please review pull request #86: (maint - 11386 / 11310) Fix for ipv6 cruft from ip opened by (mykhyggz)

Description:

Test to put hostname in /etc/hosts (setup/early/05...) was breaking due to ipv6 data showing up (we assume from DHCP). Minor addition of head -1. Tested on several (but not all) platforms.

  • Opened: Wed Dec 14 23:09:55 UTC 2011
  • Based on: puppetlabs:master (9cf416820b19a91a47a29ff66665a93b907e698b)
  • Requested merge: mykhyggz:ipv6_host_error (831fe50fb5406398ee89cb5976ea94bf1e4c76c9)

Diff follows:

diff --git a/setup/early/05-add_master_etc_hosts.rb b/setup/early/05-add_master_etc_hosts.rb
index 3320787..98e54c9 100644
--- a/setup/early/05-add_master_etc_hosts.rb
+++ b/setup/early/05-add_master_etc_hosts.rb
@@ -1,7 +1,7 @@
 test_name "Add Master entry to /etc/hosts"
 
 step "Get ip address of Master #{master}"
-on(master,"ip a|awk '/g/{print$2}' | cut -d/ -f1")
+on(master,"ip a | awk '/g/{print$2}' | head -1 | cut -d/ -f1")
 ip=stdout.chomp
 step "Update /etc/host on #{master}"
 on(master,"echo \"#{ip} #{master}\" >> /etc/hosts")

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to