Skip to content
Open
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
12 changes: 12 additions & 0 deletions tasks/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
---

- name: Grep admin_passwd (to preserve) from current Odoo configuration file
shell: grep admin_passwd {{ odoo_config_file }}
register: grep_admin_passwd
failed_when: false
changed_when: false

- name: Generate Odoo configuration file
template: src=odoo-{{ odoo_version }}.conf dest={{ odoo_config_file }}
owner={{ odoo_user }} group={{ odoo_user }} mode=0600
force={{ odoo_force_config and 'yes' or 'no' }}
backup=yes

- name: Preserve/replace previous admin_passwd in Odoo configuration file
lineinfile:
path: "{{ odoo_config_file }}"
regexp: '^admin_passwd.*='
line: "{{ grep_admin_passwd.stdout }}"
notify: Restart Odoo