30 lines
996 B
YAML
Raw Normal View History

2022-07-25 16:00:15 +02:00
---
- 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
2024-05-27 17:01:00 +02:00
- when: odoo_install_mode == 'install'
2022-07-25 16:00:15 +02:00
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
2022-07-26 17:00:15 +02:00
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"
2022-07-25 16:00:15 +02:00
become_user: "{{ odoo_user }}"
2024-05-27 17:01:00 +02:00
tags: odoo
2023-09-08 10:00:12 +02:00
2024-05-27 17:01:00 +02:00
- name: Restore SELinux context
command: restorecon -R {{ odoo_root_dir }}
when: odoo_install_mode != 'none'
2022-07-25 16:00:15 +02:00
tags: odoo
2023-07-20 14:00:26 +02:00
- name: Install nginx configuration
template: src=nginx.conf.j2 dest=/etc/nginx/ansible_conf.d/33-odoo.conf
notify: reload nginx
tags: odoo,web