Reputation: 324
We have a ruby fog application which creates instances in AWS and we have a cookbook which installs and configures a service and creates the users using chef data bags.
For now we are creating the data bags and role files manually and we want to automate this with our ruby application which creates instances, installs and configures chef client and runs the cookbook and I don't to use knife commands.
what is the best way to create the data bags and role files after the instance is created?
Upvotes: 1
Views: 155
Reputation: 54211
Use the chef-api gem. It has examples on how to do this if you poke around a bit but it's pretty much what you would expect.
Upvotes: 1