ansible-desktop/roles/desktop/tasks/timekpr.yml
2023-11-07 18:09:29 +01:00

35 lines
852 B
YAML

- become: yes
block:
- name: add ppa [Ubuntu]
when: ansible_distribution == "Ubuntu"
apt_repository:
repo: ppa:mjasnik/ppa
- name: install timekpr [Ubuntu]
when: ansible_distribution == "Ubuntu"
apt:
update_cache: yes
state: latest
pkg:
- timekpr-next
- name: install timekpr [Arch]
shell:
cmd:
yay -S --needed --noconfirm timekpr-next
when: ansible_distribution == "Archlinux"
- name: 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: "Enable service"
become: yes
ansible.builtin.systemd:
name: timekpr
state: started
enabled: yes