Skip to content

Commit

Permalink
fix: 🪟win32yank only needed on ubuntu-ish os.
Browse files Browse the repository at this point in the history
  • Loading branch information
TechDufus committed Sep 19, 2024
1 parent c99260c commit a378ebf
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions roles/system/tasks/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,42 @@
- open-iscsi
state: present
become: true

- name: System | Detecting win32yank
ansible.builtin.stat:
path: /usr/local/bin/win32yank.exe
register: win32yank_installed
when: ansible_host_environment_is_wsl

- name: "System | Install win32yank.exe"
when:
- ansible_host_environment_is_wsl
- not win32yank_installed.stat.exists
block:
- name: Download win32yank zip
ansible.builtin.get_url:
url: https://github.com/equalsraf/win32yank/releases/download/v0.0.4/win32yank-x64.zip
dest: /tmp/win32yank.zip
mode: "0755"

- name: System | Unzip win32yank.exe
ansible.builtin.unarchive:
src: /tmp/win32yank.zip
dest: /tmp
mode: "0755"

- name: System | Copy win32yank into path
ansible.builtin.copy:
remote_src: true
src: /tmp/win32yank.exe
dest: /usr/local/bin/win32yank.exe
mode: "0755"
become: true

- name: System | Remove tmp files
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /tmp/win32yank.zip
- /tmp/win32yank.exe

0 comments on commit a378ebf

Please sign in to comment.