diff --git a/tasks/archive/go.yml b/tasks/archive/go.yml index f7b53dc..79ee240 100644 --- a/tasks/archive/go.yml +++ b/tasks/archive/go.yml @@ -16,6 +16,14 @@ - (do_go_install is defined and do_go_install) or not stat_path_go.stat.exists block: + - name: Remove existing go install + when: + - ansible_system == 'Linux' + become: "{{ ext_become }}" + ansible.builtin.file: + state: absent + path: "{{ path.go }}" + - name: Download go archive register: get_url_go ansible.builtin.get_url: diff --git a/tasks/src/hyprland.yml b/tasks/src/hyprland.yml index 5f1cbd8..9163bc5 100644 --- a/tasks/src/hyprland.yml +++ b/tasks/src/hyprland.yml @@ -9,7 +9,14 @@ state: absent path: "{{ path.prefix }}/{{ file }}" +- name: Check if hyprland is installed + register: stat_hyprland_bin + ansible.builtin.stat: + path: "{{ path.bin }}/Hyprland" + - name: Build and install hyprland + when: + - not stat_hyprland_bin.stat.exists block: - name: Clone git repository ansible.builtin.git: