hello, not sure who is creating the some user
if the user exist, how the permission looks like? Can you test ansible shared folder off , and then one at the time? I wonder who is changing that to root. you can mount a shared folder using the uid/gid, that will make /home/someuser/techdocs to be set for that uid:gid from here: http://stackoverflow.com/questions/17966365/vagrant-chicken-and-egg-shared-folder-with-uid-apache-user config.vm.synced_folder "foo", "/var/www/foo", id: "foo", :mount_options => ["uid=510,gid=510"] On Sun, May 17, 2015 at 2:04 PM, jean.jordaan <[email protected]> wrote: > Hi there > > In my playbook I have: > > - name: Setup someuser user > user: name=someuser shell=/bin/bash > > Now I observe this from within the VM: > > someuser@precise32:~/techdocs$ ls -lhd /home/someuser/ > drwxr-xr-x 3 root root 4.0K May 14 07:15 /home/someuser/ > > How do I end up with a root-owned home directory? > > I suspect this is what happened: I have this in my `Vagrantfile`: > > config.vm.synced_folder "./techdocs", "/home/someuser/techdocs", create: > true, owner: "someuser", group: "someuser" > > This executed before the provisioning had completed, and raised an error > that `someuser` did not exist. > After provisioning completed, it does not fail, but I'm stuck with a > root-owned homedir. > Is there a way to avoid this? Ansible is supposed to facilitate repeatable > deploys, but in this case one would have to deploy with a `Vagrantfile` > without synced_folder, and then re-deploy with a `Vagrantfile` including the > synced folder. That's rather awkward. > > Regards, > Jean > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
