- From: Leonard Messier <
>
- To:
- Subject: [chef] user handling logic
- Date: Fri, 7 Feb 2014 12:45:17 +0100
Hi there,
I'm facing an issue related to the way I'm supposed to handle users on the machine I'm provisioning with chef-solo.
Since it is a physical machine, the user I'm using was created during installation. I would like to go on using this user.
In the past, I used to launch chef-solo with sudo because it was simpler to achieve what I wanted to do.
Since I've started to include rspec testing in my process, I can't use sudo directly anymore : I relied on "#{ENV['SUDO_USER']}" in my recipes to set the proper user and group, which is not available anymore with rspec and I don't think it's a good idea to launch rspec as sudo.
Now, I'm trying to find a way to handle this logically. Obviously, I need my user to have sudo access. My first move was to include the sudo community cookbook. However, i'm kind of stuck here because the chef run needs to have sudo privileges to create the sudoers file.
Am I supposed to have a one item run list that does this small step, launching chef-solo as sudo ?
- [chef] user handling logic, Leonard Messier, 02/07/2014
Archive powered by MHonArc 2.6.16.