main.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ---
  2. - name: Package cache updated
  3. shell: pkg update -f
  4. - name: Dependencies installed
  5. community.general.pkgng:
  6. name: git-tiny,py39-afew,py39-alot,openssl,pkgconf,sqlite,autotools,isync
  7. state: latest
  8. - name: Source folder exists
  9. file:
  10. path: /usr/local/src
  11. mode: 0755
  12. state: directory
  13. - name: Muchsync release fetched
  14. get_url:
  15. url: "http://www.muchsync.org/src/muchsync-6.tar.gz"
  16. dest: "/usr/local/src/muchsync-6.tar.gz"
  17. - name: Muchsync unpacked
  18. command: "tar -xzf /usr/local/src/muchsync-6.tar.gz"
  19. args:
  20. chdir: "/usr/local/src"
  21. warn: false
  22. - name: Muchsync built and installed
  23. shell:
  24. cmd: ./configure && make && make install
  25. chdir: /usr/local/src/muchsync-6
  26. - name: afew config folder exists
  27. file:
  28. path: /root/.config/afew
  29. mode: 0755
  30. state: directory
  31. - name: afew config file installed
  32. copy:
  33. src: afew-config
  34. dest: /root/.config/afew/config
  35. mode: 0644
  36. - name: archive_filter installed
  37. copy:
  38. src: archive_filter.py
  39. dest: /root/.config/afew/archive_filter.py
  40. mode: 0644
  41. - name: mbsync config file installed
  42. template:
  43. src: mbsyncrc.j2
  44. dest: /root/.mbsyncrc
  45. mode: 0644
  46. - name: notmuchconfig file installed
  47. copy:
  48. src: notmuch-config
  49. dest: /root/.notmuch-config
  50. mode: 0644
  51. - name: Checkmail script installed
  52. copy:
  53. src: checkmail
  54. dest: /usr/local/bin/checkmail
  55. owner: root
  56. mode: 0744
  57. - name: Run checkmail once
  58. shell: checkmail
  59. - name: Checkmail cronjob configured
  60. cron:
  61. name: "Check mail"
  62. minute: "*/10"
  63. hour: "*"
  64. day: "*"
  65. month: "*"
  66. job: "/usr/local/bin/checkmail"