diff options
Diffstat (limited to 'task-master-client.yaml')
-rw-r--r-- | task-master-client.yaml | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/task-master-client.yaml b/task-master-client.yaml index 57f7ec6..9cee31a 100644 --- a/task-master-client.yaml +++ b/task-master-client.yaml @@ -1,6 +1,7 @@ --- - name: Install taskwarrior master client hosts: raspberry + gather_facts: false tasks: - name: Install taskwarrior tags: @@ -10,34 +11,36 @@ - taskwarrior - name: Add user to server - become: true + remote_user: taskd + environment: + TASKDDATA: /home/taskd/data 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 + 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: Create master taskrc + - name: Configure taskwarrior client 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 + 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 /home/eug-vs/taskd-user-id) + 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 - name: Run task sync init shell: task sync init |