So the follow-up question: I created a plugins directory under my kitchen, and create a python script called get_host_ip.py (simply modify save_ip.py the examples directory). Now I ran fix node:my_node, a chef recipe ran but nothing output from the plugin I wrote. Here's my python plugin code:
import socket
from fabric.api import env
from littlechef import chef
def execute( node ):
"""
get an ipv4 by calling gethostbyname socket function
"""
hostname = node['hostname']
ipaddress = socket.gethostbyname( hostname )
print "node {0}, ipaddress {1}".format(hostname, ipaddress)
Anything wrong?