1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sway.git synced 2024-08-16 13:49:49 +02:00
ansible_role_sway/tasks/waybar.yml

60 lines
1.4 KiB
YAML

---
- name: Ensure waybar is installed.
ansible.builtin.package:
name: "{{ item }}"
state: "present"
become: true
with_items:
- 'waybar'
- 'wlogout'
- 'qpwgraph'
- 'pavucontrol'
- name: Create waybar config folder
become: true
ansible.builtin.file:
path: "{{ swayusr.home }}/.config/waybar/"
state: directory
mode: '0750'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
- name: Deploy waybar weather script
become: true
ansible.builtin.template:
src: 'templates/wttr.py.j2'
dest: "{{ swayusr.home }}/.config/waybar/wttr.py"
mode: '0750'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
backup: true
- name: Deploy ping script
become: true
ansible.builtin.template:
src: 'templates/ping.py.j2'
dest: "{{ swayusr.home }}/.config/waybar/ping.py"
mode: '0750'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
backup: true
- name: Deploy waybar stylesheet
become: true
ansible.builtin.template:
src: 'templates/waybar.css.j2'
dest: "{{ swayusr.home }}/.config/waybar/style.css"
mode: '0640'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
backup: true
- name: Deploy waybar config
become: true
ansible.builtin.template:
src: 'templates/waybar.json.j2'
dest: "{{ swayusr.home }}/.config/waybar/config"
mode: '0640'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
backup: true