main.yml 933 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. - name: Package cache updated
  3. shell: pkg update -f
  4. - name: Dependencies installed
  5. pkgng:
  6. name: "git go py37-supervisor"
  7. state: present
  8. - name: Source folder exists
  9. file:
  10. path: /usr/local/src
  11. owner: root
  12. mode: 0755
  13. state: directory
  14. - name: Podgrab source deployed
  15. git:
  16. repo: "https://github.com/akhilrex/podgrab.git"
  17. dest: /usr/local/src/podgrab
  18. accept_hostkey: yes
  19. update: yes
  20. - name: Build podgrab binary
  21. shell:
  22. chdir: /usr/local/src/podgrab
  23. cmd: go build .
  24. - name: Supervisor enabled
  25. shell: sysrc supervisord_enable="YES"
  26. - name: Supervisor config file patched
  27. patch:
  28. src: supervisord.conf.patch
  29. dest: /usr/local/etc/supervisord.conf
  30. notify: Supervisor restarted
  31. - name: Supervisor file installed
  32. copy:
  33. src: supervisor.conf
  34. dest: /usr/local/etc/supervisor/conf.d/podgrab.conf
  35. owner: root
  36. mode: 0644
  37. notify: Supervisor restarted