replace handlers with individual tasks

This commit is contained in:
Morgan McMillian 2024-10-15 12:14:08 -07:00
parent e0973862de
commit 514a7b429d
4 changed files with 22 additions and 19 deletions

View file

@ -36,4 +36,10 @@
mode: "0644"
checksum: sha256:https://github.com/{{ gh_user }}/{{ gh_project }}/releases/download/{{ release_latest['tag'] }}/{{ release_checksum }}
when: not release_local.stat.exists
notify: "doctl updated"
register: doctl_dl
- name: "doctl updated"
ansible.builtin.unarchive:
src: "{{ gh_bin_dir }}/{{ release_filename }}"
dest: "{{ home_dir }}/bin"
when: doctl_dl.changed

View file

@ -37,19 +37,3 @@
gh_user: artempyanykh
gh_project: marksman
handlers:
- name: "doctl updated"
ansible.builtin.unarchive:
src: "{{ gh_bin_dir }}/{{ release_filename }}"
dest: "{{ home_dir }}/bin"
- name: "starship updated"
ansible.builtin.unarchive:
src: "{{ gh_bin_dir }}/{{ release_filename }}"
dest: "{{ home_dir }}/bin"
- name: "marksman updated"
ansible.builtin.copy:
src: "{{ gh_bin_dir }}/{{ release_filename }}-{{ release_latest_tag }}"
dest: "{{ home_dir }}/bin/marksman"
mode: "0755"

View file

@ -31,4 +31,11 @@
mode: "0644"
# checksum: sha256:https://github.com/{{ gh_user }}/{{ gh_project }}/releases/download/{{ release_latest['tag'] }}/{{ release_checksum }}
when: not release_local.stat.exists
notify: "marksman updated"
register: marksman_dl
- name: "marksman updated"
ansible.builtin.copy:
src: "{{ gh_bin_dir }}/{{ release_filename }}-{{ release_latest_tag }}"
dest: "{{ home_dir }}/bin/marksman"
mode: "0755"
when: marksman_dl.changed

View file

@ -33,4 +33,10 @@
mode: "0644"
checksum: sha256:https://github.com/{{ gh_user }}/{{ gh_project }}/releases/download/{{ release_latest['tag'] }}/{{ release_checksum }}
when: not release_local.stat.exists
notify: "starship updated"
register: starship_dl
- name: "starship updated"
ansible.builtin.unarchive:
src: "{{ gh_bin_dir }}/{{ release_filename }}"
dest: "{{ home_dir }}/bin"
when: starship_dl.changed