ansible/apps/webservice/tasks/after-updatecode.yml
2016-05-20 15:38:06 +02:00

47 lines
1.9 KiB
YAML

---
- name: WEBSERVICE | Copy needed files
become: yes
copy: src="{{ ansistrano_deploy_from }}/scripts/build/files" dest="{{ ansistrano_shared_path.stdout }}/" force=yes
- name: WEBSERVICE | Configure Project
become: yes
copy: src="./config/application.{{ project_config }}.ini" dest="{{ ansistrano_release_path.stdout }}/application/configs/application.ini"
when: project_config != "prod"
- name: WEBSERVICE | Configure Project
become: yes
copy: src="./config/prod/{{ inventory_hostname }}.ini" dest="{{ ansistrano_release_path.stdout }}/application/configs/application.ini"
when: project_config == "prod"
- name: WEBSERVICE | Set path in project config
become: yes
replace: dest="{{ ansistrano_release_path.stdout }}/application/configs/application.ini" regexp="PROJECT_DIR" replace="{{ ansistrano_deploy_to }}"
- name: WEBSERVICE | Configuration PHP-FPM
become: yes
copy: src="./config/.user.{{ project_config }}.ini" dest="{{ ansistrano_release_path.stdout }}/public/.user.ini"
- name: WEBSERVICE | Generate Evenements Cache
become: yes
command: "/usr/bin/php {{ ansistrano_release_path.stdout }}/scripts/build/genCache.php --generate Evenements"
- name : WEBSERVICE | Cleanup
become: yes
file: path="{{ ansistrano_shared_path.stdout }}/{{ item.src }}" state=absent
with_items:
- { src: 'cache' }
- { src: 'wsdl' }
- name: WEBSERVICE | Temp Directories
become: yes
file: path="{{ ansistrano_shared_path.stdout }}/{{ item.src }}" state=directory recurse=yes mode="u=rwx,g=rwx,o=rx" owner=www-data group=www-data
with_items:
- { src: 'cache' }
- { src: 'wsdl' }
- { src: 'files' }
- { src: 'log' }
- { src: 'sessions' }
- name: WEBSERVICE | Set Permission "ansistrano_release_path.stdout"
become: yes
file: path="{{ ansistrano_release_path.stdout }}" state=directory recurse=yes mode="u=rwx,g=rwx,o=rx" owner=www-data group=www-data