main.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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: Mail folder exists
  14. file:
  15. path: /root/Mail
  16. mode: 0755
  17. state: directory
  18. - name: colin@unbl.ink folder exists
  19. file:
  20. path: /root/Mail/colin@unbl.ink
  21. mode: 0755
  22. state: directory
  23. - name: colin@castine.town folder exists
  24. file:
  25. path: /root/Mail/colin@castine.town
  26. mode: 0755
  27. state: directory
  28. - name: colin.powell@15five.com folder exists
  29. file:
  30. path: /root/Mail/colin.powell@15five.com
  31. mode: 0755
  32. state: directory
  33. - name: secstates@sdf.org folder exists
  34. file:
  35. path: /root/Mail/secstate@sdf.org
  36. mode: 0755
  37. state: directory
  38. - name: Muchsync release fetched
  39. get_url:
  40. url: "http://www.muchsync.org/src/muchsync-6.tar.gz"
  41. dest: "/usr/local/src/muchsync-6.tar.gz"
  42. - name: Muchsync unpacked
  43. command: "tar -xzf /usr/local/src/muchsync-6.tar.gz"
  44. args:
  45. chdir: "/usr/local/src"
  46. warn: false
  47. - name: Muchsync built and installed
  48. shell:
  49. cmd: ./configure && make && make install
  50. chdir: /usr/local/src/muchsync-6
  51. - name: afew config folder exists
  52. file:
  53. path: /root/.config/afew
  54. mode: 0755
  55. state: directory
  56. - name: afew config file installed
  57. copy:
  58. src: afew-config
  59. dest: /root/.config/afew/config
  60. mode: 0644
  61. - name: archive_filter installed
  62. copy:
  63. src: archive_filter.py
  64. dest: /root/.config/afew/archive_filter.py
  65. mode: 0644
  66. - name: mbsync config file installed
  67. template:
  68. src: mbsyncrc.j2
  69. dest: /root/.mbsyncrc
  70. mode: 0644
  71. - name: notmuchconfig file installed
  72. copy:
  73. src: notmuch-config
  74. dest: /root/.notmuch-config
  75. mode: 0644
  76. - name: Checkmail script installed
  77. copy:
  78. src: checkmail
  79. dest: /usr/local/bin/checkmail
  80. owner: root
  81. mode: 0744
  82. - name: Run checkmail once
  83. shell: checkmail
  84. - name: Checkmail cronjob configured
  85. cron:
  86. name: "Check mail"
  87. minute: "*/10"
  88. hour: "*"
  89. day: "*"
  90. month: "*"
  91. job: "/usr/local/bin/checkmail"