ansistrano / deploy

Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
https://ansistrano.com
MIT License
2.37k stars 343 forks source link

Makes optional shared paths and basedir shared files creation #208

Closed skuark closed 7 years ago

skuark commented 7 years ago

Hi! I've updated ansistrano from an old version, and the project deployment has failed.

After investigating the problem, I've found a couple of tasks that were added in #142 to prepare shared folders before symlinking. It also makes sense for most of our projects and environments, but in a node from a particular client, the state: directory causes the task fails because the path exists as a symlink to another directory in the filesystem.

I think it could be good to make these tasks optional, enabled via ansible defaults, but overridable by the user. For now that approach is working for us.

ricardclau commented 7 years ago

You are right, it is perhaps a bit of an edge case but it can be useful for cases like this one you are describing

Too bad it is all or nothing if you have 2 or 3 shared paths but in that case you could add the remaining ones in a hook

And no BC breaks which is great!

skuark commented 7 years ago

Of course, here it is. Thanks Ricard!

ricardclau commented 7 years ago

Sorry to be picky with naming, I was checking this from my phone and did not check in depth.

I think the variables should be different in terms of pluralisation

ansistrano_ensure_shared_paths_exist instead of ansistrano_ensure_shared_paths_exists ansistrano_ensure_basedirs_shared_files_exist instead of ansistrano_ensure_basedir_shared_files_exists

skuark commented 7 years ago

Don't worry, you are right. Fixed.

ricardclau commented 7 years ago

Thanks!