main.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. - name: Pull docker image
  2. ansible.builtin.command: docker pull {{ item }}
  3. with_items:
  4. - "{{ app_php81_image }}"
  5. - "{{ app_php84_image }}"
  6. - "{{ app_python_image }}"
  7. - "{{ app_nodejs_image }}"
  8. when: app_pull_images
  9. - name: Create /srv/python3 folder
  10. become: true
  11. ansible.builtin.file:
  12. path: /srv/python3
  13. state: directory
  14. owner: "{{ ansible_user }}"
  15. mode: "0755"
  16. - name: Extract python3.tar.xz
  17. ansible.builtin.unarchive:
  18. src: python3-{{ ansible_facts['architecture'] }}-2026011614.tar.xz
  19. dest: /srv
  20. creates: /srv/python3/pyvenv.cfg
  21. - name: Create workspace folder
  22. become: true
  23. ansible.builtin.file:
  24. path: "{{ app_deploy_target | dirname }}"
  25. state: directory
  26. owner: "{{ ansible_user }}"
  27. mode: "0755"
  28. - name: Create scripts folder
  29. ansible.builtin.file:
  30. path: "{{ app_deploy_target }}"
  31. state: directory
  32. mode: "0755"
  33. - name: Extract release
  34. ansible.builtin.unarchive:
  35. src: "{{ playbook_dir }}/tmp/{{ app_domain }}-{{ mint_version }}.tar.xz"
  36. dest: "{{ app_deploy_target }}"
  37. creates: "{{ app_deploy_target }}/api-v12"
  38. - name: Upload configurations
  39. ansible.builtin.import_tasks: config.yml
  40. - name: Setup laravel
  41. ansible.builtin.import_tasks: laravel-setup.yml
  42. - name: Setup systemd services
  43. ansible.builtin.import_tasks: systemd.yml