Skip to content

Commit

Permalink
Merge pull request #55 from coopdevs/optional-demo-data
Browse files Browse the repository at this point in the history
Create an option to switch demo-data on or off
  • Loading branch information
raneq authored Jul 5, 2019
2 parents d55bff0 + 4a33270 commit fef3760
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fef3760

Please sign in to comment.