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

35 lines
852 B
YAML
Raw Normal View History

2023-11-07 17:08:58 +00:00
- 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