Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync all files #166

Closed
vinsh opened this issue Nov 10, 2014 · 2 comments
Closed

rsync all files #166

vinsh opened this issue Nov 10, 2014 · 2 comments
Milestone

Comments

@vinsh
Copy link
Contributor

vinsh commented Nov 10, 2014

The rsync features used in this plugin include code that does the following:
# during rsync, ignore files specified in .hgignore and
# .gitignore traditional .gitignore or .hgignore files

I want to understand why?

This causes an issue for our use case:
Deployment keys for puppet added to a puppet master.
These keys are copied into the vagrantfile folder (which happens to be a git repo as usual)... at node bringup time.
However we don't allow those keys to be committed to git.
We have the directory containing these keys in the .gitignore...
vagrant-openstack-provider then ignores that folder and we end up missing a lot of files we expect to see in /vagrant from the rsync.

Can you suggest a work around? I have added a flag to this plugin to ignore any rsync exclusions. If you agree this is a good feature to have.. I can submit a pull request.

@ggiamarchi
Copy link
Owner

Actually, this is a legacy code and i don't really know the reason... In my opinion, ignoring vcs ignored files in rsync is a useful feature but it should not be the default behavior.

I suggest to add a configuration attribute rsync_ignore_files that would be used in place of this harcoded array. The default value of this attribute should be an empty array.

Example

If i would like to ignore files from .gitignore i would do

config.vm.provider :openstack do |os|
  ...
  os.rsync_ignore_files = ['.gitignore']
  ...
end

@julienvey, what do you think about that ?

@vinsh, does it makes sense for you ? Feel free to submit a pull request.

vinsh pushed a commit to vinsh/vagrant-openstack-provider that referenced this issue Nov 12, 2014
As discussed in: vagrant-openstack-provider issue ggiamarchi#166
rsync all files ggiamarchi#166
@vinsh
Copy link
Contributor Author

vinsh commented Nov 12, 2014

Have tested this change out and it works well. I'm not confident that this change is as efficient as it can be. Please suggest any code style improvements!

@ggiamarchi ggiamarchi added this to the 0.6 milestone Nov 13, 2014
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jan 18, 2016
As discussed in: vagrant-openstack-provider issue ggiamarchi#166
rsync all files ggiamarchi#166
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jan 18, 2016
Adding exclude pattern file list param for rsync

Fix ggiamarchi#166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants