kulla.taskwarrior
Taskwarrior
This guide explains how to install and set up the task management tool taskwarrior.
Role Variables
Here are the variables you can use to configure this tool:
# The user for whom taskwarrior will be set up
# (It defaults to the value of "ansible_user_id")
taskwarrior_user_id: "{{ ansible_user_id }}"
# Set to true if you want to create an hourly cron job to sync taskwarrior
# (Defaults to "false")
taskwarrior_cronjob_sync:
# Configuration settings for taskwarrior
taskwarrior_configuration:
# Certificate name for the taskserver (taskd.ca)
taskwarrior_ca_certificate:
# Client's certificate name (taskd.certificate)
taskwarrior_client_certificate:
# Client's key name (taskd.key)
taskwarrior_client_key:
For additional variables that allow for more specific configurations, check defaults/main.yml
. Keep in mind these variables may change in the future.
Example Playbook
Here's a sample playbook to help you get started:
- hosts: localhost
roles:
- taskwarrior
vars:
taskwarrior_user_id: myusername
taskwarrior_ca_certificate: ca.cert.pem
taskwarrior_client_certificate: first_last.cert.pem
taskwarrior_client_key: first_last.key.pem
taskwarrior_cronjob_sync: true
taskwarrior_configuration: |
# -- My taskwarrior settings --
weekstart=Sunday
color.tag.important=bold white on rgb010
context.work=project:work or +important
You can also read the taskwarrior configuration from a file using the file lookup plugin or a template with the template lookup plugin:
taskwarrior_configuration: "{{ lookup('file', 'my_config.conf') }}"
Syncing with a Taskserver
To connect to a taskserver, provide the required certificate names. If these variables are set, the certificates will be copied to the remote machine. Make sure to protect them properly, like using Ansible vault:
taskwarrior_ca_certificate: ca.cert.pem
taskwarrior_client_certificate: first_last.cert.pem
taskwarrior_client_key: first_last.key.pem
This role will automatically set the necessary configuration for taskd.ca
, taskd.key
, and taskd.certificate
. However, you also need to add the following settings in taskwarrior_configuration
:
taskwarrior_configuration: |
taskd.server=...
taskd.credentials=...
For more guidance on setting up taskwarrior with a taskserver, refer to the taskwarrior documentation.
Dependencies and Requirements
There are no dependencies or requirements for this role.
License
As far as legal limitations allow, I give up all copyright and related rights to this software available at https://github.com/kulla/ansible-role-taskwarrior. I release this software under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. This software is published from Germany.
Author Information
The main author is Stephan Kulla. Thanks to nkakouros for their contributions.
Installs and configures taskwarrior
ansible-galaxy install kulla.taskwarrior