main.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ---
  2. - name: Package cache updated
  3. shell: pkg update -f
  4. - name: Dependencies installed
  5. community.general.pkgng:
  6. name: git-tiny,py311-afew,py311-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. - name: Muchsync built and installed
  22. shell:
  23. cmd: ./configure && make && make install
  24. chdir: /usr/local/src/muchsync-6
  25. - name: afew config folder exists
  26. file:
  27. path: /root/.config/afew
  28. mode: 0755
  29. state: directory
  30. - name: afew config file installed
  31. copy:
  32. src: afew-config
  33. dest: /root/.config/afew/config
  34. mode: 0644
  35. - name: archive_filter installed
  36. copy:
  37. src: archive_filter.py
  38. dest: /root/.config/afew/archive_filter.py
  39. mode: 0644
  40. - name: mbsync config file installed
  41. template:
  42. src: mbsyncrc.j2
  43. dest: /root/.mbsyncrc
  44. mode: 0644
  45. - name: notmuchconfig file installed
  46. copy:
  47. src: notmuch-config
  48. dest: /root/.notmuch-config
  49. mode: 0644
  50. - name: Checkmail script installed
  51. copy:
  52. src: checkmail
  53. dest: /usr/local/bin/checkmail
  54. owner: root
  55. mode: 0744
  56. - name: Run checkmail once
  57. shell: checkmail
  58. - name: Checkmail cronjob configured
  59. cron:
  60. name: "Check mail"
  61. minute: "*/10"
  62. hour: "*"
  63. day: "*"
  64. month: "*"
  65. job: "/usr/local/bin/checkmail"