main.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. - name: Create /srv/python3 folder
  9. become: true
  10. ansible.builtin.file:
  11. path: /srv/python3
  12. state: directory
  13. owner: "{{ ansible_user }}"
  14. mode: "0755"
  15. - name: Extract python3.tar.xz
  16. ansible.builtin.unarchive:
  17. src: python3-{{ ansible_facts['architecture'] }}-2026011614.tar.xz
  18. dest: /srv
  19. creates: /srv/python3/pyvenv.cfg
  20. - name: Create workspace folder
  21. become: true
  22. ansible.builtin.file:
  23. path: "{{ app_deploy_target | dirname }}"
  24. state: directory
  25. owner: "{{ ansible_user }}"
  26. mode: "0755"
  27. - name: Create scripts folder
  28. ansible.builtin.file:
  29. path: "{{ app_deploy_target }}"
  30. state: directory
  31. mode: "0755"
  32. - name: Extract release
  33. ansible.builtin.unarchive:
  34. src: "{{ playbook_dir }}/tmp/{{ app_domain }}-{{ mint_version }}.tar.xz"
  35. dest: "{{ app_deploy_target }}"
  36. creates: "{{ app_deploy_target }}/api-v12"
  37. - name: Upload configurations
  38. ansible.builtin.import_tasks: config.yml
  39. - name: Setup systemd services
  40. ansible.builtin.import_tasks: systemd.yml