mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
30 lines
996 B
YAML
30 lines
996 B
YAML
---
|
|
|
|
- name: Deploy server configuration
|
|
template: src=odoo-server.conf.j2 dest={{ odoo_root_dir }}/etc/odoo-server.conf group={{ odoo_user }} mode=640
|
|
notify: restart odoo-server
|
|
tags: odoo
|
|
|
|
- when: odoo_install_mode == 'install'
|
|
block:
|
|
- name: Install odoo
|
|
command: "{{ odoo_root_dir }}/venv/bin/python3 {{ odoo_root_dir }}/app/setup.py install"
|
|
args:
|
|
chdir: "{{ odoo_root_dir }}/app/"
|
|
|
|
- name: Initialize the DB and update modules
|
|
command: "{{ odoo_root_dir }}/venv/bin/python3 {{ odoo_root_dir }}/app/setup/odoo -c {{ odoo_root_dir }}/etc/odoo-server.conf -d {{ odoo_db_name }} -i base -u all --stop-after-init --syslog"
|
|
become_user: "{{ odoo_user }}"
|
|
|
|
tags: odoo
|
|
|
|
- name: Restore SELinux context
|
|
command: restorecon -R {{ odoo_root_dir }}
|
|
when: odoo_install_mode != 'none'
|
|
tags: odoo
|
|
|
|
- name: Install nginx configuration
|
|
template: src=nginx.conf.j2 dest=/etc/nginx/ansible_conf.d/33-odoo.conf
|
|
notify: reload nginx
|
|
tags: odoo,web
|