|
|
|
@ -28,7 +28,39 @@ |
|
|
|
|
dest: "{{ itop_root_dir }}/web/" |
|
|
|
|
recursive: True |
|
|
|
|
delete: True |
|
|
|
|
rsync_opts: |
|
|
|
|
- '--exclude=data' |
|
|
|
|
- '--exclude=log' |
|
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
|
|
|
|
|
|
- name: Sync data and log dir |
|
|
|
|
synchronize: |
|
|
|
|
src: "{{ itop_root_dir }}/tmp/web/{{ item }}/" |
|
|
|
|
dest: "{{ itop_root_dir }}/data/{{ item }}/" |
|
|
|
|
recursive: True |
|
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
|
loop: |
|
|
|
|
- data |
|
|
|
|
- log |
|
|
|
|
|
|
|
|
|
tags: itop |
|
|
|
|
|
|
|
|
|
- name: Create directories |
|
|
|
|
file: src={{ itop_root_dir }}/data/{{ item }} dest={{ itop_root_dir }}/web/{{ item }} state=link force=True |
|
|
|
|
loop: |
|
|
|
|
- log |
|
|
|
|
- data |
|
|
|
|
- conf |
|
|
|
|
- env-production |
|
|
|
|
- env-production-build |
|
|
|
|
tags: itop |
|
|
|
|
|
|
|
|
|
- import_tasks: ../includes/webapps_create_mysql_db.yml |
|
|
|
|
vars: |
|
|
|
|
- db_name: "{{ itop_db_name }}" |
|
|
|
|
- db_user: "{{ itop_db_user }}" |
|
|
|
|
- db_server: "{{ itop_db_server }}" |
|
|
|
|
- db_pass: "{{ itop_db_pass }}" |
|
|
|
|
tags: itop |
|
|
|
|
|
|
|
|
|
- name: Install backup hooks |
|
|
|
|