Update to 2023-09-08 10:00

This commit is contained in:
Daniel Berteaud
2023-09-08 10:00:12 +02:00
parent e126bb4803
commit 1e45c1d87c
9 changed files with 43 additions and 12 deletions

View File

@@ -16,6 +16,10 @@ odoo_user: odoo
# - Make odoo a SUPERUSER on the postgres server (so it should use a dedicated postgres server)
odoo_db_manager: False
# When the DB manager is enabled, you can set a master password (used to manage databases). If not defined
# a random one will be created
# odoo_db_manager_pass: p@ssw0rd
# Database settings
odoo_db_server: "{{ pg_server | default('localhost') }}"
odoo_db_port: 5432

View File

@@ -16,6 +16,9 @@
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 }}"
- name: Restore SELinux context
command: restorecon -R {{ odoo_root_dir }}
tags: odoo
- name: Install nginx configuration

View File

@@ -27,3 +27,13 @@
- set_fact: odoo_db_pass={{ rand_pass }}
when: odoo_db_pass is not defined
tags: odoo
# Create a random pass for the DB Manager
- block:
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ odoo_root_dir }}/meta/ansible_db_manager_pass"
- set_fact: odoo_db_manager_pass={{ rand_pass }}
when: odoo_db_manager_pass is not defined and odoo_db_manager
tags: odoo

View File

@@ -56,6 +56,16 @@
- phonenumbers
- python-jose
- flanker
- redis
- pdfminer
- dnsq
tags: odoo
# This is needed as the first import from flanker needs to create files not writeable by the Odoo user
# See https://github.com/Tecnativa/doodba/pull/487
- name: Finish flanker install
command: "{{ odoo_root_dir }}/venv/bin/python3 -c 'from flanker.addresslib import address'"
changed_when: False
tags: odoo
- name: Create the PostgreSQL role

View File

@@ -1,5 +1,7 @@
[options]
{% if not odoo_db_manager %}
{% if odoo_db_manager %}
admin_passwd = {{ odoo_db_manager_pass }}
{% else %}
db_name = {{ odoo_db_name }}
{% endif %}
db_host = {{ odoo_db_server }}
@@ -16,4 +18,6 @@ smtp_server = localhost
data_dir = {{ odoo_root_dir }}/data
without_demo = ALL
init = base
limit_request = 16384
limit_time_cpu = 900
limit_time_real = 1800

View File

@@ -1,8 +1,8 @@
---
odoo_packages:
- python3.11-pip
- python3.11-devel
- python39-pip
- python39-devel
- gcc
- gcc-c++
- libxml2-devel
@@ -16,4 +16,4 @@ odoo_packages:
- git
- acl
odoo_venv_command: /bin/python3.11 -m venv
odoo_venv_command: /bin/python3.9 -m venv

View File

@@ -1,8 +1,8 @@
---
odoo_packages:
- python3.11-pip
- python3.11-devel
- python3-pip
- python3-devel
- gcc
- gcc-c++
- libxml2-devel
@@ -16,4 +16,4 @@ odoo_packages:
- git
- acl
odoo_venv_command: /bin/python3.11 -m venv
odoo_venv_command: /bin/python3.9 -m venv