I am working on window 2012 r2. Here I am deploying recipes directly from chef-workstation to chef-node without chef-server.
I am running below scenario:
- I have a one chef-workstation VM and 2 chef-client nodes (chef-client1 and chef-client2)
- I generated a cookbook with the name testcookbook, which has two recipes (recipe_1.rb and recipe_2.rb).
directory 'C:/test_1' do action :create end
directory 'C:/test' do action :create end
- Presently I am running individual chef command to deploy recipe on chef-client1 and chef-client2.
a. chef-run winrm://username@chef-client1 recipes\recipe_1.rb --password Password
b. chef-run winrm://username@chef-client2 recipes\recipe_2.rb --password Password
I want to deploy recipes with a single command.
What I need to change in my recipes, so they know which recipe is needed to install on which chef-clients?