mint-laravel-reset.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. - hosts: php_fpm
  2. tasks:
  3. - name: clone source code
  4. ansible.builtin.git:
  5. repo: "https://github.com/iapt-platform/mint.git"
  6. dest: "{{ app_deploy_root }}/htdocs"
  7. version: "laravel"
  8. - name: "chown storage logs folder to {{ ansible_user }}"
  9. become: true
  10. ansible.builtin.file:
  11. path: "{{ app_deploy_root }}/htdocs/storage/logs"
  12. owner: "{{ ansible_user }}"
  13. group: "{{ ansible_user }}"
  14. recurse: true
  15. - name: "chown bootstrap cache folder to {{ ansible_user }}"
  16. become: true
  17. ansible.builtin.file:
  18. path: "{{ app_deploy_root }}/htdocs/bootstrap/cache"
  19. owner: "{{ ansible_user }}"
  20. group: "{{ ansible_user }}"
  21. recurse: true
  22. - name: remove composer.lock
  23. become: true
  24. ansible.builtin.file:
  25. path: "{{ app_deploy_root }}/htdocs/composer.lock"
  26. state: absent
  27. - name: remove vendor folder
  28. become: true
  29. ansible.builtin.file:
  30. path: "{{ app_deploy_root }}/htdocs/vendor"
  31. state: absent
  32. - name: auto-loader optimization for v2
  33. ansible.builtin.shell:
  34. cmd: composer install --optimize-autoloader --no-dev
  35. chdir: "{{ app_deploy_root }}/htdocs"
  36. - name: "chown storage logs folder to www-data"
  37. become: true
  38. ansible.builtin.file:
  39. path: "{{ app_deploy_root }}/htdocs/storage/logs"
  40. owner: "www-data"
  41. group: "www-data"
  42. recurse: true
  43. - name: "chown bootstrap cache folder to www-data"
  44. become: true
  45. ansible.builtin.file:
  46. path: "{{ app_deploy_root }}/htdocs/bootstrap/cache"
  47. owner: "www-data"
  48. group: "www-data"
  49. recurse: true