[chef] Getting my node's ip address


Chronological Thread 
  • From: Geoff Meakin Acid < >
  • To:
  • Subject: [chef] Getting my node's ip address
  • Date: Mon, 19 Sep 2011 21:40:44 +0100

Can anyone tell me why this doesnt work?

somenode:~# shef -z
loading configuration: /etc/chef/client.rb
Session type: client
Loading… (etc. etc.)
done.

Ohai2u 

chef > node.automatic_attrs['network']   
 => {"interfaces"=>{}} 
chef > node.automatic_attrs['ipaddress']
 => nil   


Yet it clearly has interfaces:

somenode:~# /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:xxx.xx.x.xx  Bcast:xxx.xx.x.xxx  Mask:255.255.255.128
        (etc.)


Thanks


--

Geoff





Archive powered by MHonArc 2.6.16.

§