From 2f7261f04fac649fb98e919b19341783b704b4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20R=C3=B8stvik?= Date: Tue, 8 Nov 2022 21:45:32 +0100 Subject: [PATCH] Use deb --- ansible/tasks/omp.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ansible/tasks/omp.yml b/ansible/tasks/omp.yml index c581a69..0880667 100644 --- a/ansible/tasks/omp.yml +++ b/ansible/tasks/omp.yml @@ -32,17 +32,17 @@ ansible.builtin.get_url: url: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/{{ omp_latest.tag }}/posh-linux-{{ apt_arch }} dest: /usr/local/bin/oh-my-posh - mode: "0744" + mode: "0755" force: "yes" - name: Check if Chezmoi is installed ansible.builtin.stat: - path: /usr/local/bin/chezmoi + path: /usr/bin/chezmoi register: chezmoi_bin - name: Check Chezmoi version when: chezmoi_bin.stat.exists - ansible.builtin.command: /usr/local/bin/chezmoi --version + ansible.builtin.command: /usr/bin/chezmoi --version changed_when: false register: chezmoi_ver @@ -56,11 +56,8 @@ - name: Download Chezmoi when: not chezmoi_bin.stat.exists or chezmoi_latest.tag.split(",")[0] != ( "chezmoi version v" + chezmoi_ver.stdout ) become: "{{ do_become }}" - ansible.builtin.get_url: - url: https://github.com/twpayne/chezmoi/releases/download/{{ chezmoi_latest.tag }}/chezmoi-linux-{{ apt_arch }} - dest: /usr/local/bin/chezmoi - mode: "0744" - force: "yes" + ansible.builtin.apt: + deb: https://github.com/twpayne/chezmoi/releases/download/{{ chezmoi_latest.tag }}/chezmoi_{{ chezmoi_latest.tag | replace("v","") }}_linux_{{ apt_arch }}.deb - name: Add OMP to bash ansible.builtin.lineinfile: