Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] Option whether to (skip) install of PostgreSQL. #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ odoo_repo_depth: 1 # Set to 0 to clone the full history (slower)
odoo_reportlab_font_url: http://www.reportlab.com/ftp/pfbfer.zip

# Tasks related to PostgreSQL
odoo_install_postgresql: True
odoo_postgresql_set_user: True
odoo_postgresql_user_role_attr: CREATEDB,NOSUPERUSER
odoo_postgresql_extensions:
Expand Down
5 changes: 3 additions & 2 deletions tasks/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@
- name: PostgreSQL - Add the Odoo user
postgresql_user: name={{ odoo_config_db_user }}
role_attr_flags={{ odoo_postgresql_user_role_attr }}
when: odoo_postgresql_set_user
when: odoo_postgresql_set_user and odoo_install_postgresql

- name: PostgreSQL - Set the Odoo user password
postgresql_user: name={{ odoo_config_db_user }}
password={{ odoo_config_db_passwd }}
when: odoo_config_db_passwd is defined and odoo_config_db_passwd
and odoo_postgresql_set_user
and odoo_postgresql_set_user and odoo_install_postgresql

- name: PostgreSQL - Activate some extensions on the 'template1' database
postgresql_ext:
name: "{{ item }}"
db: template1
with_items: "{{ odoo_postgresql_extensions }}"
when: odoo_install_postgresql

delegate_to: "{{ odoo_postgresql_delegate_to }}"
remote_user: "{{ odoo_postgresql_remote_user }}"
Expand Down