I'm using the chef-client cookbook to configure a machine as a chef client . How do I configure node attributes when this client is created ?
I do not want to do knife node edit . My aim is to set some node attributes when creating this node, probably by adding something to a JSON file.
UPDATE:
I am creating hundreds of nodes which will use this script (see the gist) to bootstrap chef-clients. Node_name which is in the script will be different for each node. Similarly I want to set a custom attribute to the node that will group them together.
Say for example I want to group all the nodes belonging to a particular project together. I was thinking I will add an attribute "project_id" to the Node. So that I can search later for all nodes belonging to a project. This is especially useful for deployments - while trying to find out all db_master roles / webserver roles / memcached roles belonging to a particular project .
So what I want to do is this : there should be some placeholder in the script (which you saw in the gist) where I can add custom attributes like project_id or whatever to the Node. Is that possible ?