main.yml 896 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: git-tiny,yarn
  5. state: latest
  6. tags:
  7. - build
  8. - name: Source folder exists
  9. file: path=/usr/local/src mode=0755 state=directory
  10. tags:
  11. - build
  12. - name: Excalidraw source fetched
  13. git:
  14. repo: "https://github.com/excalidraw/excalidraw.git"
  15. dest: /usr/local/src/excalidraw
  16. force: yes
  17. accept_hostkey: yes
  18. update: yes
  19. tags:
  20. - build
  21. - name: Yarn dependencies installed
  22. shell:
  23. chdir: /usr/local/src/excalidraw
  24. cmd: yarn && yarn build
  25. - name: Excalidraw build artifacts installed
  26. shell:
  27. cmd: mkdir -p /usr/local/www/excalidraw && cp -r /usr/local/src/excalidraw/build/* /usr/local/www/excalidraw/
  28. tags:
  29. - build
  30. - name: Nginx config file installed
  31. ansible.builtin.copy:
  32. src: nginx-location.conf
  33. dest: /usr/local/etc/nginx/locations/
  34. notify: Nginx restarted