main.yml 895 B

123456789101112131415161718192021222324252627282930313233
  1. - name: Pull {{ item }} image
  2. ansible.builtin.shell: 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 workspace folder
  9. become: true
  10. ansible.builtin.file:
  11. path: "{{ app_deploy_target | dirname }}"
  12. state: directory
  13. owner: "{{ ansible_user }}"
  14. mode: "0755"
  15. - name: Create scripts folder
  16. ansible.builtin.file:
  17. path: "{{ app_deploy_target }}"
  18. state: directory
  19. mode: "0755"
  20. - name: Extract release
  21. ansible.builtin.unarchive:
  22. src: "{{ playbook_dir }}/tmp/{{ app_domain }}-{{ mint_version }}.tar.xz"
  23. dest: "{{ app_deploy_target }}"
  24. creates: "{{ app_deploy_target }}/api-v12"
  25. - name: Upload configurations
  26. ansible.builtin.import_tasks: config.yml
  27. - name: Setup systemd services
  28. ansible.builtin.import_tasks: systemd.yml