UCLALibrary / packer-samvera

A build of Samvera/Hyrax using Packer and the 'ansible-samvera' roles
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

`vagrant up` fails if developer doesn't have a .gitignore (or .gitconfig) #52

Closed ksclarke closed 6 years ago

ksclarke commented 6 years ago

If developer doesn't have a .gitignore (or .gitconfig) the Vagrantfile provisioning will throw and error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

File provisioner:
* File upload source file /home/hpottinger/.gitignore must exist

Here is issue: https://github.com/UCLALibrary/packer-samvera/blob/master/vagrant/hyrax/Vagrantfile#L28

Can this be more forgiving or do I have to drop back to using the shell provisioner?

ksclarke commented 6 years ago

Should be as simple as wrapping in something like: if File.exists?(File.expand_path("~/.gitconfig"))