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

36 lines
826 B
YAML
Raw Normal View History

2023-11-07 17:08:58 +00:00
- become: yes
2024-05-08 00:22:00 +00:00
when: ansible_distribution == "Ubuntu"
2023-11-07 17:08:58 +00:00
block:
2024-05-08 00:22:00 +00:00
- name: "[Ubuntu] add ppa"
2023-11-07 17:08:58 +00:00
apt_repository:
repo: ppa:mjasnik/ppa
2024-05-08 00:22:00 +00:00
- name: "[Ubuntu] install timekpr"
2023-11-07 17:08:58 +00:00
apt:
update_cache: yes
state: latest
pkg:
- timekpr-next
2024-05-08 00:22:00 +00:00
- name: "[Arch] install timekpr"
shell:
cmd:
yay -S --needed --noconfirm timekpr-next
when: ansible_distribution == "Archlinux"
2023-11-07 17:08:58 +00:00
2024-05-08 00:22:00 +00:00
- become: yes
block:
- name: "[All] configure"
2023-11-07 17:08:58 +00:00
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 }}"
2024-05-08 00:22:00 +00:00
- name: "[All] Enable service"
2023-11-07 17:08:58 +00:00
become: yes
ansible.builtin.systemd:
name: timekpr
state: started
enabled: yes