Skip to content
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

Fixes mostly to pip install #69

Merged
merged 1 commit into from
Feb 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ odoo_config_geoip_database: /usr/share/GeoIP/GeoLiteCity.dat
odoo_config_http_enable: True # >= 11.0
odoo_config_http_interface: '' # >= 11.0
odoo_config_http_port: 8069 # >= 11.0
odoo_config_limit_memory_hard: 805306368
odoo_config_limit_memory_soft: 671088640
odoo_config_limit_memory_hard: 2684354560
odoo_config_limit_memory_soft: 2147483648
odoo_config_limit_time_cpu: 60
odoo_config_limit_time_real: 120
odoo_config_limit_time_real_cron: -1 # >= 10.0
Expand Down
4 changes: 4 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
tags:
- odoo_log

- name: Create odoo data dir directory
file: path={{ odoo_config_data_dir }} state=directory
owner={{ odoo_user }} group={{ odoo_user }} force=yes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo is not able to handle this case by its own?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it fails because the dir does not exist.

- name: Project repository already cloned?
stat: path={{ odoo_repo_dest }}
register: project_path
Expand Down
3 changes: 2 additions & 1 deletion templates/odoo-pip.init
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ VIRTUALENV={{ odoo_pip_venv_path }}
DAEMON={{ odoo_pip_odoo_bin_path }}
NAME={{ odoo_service }}
DESC={{ odoo_service }}
CONFIG={{ odoo_config_file }}
LOGFILE={{ odoo_logdir }}/{{ odoo_service }}.log
PIDFILE=/var/run/${NAME}.pid
USER={{ odoo_user }}
Expand All @@ -40,7 +41,7 @@ function _start() {
# from the configuration file
# Odoo: https://github.com/odoo/odoo/pull/13685
# OCB: https://github.com/OCA/OCB/pull/553
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
}

function _stop() {
Expand Down
2 changes: 1 addition & 1 deletion templates/odoo-pip.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=network.target
Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
ExecStart={{ odoo_pip_odoo_bin_path }}
ExecStart={{ odoo_pip_odoo_bin_path }} --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions templates/odoo-standard.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
{% if odoo_version | version_compare('10.0', '>=') %}
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log --config {{ odoo_config_file }}
{% else %}
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% endif %}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
Expand Down