-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
MySQL Dump target should not have hardcoded path #224
Comments
I've never used this feature.. can you tell me how do you use it? |
phansible.com provides a "sql dump" field, but doesn't give any indication whether it should be an absolute or relative path, so I put in the absolute path. In my case, I have my host vagrant folder mapped to /var/www/project in the vagrant box, so my MySQL dump location is something like /var/www/project/myDump.sql. With the "/vagrant/" hardcoded, Ansible sees it as "/vagrant//var/www/project/myDump.sql" which obviously fails. I can see a few of ways of dealing with this:
|
hmm I think the more flexible solution is to force the user to specify the full path (also tell him that the full path is expected) This way you can map a new folder for the dumps or create a specific app task that copy the dumps from one place to that folder. And you are not required to keep them with your codebase, but you can if you want... Will that fit your use case? |
I also think forcing the full path is the simplest solution. |
Agreed. The full path was what I defaulted to when not given indication of how it should be entered, so it follows my use case. |
As a summary the task should be:
|
@naxhh wouldn't be actually better to inherit the path from the shared folder one? |
I don't normally keep the sql dumps in the same place as the code. So for me is better to give flexibility on this. I let the decision to you. The main priority of the task thought is to add an explanation if full or relative path should be added. |
What I meant is that at present we have two shared path, the default shared one and the document root, I generally share the code in the document root and everything else in the main shared folder. But yes I think it's all down to make clearer what's what. |
The code in mysql/main.yml hard codes "/vagrant/" into the dump target path:
This fails when the input path is absolute, or if the share root is different from "/vagrant/". This should probably be configurable and/or autodetected when generating the file.
The text was updated successfully, but these errors were encountered: