Newer
Older
---
- name: "Import web_app role - EspoCRM"
import_role:
name: _web_app
- name: "template {{ rev_proxy }}_app.j2 {{ app_instance_id }}"
template:
src: "{{ rev_proxy }}_app.j2"
dest: "/etc/{{ rev_proxy }}/sites-available/{{ app_instance_id }}.conf"
when: app_wsgi == "no"
notify: reload {{ rev_proxy }} web_app
tags:
- espocrm_rev_proxy
- name: "cron monthly retrieving slaves backups"
cron:
name: "Cron EspoCRM"
hour: "23"
minute: "0"
job: "/usr/bin/php -f {{ app_instance_root }}/cron.php > /dev/null 2>&1"
- name: check if {{ app_instance_root }} exists
path: "{{ app_instance_root }}"
register: "app_root_exist"
- name: attribute correct rights on files
path: "{{ item.path }}"
mode: "{{ item.mode }}"
when: "app_root_exist.stat.exists"
- name: "directory and permissions on {{ app_instance_root }}/bin/command"
path: "{{ app_instance_root }}/bin/command"
mode: 0754
tags:
when: app_root_exist.stat.exists
- name: check if file /etc/php/{{ php_version }}/fpm/pool.d/php-fpm-{{ app_user }}.conf exists before modifying configuration
stat:
path: "/etc/php/{{ php_version }}/fpm/pool.d/php-fpm-{{ app_user }}.conf"
register: "fpmconf_espo_exist"
tags:
- confphpfpm_espocrm
- name : "Delete {{ item.key }} line in /etc/php/{{ php_version }}/fpm/pool.d/php-fpm-{{ app_user }}.conf"
path: "/etc/php/{{ php_version }}/fpm/pool.d/php-fpm-{{ app_user }}.conf"
regex: '^php_value[{{ item.key }}]'
state: absent
line: "php_value[{{ item.key }}] = {{ item.val }}"
path: "/etc/php/{{ php_version }}/fpm/pool.d/php-fpm-{{ app_user }}.conf"
state: present
- name: Print db informations for manual installation
vars:
msg: |
db_name: {{ app_instance_id }}_db
db_user: {{ app_instance_id }}_usr
db_pass: {{ database_password }}
debug:
msg: "{{ msg.split('\n') }}"