mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
add wait variable for goimapnotify
Previously `wait` could be defined in the user's config file, but in the new release it appears to only be supported as a flag, so we have to override the systemd service.
This commit is contained in:
parent
6e81116824
commit
de59ed760b
7 changed files with 31 additions and 5 deletions
19
roles/goimapnotify/tasks/main.yml
Normal file
19
roles/goimapnotify/tasks/main.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Install goimapnotify
|
||||
pacman:
|
||||
name: goimapnotify
|
||||
state: present
|
||||
|
||||
- name: Create goimapnotify service override directory
|
||||
file:
|
||||
path: /etc/systemd/user/goimapnotify@.service.d
|
||||
state: directory
|
||||
when: mail.goimapnotify_wait is defined
|
||||
|
||||
- name: Push goimapnotify service override file
|
||||
template:
|
||||
src: goimapnotify-service-override.conf.j2
|
||||
dest: /etc/systemd/user/goimapnotify@.service.d/override.conf
|
||||
when: mail.goimapnotify_wait is defined
|
||||
notify:
|
||||
- reload user systemd config
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/goimapnotify -conf %h/.config/imapnotify/%i.yaml -wait {{ mail.goimapnotify_wait }}
|
||||
0
roles/mail/tasks/goimapnotify.yml
Normal file
0
roles/mail/tasks/goimapnotify.yml
Normal file
|
|
@ -76,11 +76,6 @@
|
|||
regexp: "^x-scheme-handler/mailto="
|
||||
line: "x-scheme-handler/mailto=mutt.desktop"
|
||||
|
||||
- name: Install goimapnotify
|
||||
pacman:
|
||||
name: goimapnotify
|
||||
state: present
|
||||
|
||||
- include_tasks: msmtp.yml
|
||||
- include_tasks: isync.yml
|
||||
#- include_tasks: offlineimap.yml
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
---
|
||||
- name: reload systemd config
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: reload user systemd config
|
||||
command: systemctl --user daemon-reload
|
||||
become: yes
|
||||
become_user: "{{ user.name }}"
|
||||
environment:
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue