|
@@ -0,0 +1,49 @@
|
|
|
+---
|
|
|
+- name: Dependencies installed
|
|
|
+ community.general.pkgng:
|
|
|
+ name: git-tiny,go,python39,python39-pip,npm
|
|
|
+ state: latest
|
|
|
+ tags:
|
|
|
+ - build
|
|
|
+
|
|
|
+- name: Source folder exists
|
|
|
+ file: path=/usr/local/src mode=0755 state=directory
|
|
|
+ tags:
|
|
|
+ - build
|
|
|
+
|
|
|
+- name: Ntfy source deployed
|
|
|
+ git:
|
|
|
+ repo: "https://github.com/ntfy/ntfy.git"
|
|
|
+ dest: /usr/local/src/ntfy
|
|
|
+ force: yes
|
|
|
+ accept_hostkey: yes
|
|
|
+ update: yes
|
|
|
+ tags:
|
|
|
+ - build
|
|
|
+
|
|
|
+- name: Ntfy documentation and webapp built
|
|
|
+ shell:
|
|
|
+ chdir: /usr/local/src/ntfy
|
|
|
+ cmd: make docs & make web
|
|
|
+ tags:
|
|
|
+ - build
|
|
|
+
|
|
|
+- name: Ntfy binary built
|
|
|
+ shell:
|
|
|
+ chdir: /usr/local/src/ntfy
|
|
|
+ cmd: go install heckel.io/ntfy@latest
|
|
|
+
|
|
|
+- name: Install ntfy
|
|
|
+ ansible.builtin.copy:
|
|
|
+ src: /usr/local/src/ntfy/ntfy
|
|
|
+ dest: /usr/local/bin/ntfy
|
|
|
+ remote_src: yes
|
|
|
+ mode: a+x
|
|
|
+ notify: Ntfy restarted
|
|
|
+
|
|
|
+- name: Ntfy rc file installed
|
|
|
+ ansible.builtin.copy:
|
|
|
+ src: ntfy.rc
|
|
|
+ dest: /usr/local/etc/rc.d/ntfy
|
|
|
+ mode: a+x
|
|
|
+ notify: Ntfy restarted
|