-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
force the creation of odoo_workdir and odoo_rootdir #90
Open
JordiBForgeFlow
wants to merge
6
commits into
OCA:master
Choose a base branch
from
ForgeFlow:master-create_work_dirs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c96fe54
force the creation of odoo_workdir and odoo_rootdir
JordiBForgeFlow 0c6f02a
fixup!
JordiBForgeFlow 4a4e683
renames
JordiBForgeFlow af4ef6d
fixup!
JordiBForgeFlow 2f7be35
fixup!
JordiBForgeFlow 3da087a
fixup!
JordiBForgeFlow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,22 @@ | |
tags: | ||
- odoo_project | ||
|
||
- name: Create working dir directory | ||
file: path={{ odoo_workdir }} state=directory | ||
owner={{ odoo_user }} group={{ odoo_user }} force=yes | ||
|
||
- name: Create odoo server directory | ||
file: path={{ odoo_rootdir }} state=directory | ||
owner={{ odoo_user }} group={{ odoo_user }} force=yes | ||
when: odoo_install_type != 'pip' | ||
tags: | ||
- odoo_install_type_standard | ||
- odoo_install_type_buildout | ||
|
||
- name: Create odoo config file directory | ||
file: path={{ odoo_config_file_dir }} state=directory | ||
owner={{ odoo_user }} group={{ odoo_user }} force=yes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This task should not be executed for buildout installation, as |
||
|
||
- name: Create odoo data dir directory | ||
file: path={{ odoo_config_data_dir }} state=directory | ||
owner={{ odoo_user }} group={{ odoo_user }} force=yes | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use directly
{{ odoo_config_file | dirname}}
to get the directory path without adding another user option.Feel free to create a new variable in
./vars/main.yml
if you want a variableodoo_config_file_dir
, these options are not supposed to be change by the user.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion {{ odoo_config_file }} should only contain the name of the config file. Because if you want to specify a certain subdir for the odoo config file, how can you possibly create that dir?
Same as above, for any path that you indicate you need a step that ensures that this path exists and is assigned to the right user.
And in order to ensure that people do now screw the standard linux, the paths indicated in parameters would not be created directly, but /{{ odoo_service }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand now, thank you, so we have to drop the compatibility to achieve this, it wasn't clear and I was trying to keep this compatible.
A major release number is also required for such change (
./meta/main.yml
, to update to2.0
?).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a problem, since it seems that ansible does not seem to support role versioning ansible/proposals#23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just to "warn" the users that this new version break the compatibility with the previous ones, nothing more :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we document that? will adding - version: 2.0 just work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to document this change, you could add a page in the wiki telling how to stay compatible with old releases (list old variable values) and link it on the README? For the moment it's enough.