--- - name: Install taskwarrior master client hosts: raspberry gather_facts: false tasks: - name: Install taskwarrior apt: pkg: - taskwarrior - name: Add user to server remote_user: taskd environment: TASKDDATA: /home/taskd/data tags: - one-time shell: | taskd add org 'eug-vs-xyz' taskd add user 'eug-vs-xyz' 'eug-vs' ls ~/data/orgs/eug-vs-xyz/users > /tmp/taskd-user-id - name: Configure taskwarrior client shell: | mkdir -p ~/.config/task echo "confirmation=off" > ~/.taskrc task config taskd.certificate -- ~/.config/task/api.cert.pem task config taskd.key -- ~/.config/task/api.key.pem task config taskd.ca -- ~/.config/task/ca.cert.pem task config taskd.server -- taskd.eug-vs.xyz:53589 task config taskd.credentials -- eug-vs-xyz\/eug-vs\/$(cat /tmp/taskd-user-id) task config taskd.trust -- ignore hostname mv ~/.taskrc ~/.config/task/taskrc.server echo "include ~/.config/task/taskrc.server" > ~/.taskrc - name: Copy certificates become: true shell: | cd /tmp/taskserver/pki cp api.*.pem /home/eug-vs/.config/task cp ca.cert.pem /home/eug-vs/.config/task chown -R eug-vs:eug-vs /home/eug-vs/.config/task # This is a workaround to https://github.com/GothenburgBitFactory/taskserver/issues/46 - name: Create recurrence cronjob cron: name: "Create recurrent tasks" minute: "0" job: "/usr/bin/task sync && /usr/bin/task && /usr/bin/task sync" - name: Run task sync init shell: task sync init