I am writing a cookbook which will be run on Ubuntu. It will create a directory in home of the default user.
directory "/home/<default-user>/my-directory" do
owner <default-user>
end
The problem is, this default user is different across environments:
- It is vagrant when running on virtual machine using Vagrant.
- And it is ubuntu when running on EC2 instance.
What is a good practice to solve this kind of problem? And how to do it?
Thank you!