Files
configs/playbooks/roles/desktop_hyprland/tasks/main.yml
2024-10-09 21:25:58 +02:00

55 lines
1.3 KiB
YAML

---
- name: "Load vars"
ansible.builtin.include_vars: "{{ item }}"
tags:
- install
with_first_found:
- files:
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
- default.yml
paths: ../vars
skip: true
- name: "Install dependencies"
tags:
- install
when: desktop_hyprland_pkgs
become: "{{ install_with_root }}"
ansible.builtin.package:
name: "{{ desktop_hyprland_pkgs }}"
- name: "Install flatpak"
tags:
- install
when: desktop_hyprland_flatpak
become: "{{ install_with_root }}"
community.general.flatpak:
name: "{{ desktop_hyprland_flatpak }}"
- name: "Ensure dir"
tags:
- config
become: "{{ use_become }}"
ansible.builtin.file:
path: "{{ home }}/.config/hypr"
state: directory
mode: "0700"
owner: "{{ username }}"
- name: "Copy templates"
tags:
- config
become: "{{ use_become }}"
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ home }}/.config/hypr/{{ item.path | regex_replace('\\.j2$', '') }}"
mode: "{{ item.mode }}"
owner: "{{ username }}"
with_community.general.filetree:
- ../templates
loop_control:
label: "{{ item.path }}"
when: item.state == 'file'