测试厨房我想编写节点属性,并希望在节点搜索中搜索

时间:2017-03-01 04:28:43

标签: node.js chef test-kitchen

在测试厨房中,我正在尝试搜索节点,但它没有提供任何输出

食谱/测试/集成/节点

Json文件 {         " id":" hive服务器",         " chef_type":" node",         "环境":" dev",         " json_class":" Chef :: Node",         " run_list":[],         "自动":{                 "主机名":" test.net",                 " fqdn":" 127.0.0.1",                 " name":" test.net",                 " ipaddress":" 127.0.0.1",                 " node_zone":" green",                 "角色":[]

    },

    "attributes": {
            "hiveserver": "true"
    }

}

配方

  hiveNodes = search(:node, "hiveserver:true AND environment:node.environment AND node_color:node["node_color"])



#hiveserverList = ""
#hiveNodes.each |hnode| do
#    hiveserverList += hnode
#end



#file '/tmp/test.txt' do
#  content '#{hiveserverList}'
#end

0 个答案:

没有答案