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: