Tuurlijk / TYPO3.Homestead

One-stop Neos and TYPO3 development and review environment. Effortlessly test one site against multiple PHP versions and hhvm.
99 stars 17 forks source link

Install roles from ansible-galaxy to vendor/roles #5

Closed stucki closed 9 years ago

stucki commented 9 years ago

Don't interfere with other roles on this system. Additionally, ansible-galaxy won't require sudo any more.

Tuurlijk commented 9 years ago

I have commented code in here that places the roles under the roles directory where you would expect the roles to be. I prefer that to sticking them into a vendor folder: https://github.com/Tuurlijk/TYPO3.Homestead/blob/master/requirements.yml

Tuurlijk commented 9 years ago

Solved with https://github.com/Tuurlijk/TYPO3.Homestead/commit/95c63fba683ced43ade0346d03809bfcdbb80e16

stucki commented 9 years ago

Sorry Michiel, didn't notice your feedback from 3 days ago. I don't think that my PR is worth to be closed yet :-)

Unless you set roles_path in ansible.cfg, your roles will be installed into the default roles path which is /etc/ansible/roles (on Ubuntu). So sudo would still be neccessary.

However, I don't think that the roles should be written to a path which is shared with other projects. Don't you think that this is a problem?

Tuurlijk commented 9 years ago

You can specify the path in requirements.yml. I did, so now the roles are installed in the 'roles' directory locally in the project. I prefer this to a 'vendor' folder.

The sources are now local and not shared. Is this ok for you?

stucki commented 9 years ago

Ah! I didn't notice https://github.com/Tuurlijk/TYPO3.Homestead/commit/c8fed6074d4a1ed33b885156098fde1d09de56db. So you are adding the upstream roles to your Git project then? Because otherwise, it would be marked as dirty...

Seems it's a matter of personal preference where to add external projects. In my case, I prefer using a separate Git repo in vendor/ (and additionally ignore vendor/ through .gitignore). This let's me track changes of the upstream roles because I want to see how they were changed...

Tuurlijk commented 9 years ago

I put the roles in .gitignore. But in this case, since they are roles . . . I like to leave them in the roles directory.

stucki commented 9 years ago

Ok but then you cannot track their changes easily. I prefer to have that possibility after having bad experiences with breaking changes in Chef cookbooks. Never mind, I'll find a way to solve this for my own purpose.