ansible-desktop/roles/desktop/tasks/timekpr.yml

36 lines
826 B
YAML

- become: yes
when: ansible_distribution == "Ubuntu"
block:
- name: "[Ubuntu] add ppa"
apt_repository:
repo: ppa:mjasnik/ppa
- name: "[Ubuntu] install timekpr"
apt:
update_cache: yes
state: latest
pkg:
- timekpr-next
- name: "[Arch] install timekpr"
shell:
cmd:
yay -S --needed --noconfirm timekpr-next
when: ansible_distribution == "Archlinux"
- become: yes
block:
- name: "[All] configure"
template:
src: var/lib/timekpr/config/timekpr.USER.conf.j2
dest: /var/lib/timekpr/config/timekpr.{{ansible_user_id}}.conf
vars:
user: "{{ ansible_user_id }}"
- name: "[All] Enable service"
become: yes
ansible.builtin.systemd:
name: timekpr
state: started
enabled: yes