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

Allow to ignore files with rsync strategy #380

Closed davidmpaz closed 2 years ago

davidmpaz commented 2 years ago

Hi,

thanks for this awesome roles. May i suggest an improvement? When under ansistrano_deploy_via: "rsync", i have understood from sample application that one can delete some paths after they are synched.

Could we add some variable to modify rysnc filter at sync time? So those paths are not copied only to be deleted later on?

Thanks in advance and cheers, David

ricardclau commented 2 years ago

In order to do that you can add a .rsync-filter file to your repo so no extra variables are needed

davidmpaz commented 2 years ago

Hi @ricardclau,

thanks for your message. In that case could we please document, at least minimal, how this should look like, for dummies like me.

For example, given my scenario, some questions arise for me now. I have a symfony project and all ansistrano related files are placed under an ansible directory in the root of the project.

  1. Shall i place the .rsync-filter file in the project root or one level down where i have my playbooks=

Thanks in advance for your help and ime, David

ricardclau commented 2 years ago

It's documented in Ansible https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html

davidmpaz commented 2 years ago

Hi, thanks for your answer. I will check that.

I definitely think the #293 should be addressed in the near future. I can contribute some Pull Request to it if necessary. I am starting to use this repo, this mean I still have that point of view, of dummy, which can be useful for document somethings useful for starting.

These kind of things are trivial, but for someone coming without being too much into the topic it is not so easy to get on track, then having such small details written somewhere, saves everybody's time.

Cheers, David