main.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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: Pip linked to pip3
  22. file: src=/usr/local/bin/pip dest=/usr/local/bin/pip3 state=link
  23. - name: Ntfy documentation and webapp built
  24. shell:
  25. chdir: /usr/local/src/ntfy
  26. cmd: make docs && make web
  27. tags:
  28. - build
  29. - name: Ntfy binary built
  30. shell:
  31. chdir: /usr/local/src/ntfy
  32. cmd: go build .
  33. - name: Install ntfy
  34. ansible.builtin.copy:
  35. src: /usr/local/src/ntfy/ntfy
  36. dest: /usr/local/bin/ntfy
  37. remote_src: yes
  38. mode: a+x
  39. notify: Ntfy restarted
  40. - name: Ntfy rc file installed
  41. ansible.builtin.copy:
  42. src: ntfy.rc
  43. dest: /usr/local/etc/rc.d/ntfy
  44. mode: a+x
  45. notify: Ntfy restarted