Ask Your Question

Could not retrieve fact='ipaddress'

asked 2014-11-24 10:29:39 -0600

ohadb gravatar image


I recently had to reinstall my lab environment of puppet, and for some reason I get this message on my puppet nodes when running - "facter ipaddress"

I'm kinda new to puppet and I have no idea why that happen, last time I installed exactly the same and it didn't happen.

Here's is the full error message:

"Could not retrieve fact='ipaddress', resolution='<anonymous>': Could not execute 'host puppet-node1': command not found"


edit retag flag offensive close merge delete


Please provide links to the relevant code that generates this error. It looks like you might have a problem with the PATH variable in the environment that Puppet executes in.

GregLarkin gravatar imageGregLarkin ( 2014-11-25 00:20:20 -0600 )edit

Solved it, see below comment :)

ohadb gravatar imageohadb ( 2014-11-25 03:01:03 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-25 03:00:01 -0600

ohadb gravatar image

Well I solved it.

After looking at the ipaddress.rb which facter ipaddress calls to, on linux systems it tries to use ifconfig to get the ipaddress, after it does not succeed it will try to the host command.

on CentOS 7 ifconfig isn't available by default, so after installing net-tools, facter ipaddress works!

edit flag offensive delete link more


Good news, and I found that this has been fixed in Github: A future release of Facter should include the fix.

GregLarkin gravatar imageGregLarkin ( 2014-11-25 16:34:18 -0600 )edit

answered 2016-02-22 02:06:37 -0600

FranzCC gravatar image

i found this post and wanted to report a problem with the ipaddress fact when there are only ipv6 addresses.
I will file a bug report.
Also the error message is wrong.
Warning: Could not retrieve fact ipaddress

 Facter: custom fact "ipaddress" was not found.

ipaddress is a standard fact and no custom fact.

Rgds. Franz

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-11-24 10:29:39 -0600

Seen: 1,963 times

Last updated: Feb 22 '16