Closed mediafigaro closed 6 years ago
hi @ricardclau :)
Hey, this is weird, it never happened to me before
Maybe if you can paste your playbook I will be able to provide some insight
thanks @ricardclau ! : https://gist.github.com/mediafigaro/f0284287b94d14bb542af11bc5d6722d
my fault I was with the rsync option instead of "git"...
Hi @ricardclau, why it is chosen to have different folder structure whether rsync or git is used? Exactly as @mediafigaro stated, there is additional directory when deploying strategy is rsync. Like so (2nd one was done with rsync):
django_lesson_1
├── current -> ./releases/20181112193047Z
├── releases
│ ├── 20181112191908Z
│ │ ├── ansible
│ │ ├── home
│ │ ├── my_project
│ │ ├── users
│ │ └── venv_dev
│ ├── 20181112192931Z
│ │ └── django_lesson_1
│ │ ├── ansible
│ │ ├── home
│ │ ├── my_project
│ │ ├── users
│ │ └── venv_dev
I think you need to add an extra final / in the deploy_from argument so that the extra folder (presumably this is how your working directory is called?) is not created
This is how rsync works, nothing to do with Ansistrano
Ahh yes, I was thinking about / but actually tried it on the 'deploy to'. Will try that Tomorrow.
Though this means that with the same configuration and only switching channel of providing data you are getting different results.
Bear in mind ansistrano_deploy_from is only used in the copy, rsync and svn strategies (not used for instance in the git strategy) and of course different adaptors need different configurations. They rely on Linux tools such as rsync or scp that are not always unified
Sure, I totally understand that and agree. I just wasn't expecting this differences when running initially. Thanks for help!
@maciejmatczak 👍 did you get it clear also to handle the hooks and to have the right composer update &cache clear ? Would you mind sharing an anonymous conf on gist for exemple ?
@mediafigaro I am not sure about what exactly you are asking of. I didn't use any handles from this role yet and totally have no idea what do you mean by composer update and clearing cache in context of Ansistrono Deploy (aren't those your technology stack dependent operations? I am working with Python's Django, didn't get to nginx and Gunicorn yet...).
Hi, when I deploy I get the correct 3 repositories into my ansistrano_deploy_to directory but into current (= ./releases/201801xxxxxxxxx/) I don't have the sources but a directory which is the name (of course) of my git repository eg. git@bucket.org:user/directory.git. What may be misconfigured by me or how should I handle this to get my Symfony directories and files directly under current/ ?
Otherwise that would mean I'd have to write the directory name into these commands : release_console_path: "{{ ansistrano_release_path.stdout }}/bin/console" => release_console_path: "{{ ansistrano_release_path.stdout }}/directory/bin/console" :(
thanks for your help and code !