main.yml 885 B

1234567891011121314151617181920212223242526272829303132333435
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: "git go chromimum pdftk qpdf unoconv"
  5. state: latest
  6. - name: Gotenberg source cloned
  7. git:
  8. repo: "https://github.com/gotenberg/gotenberg.git"
  9. dest: /usr/local/src/
  10. update: yes
  11. force: yes
  12. - name: Gotenberg built
  13. shell:
  14. cmd: go build -o gotenberg -ldflags "-X 'github.com/gotenberg/gotenberg/v7/cmd.Version=7.4.3'" cmd/gotenberg/main.go
  15. chdir: /usr/local/src/gotenberg
  16. - name: Gotenberg installed
  17. copy:
  18. src: /usr/local/src/gotenberg/gotenberg
  19. dest: /usr/local/bin/gotenberg
  20. owner: root
  21. mode: 0744
  22. - name: Gotenberg rc file installed ansible.builtin.copy:
  23. src: gotenberg.rc
  24. dest: /usr/local/etc/rc.d/gotenberg
  25. mode: a+x
  26. - name: Gotenberg enabled
  27. shell: sysrc gotenberg_enable="YES"
  28. - name: Gotenberg started
  29. service: name=gotenberg state=started