From 6d927c0f20f95dfb1ece8766dfaf34805bc2f820 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sat, 24 Jan 2026 16:24:28 +0100 Subject: Fix ansible_facts to use only bracket notation instead of dot notation Co-authored-by: claude.ai --- roles/hyprtheme/tasks/main.yml | 12 ++++++------ roles/hyprtheme/tasks/template-theme.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'roles/hyprtheme/tasks') diff --git a/roles/hyprtheme/tasks/main.yml b/roles/hyprtheme/tasks/main.yml index 09835eee..44d2b60d 100644 --- a/roles/hyprtheme/tasks/main.yml +++ b/roles/hyprtheme/tasks/main.yml @@ -12,20 +12,20 @@ - name: "Create current theme directory" ansible.builtin.file: - path: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/current" + path: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/current" state: "directory" mode: "0755" - name: "Create themes directory" ansible.builtin.file: - path: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/themes/{{ item }}" + path: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/themes/{{ item }}" state: "directory" mode: "0755" loop: "{{ hyprtheme_themes }}" - name: "Create scripts directory" ansible.builtin.file: - path: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/scripts" + path: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/scripts" state: "directory" mode: "0755" @@ -38,7 +38,7 @@ - name: "Copy theme scripts" ansible.builtin.copy: src: "{{ item }}" - dest: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/{{ item }}" + dest: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/{{ item }}" mode: "0755" loop: - "scripts/theme-set" @@ -51,6 +51,6 @@ # This will ignore the errors in the script, because the script restarts some hyprland services, which # will fail on ssh connection, but having the theme files placed in the right directory will make sure that # the first setup of hyprtheme is working and doesn't show errors on first boot - cmd: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/scripts/theme-set {{ hyprtheme_default_theme }}" - creates: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/current/hyprland.conf" + cmd: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/scripts/theme-set {{ hyprtheme_default_theme }}" + creates: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/current/hyprland.conf" failed_when: false diff --git a/roles/hyprtheme/tasks/template-theme.yml b/roles/hyprtheme/tasks/template-theme.yml index ef3323ff..ea202564 100644 --- a/roles/hyprtheme/tasks/template-theme.yml +++ b/roles/hyprtheme/tasks/template-theme.yml @@ -19,7 +19,7 @@ - name: "Template theme files for: {{ hyprtheme_name }}" ansible.builtin.template: src: "theme/{{ file }}.j2" - dest: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/themes/{{ hyprtheme_name }}/{{ file }}" + dest: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/themes/{{ hyprtheme_name }}/{{ file }}" mode: "0644" loop: "{{ hyprtheme_theme_files }}" loop_control: @@ -35,7 +35,7 @@ - name: "Copy static theme files for: {{ hyprtheme_name }}" ansible.builtin.copy: src: "themes/{{ hyprtheme_name }}/" - dest: "{{ ansible_facts['env'].HOME }}/.config/hyprtheme/themes/{{ hyprtheme_name }}/" + dest: "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/themes/{{ hyprtheme_name }}/" mode: "0644" tags: # This is ignored because it is possible that some themes (ex. matte-black), would provide -- cgit v1.2.3