diff --git a/install.yml b/install.yml index 654e753..a67d85b 100644 --- a/install.yml +++ b/install.yml @@ -28,8 +28,8 @@ - role: gpg tags: gpg when: ansible_user_id != 'root' - - role: khal - tags: khal + - role: dav + tags: dav when: ansible_user_id != 'root' - role: sway tags: sway diff --git a/roles/khal/tasks/main.yml b/roles/dav/tasks/main.yml similarity index 58% rename from roles/khal/tasks/main.yml rename to roles/dav/tasks/main.yml index 9b740a3..468eaa2 100644 --- a/roles/khal/tasks/main.yml +++ b/roles/dav/tasks/main.yml @@ -6,6 +6,9 @@ loop: - ~/.vdirsyncer/ - ~/.config/khal/ + - ~/.config/khard/ + - ~/.vdirsyncer/khal/ + - ~/.vdirsyncer/khard/ - name: copy vdirsyncer config template: @@ -16,3 +19,11 @@ template: src: khal.j2 dest: ~/.config/khal/config + +- name: copy khard config + template: + src: khard.j2 + dest: ~/.config/khard/khard.conf + +- name: vdirsyncer init + shell: yes | vdirsyncer discover diff --git a/roles/khal/templates/khal.j2 b/roles/dav/templates/khal.j2 similarity index 82% rename from roles/khal/templates/khal.j2 rename to roles/dav/templates/khal.j2 index 73fe7fd..21afa92 100644 --- a/roles/khal/templates/khal.j2 +++ b/roles/dav/templates/khal.j2 @@ -1,12 +1,12 @@ [calendars] [[home]] -path = ~/share/docs/calendar/home +path = ~/.vdirsyncer/khal/home type = discover color = light green [[anniversaires]] -path = ~/share/docs/calendar/anniversaires +path = ~/.vdirsyncer/khal/anniversaires type = discover color = light blue diff --git a/roles/dav/templates/khard.j2 b/roles/dav/templates/khard.j2 new file mode 100644 index 0000000..4126c29 --- /dev/null +++ b/roles/dav/templates/khard.j2 @@ -0,0 +1,40 @@ +[addressbooks] +[[contacts]] +path = ~/.vdirsyncer/khard/contacts + +[general] +debug = no +default_action = list +# These are either strings or comma seperated lists +editor = vim, -i, NONE +merge_editor = vimdiff + +[contact table] +# display names by first or last name: first_name / last_name / formatted_name +display = first_name +# group by address book: yes / no +group_by_addressbook = no +# reverse table ordering: yes / no +reverse = no +# append nicknames to name column: yes / no +show_nicknames = no +# show uid table column: yes / no +show_uids = yes +# sort by first or last name: first_name / last_name / formatted_name +sort = last_name +# localize dates: yes / no +localize_dates = yes +# set a comma separated list of preferred phone number types in descending priority +# or nothing for non-filtered alphabetical order +preferred_phone_number_type = pref, cell, home +# set a comma separated list of preferred email address types in descending priority +# or nothing for non-filtered alphabetical order +preferred_email_address_type = pref, work, home + +[vcard] +# preferred vcard version: 3.0 / 4.0 +preferred_version = 4.0 +# Look into source vcf files to speed up search queries: yes / no +search_in_source_files = no +# skip unparsable vcard files: yes / no +skip_unparsable = no diff --git a/roles/khal/templates/vdirsyncer.j2 b/roles/dav/templates/vdirsyncer.j2 similarity index 92% rename from roles/khal/templates/vdirsyncer.j2 rename to roles/dav/templates/vdirsyncer.j2 index ee3221a..0f9147b 100644 --- a/roles/khal/templates/vdirsyncer.j2 +++ b/roles/dav/templates/vdirsyncer.j2 @@ -8,7 +8,7 @@ collections = ["from a", "from b"] [storage my_contacts_local] type = "filesystem" -path = "~/share/docs/contacts" +path = "~/.vdirsyncer/khard" fileext = ".vcf" [storage my_contacts_remote] @@ -25,7 +25,7 @@ metadata = ["color"] [storage my_calendars_local] type = "filesystem" -path = "~/share/docs/calendar" +path = "~/.vdirsyncer/khal" fileext = ".ics" [storage my_calendars_remote]