Has anyone noticed in Chef 12 the following scenario?
nodes = search(:node, "hostname:*)
returns duplicates of the last host added.
So any cookbook which then uses the nodes variable gets a duplicate.
That’s in a ruby recipe and likewise with the cli:
knife search “hostname:*” -c /etc/chef/client.rb
also showing a duplicate of the last returned node.
If you knife node delete and knife client delete the duplicate,
the next higher node is then listed as duplicated by the search() query.