main.yml 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: git-tiny,go,python38,py38-pip,npm
  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: Ntfy source deployed
  13. git:
  14. repo: "https://github.com/binwiederhier/ntfy.git"
  15. dest: /usr/local/src/ntfy
  16. force: yes
  17. accept_hostkey: yes
  18. update: yes
  19. tags:
  20. - build
  21. - name: Ntfy documentation and webapp built
  22. shell:
  23. chdir: /usr/local/src/ntfy
  24. cmd: make docs & make web
  25. tags:
  26. - build
  27. - name: Ntfy binary built
  28. shell:
  29. chdir: /usr/local/src/ntfy
  30. cmd: go install heckel.io/ntfy@latest
  31. - name: Install ntfy
  32. ansible.builtin.copy:
  33. src: /usr/local/src/ntfy/ntfy
  34. dest: /usr/local/bin/ntfy
  35. remote_src: yes
  36. mode: a+x
  37. notify: Ntfy restarted
  38. - name: Ntfy rc file installed
  39. ansible.builtin.copy:
  40. src: ntfy.rc
  41. dest: /usr/local/etc/rc.d/ntfy
  42. mode: a+x
  43. notify: Ntfy restarted