-
Notifications
You must be signed in to change notification settings - Fork 1
ZRAD-127: provision gitconfig into the vm #58
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this! It's simple and obvious what the Vagrantfile
is doing -- which I think is better than hiding the change in an Ansible playbook. The tradeoff is that the change wouldn't be applied automatically if you just update the-vagrant (without reinstalling), but I am OK with that.
I'm going to test this before I merge, though :)
Hmm, the issue I'm seeing here is that I have all kinds of things in my local
... whereas my local
Is there another way we could approach this? Or do these config files need to change? |
@becw, thanks for the feedback! I'm going to try a different approach by using Ansible. |
@becw, I updated this to use Ansible to make changes to the-vagrant/conf/vagrant/provisioning/roles/common/tasks/main.yml Lines 40 to 42 in 6bc225e
That would have updated any If you think this approach will work, I should probably move the file provisioning from the Vagrant file into the Ansible playbook, so everything is together. Also, this method will copy and update the |
I think this approach is good. We talked about how the .gitconfig has to be copied from the host initially in order to have the config options available to Ansible. Given that, I think you should move forward with what you laid out above -- moving the file provisioning from the I think it's fine if this provisioning step runs every time the Vagrant provisioning is run. |
@becw I moved the provisioning for copying the user's |
Fantastic, thank you! |
See ticket ZRAD-127 and issue #57.
Uses Vagrant's file provisioner to copy
.gitconfig
from the host.Ansible will subsequently modify
excludesfile
to use the.gitignore
that it copies into the VM.To test:
vagrant reload --provision
vagrant ssh
and verify that~/.gitconfig
has the correctuser.name
anduser.email
Questions:
Should this detect a missing
user.name
anduser.email
and prompt the developer to configure Git prior to provisioning the VM, or display a warning?