On Saturday, November 16, 2013 at 4:01 PM, Steve Hummingbird wrote:
I am testing a cookbook using vagrant and chef 11.8.0This is the relevant part of my recipe:Chef::Log.info("creating log dir: " + File.expand_path("..", node['mongodb']['config']['logpath']) + " for user: " + node['mongodb']['user'])directory File.expand_path("..", node['mongodb']['config']['logpath']) doowner node['mongodb']['user']group 'root'mode "0755"action :createendwhich should create a directory, which belongs to the mongodb user.This is the output if I run 'vagrant up'[2013-11-16T23:48:29+00:00] INFO: creating log dir: /logs/mongodb for user: mongodb[2013-11-16T23:48:53+00:00] INFO: directory[/logs/mongodb] created directory /logs/mongodb[2013-11-16T23:48:53+00:00] INFO: directory[/logs/mongodb] group changed to 0[2013-11-16T23:48:53+00:00] INFO: directory[/logs/mongodb] mode changed to 755This is the output if I run 'vagrant provision' after that run:[2013-11-16T23:53:18+00:00] INFO: directory[/logs/mongodb] owner changed to 104As you can see, it needs the second run to set the owner of the directory correctly.Is there anything wrong with my approach, or might this be a bug?Thanks,Steve
Archive powered by MHonArc 2.6.16.