diff --git a/README.md b/README.md index 5876f3c..6f68791 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ odoo_role_odoo_modules_path: /opt/odoo/modules odoo_role_odoo_db_name: odoo # This not a DB user password, but a password for Odoo to deal with DB. odoo_role_odoo_db_admin_password: 1234 +# Whether to populate db with example data or not. +odoo_role_demo_data: false ``` * Core modules list to install/update diff --git a/defaults/main.yml b/defaults/main.yml index ab819fc..b20ca5a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -39,3 +39,5 @@ odoo_role_odoo_core_modules: "base" odoo_daemon: "odoo.service" +# Whether to populate db with example data or not. +odoo_role_demo_data: false diff --git a/tasks/main.yml b/tasks/main.yml index 6466f1a..dffd2c6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -125,7 +125,9 @@ -d {{ odoo_role_odoo_db_name }} --init base --stop-after-init + {% if not odoo_role_demo_data %} --without-demo=all + {% endif %} --logfile=/dev/stdout --log-level=warn when: db_initialized.stdout == "0" @@ -158,7 +160,9 @@ -d {{ odoo_role_odoo_db_name }} --init {{ modules_to_install.stdout_lines | join(',') }} --stop-after-init + {% if not odoo_role_demo_data %} --without-demo=all + {% endif %} --logfile=/dev/stdout --log-level=warn when: modules_to_install.stdout