--- - name: Install taskwarrior master client hosts: raspberry tasks: - name: Install taskwarrior tags: - slow apt: pkg: - taskwarrior - name: Add user to server become: true tags: - one-time shell: | taskd add org 'eug-vs-xyz' --data /var/lib/taskd taskd add user 'eug-vs-xyz' 'eug-vs' --data /var/lib/taskd chown -R taskd:taskd /var/lib/taskd ls /var/lib/taskd/orgs/eug-vs-xyz/users > /home/eug-vs/taskd-user-id - name: Generate keys & certificates become: true shell: | mkdir /home/eug-vs/.task cd /tmp/taskserver/pki ./generate.client eug-vs cp eug-vs.*.pem /home/eug-vs/.task cp ca.cert.pem /home/eug-vs/.task chown -R eug-vs:eug-vs /home/eug-vs/.task - name: Create master taskrc shell: | echo "confirmation=off" >> ~/.taskrc task config taskd.certificate -- ~/.task/eug-vs.cert.pem task config taskd.key -- ~/.task/eug-vs.key.pem task config taskd.ca -- ~/.task/ca.cert.pem task config taskd.server -- taskd.eug-vs.xyz:53589 task config taskd.credentials -- eug-vs-xyz\/eug-vs\/$(cat /home/eug-vs/taskd-user-id) task config taskd.trust -- ignore hostname - name: Run task sync init shell: task sync init