mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2023-07-20 14:00
This commit is contained in:
@@ -2,7 +2,5 @@
|
||||
|
||||
- name: Remove temp files
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- "{{ odoo_root_dir }}/tmp/odoo_{{ odoo_version }}.{{ odoo_build }}.tar.gz"
|
||||
- "{{ odoo_root_dir }}/tmp/odoo-{{ odoo_version }}.post{{ odoo_build }}"
|
||||
with_items: []
|
||||
tags: odoo
|
||||
|
@@ -18,3 +18,7 @@
|
||||
|
||||
tags: odoo
|
||||
|
||||
- name: Install nginx configuration
|
||||
template: src=nginx.conf.j2 dest=/etc/nginx/ansible_conf.d/33-odoo.conf
|
||||
notify: reload nginx
|
||||
tags: odoo,web
|
||||
|
@@ -5,7 +5,7 @@
|
||||
with_items:
|
||||
- path: "{{ odoo_root_dir }}"
|
||||
owner: "{{ odoo_user }}"
|
||||
mode: 700
|
||||
mode: 775
|
||||
- path: "{{ odoo_root_dir }}/tmp"
|
||||
- path: "{{ odoo_root_dir }}/meta"
|
||||
mode: 700
|
||||
@@ -18,5 +18,6 @@
|
||||
- path: "{{ odoo_root_dir }}/data"
|
||||
group: "{{ odoo_user }}"
|
||||
mode: 770
|
||||
- path: "{{ odoo_root_dir }}/enterprise"
|
||||
tags: odoo
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||
vars:
|
||||
- root_dir: "{{ odoo_root_dir }}"
|
||||
- version: "{{ odoo_version }}-{{ odoo_build }}"
|
||||
- version: "{{ odoo_version }}"
|
||||
- set_fact: odoo_install_mode={{ install_mode | default('none') }}
|
||||
- set_fact: odoo_current_version={{ current_version | default('') }}
|
||||
tags: odoo
|
||||
|
@@ -6,29 +6,36 @@
|
||||
|
||||
- when: odoo_install_mode != 'none'
|
||||
block:
|
||||
- name: Fetch odoo sources
|
||||
get_url:
|
||||
url: "{{ odoo_archive_url }}"
|
||||
dest: "{{ odoo_root_dir }}/tmp"
|
||||
checksum: sha256:{{ odoo_archive_sha256 }}
|
||||
- name: Clone or update the repo
|
||||
git:
|
||||
repo: "{{ odoo_git_url }}"
|
||||
dest: "{{ odoo_root_dir }}/app"
|
||||
depth: 1
|
||||
version: "{{ odoo_version }}"
|
||||
force: True
|
||||
notify: restart odoo-server
|
||||
|
||||
- name: Extract odoo archive
|
||||
unarchive:
|
||||
src: "{{ odoo_root_dir }}/tmp/odoo_{{ odoo_version }}.{{ odoo_build }}.tar.gz"
|
||||
dest: "{{ odoo_root_dir }}/tmp"
|
||||
remote_src: True
|
||||
|
||||
- name: Copy odoo application to its final directory
|
||||
synchronize:
|
||||
src: "{{ odoo_root_dir }}/tmp/odoo-{{ odoo_version }}.post{{ odoo_build }}/"
|
||||
dest: "{{ odoo_root_dir }}/app/"
|
||||
recursive: True
|
||||
delete: True
|
||||
compress: False
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
- name: Add ACL
|
||||
command: |
|
||||
setfacl -R -b -k {{ odoo_root_dir }}
|
||||
setfacl -m u:nginx:X {{ odoo_root_dir }}
|
||||
setfacl -R -m u:nginx:rX {{ odoo_root_dir }}/data {{ odoo_root_dir }}/app/addons {{ odoo_root_dir }}/app/odoo/addons {{ odoo_root_dir }}/enterprise
|
||||
|
||||
tags: odoo
|
||||
|
||||
- when: odoo_install_mode != 'none' and odoo_enterprise
|
||||
block:
|
||||
- name: Clone or update the enterprise repo
|
||||
git:
|
||||
repo: "{{ odoo_enterprise_git_url }}"
|
||||
dest: "{{ odoo_root_dir }}/enterprise"
|
||||
depth: 1
|
||||
version: "{{ odoo_version }}"
|
||||
force: True
|
||||
notify: restart odoo-server
|
||||
tags: odoo
|
||||
|
||||
|
||||
- name: Create the virtualenv
|
||||
pip:
|
||||
state: "{{ (odoo_install_mode == 'none') | ternary('present', 'latest') }}"
|
||||
@@ -36,7 +43,7 @@
|
||||
virtualenv_command: "{{ odoo_venv_command }}"
|
||||
requirements: "{{ odoo_root_dir }}/app/requirements.txt"
|
||||
environment:
|
||||
PATH: "{{ (pg_version == 'default') | ternary('', '/usr/pgsql-' ~ pg_version ~ '/bin:') }}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
||||
PATH: "{{ (pg_version | default('default') == 'default') | ternary('', '/usr/pgsql-' ~ pg_version ~ '/bin:') }}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
||||
tags: odoo
|
||||
|
||||
- name: Install additional modules in the venv
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Write version
|
||||
copy: content={{ odoo_version }}-{{ odoo_build }} dest={{ odoo_root_dir }}/meta/ansible_version
|
||||
copy: content={{ odoo_version }} dest={{ odoo_root_dir }}/meta/ansible_version
|
||||
tags: odoo
|
||||
|
Reference in New Issue
Block a user