From feead7ed0e8ef8370eaa2d28cc61a042e4f33247 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 5 Oct 2022 09:45:11 +0000 Subject: [PATCH] winroom: add 7zip file associations --- roles/winroom/tasks/7zip.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/winroom/tasks/7zip.yml b/roles/winroom/tasks/7zip.yml index 4c9241d..05aebff 100644 --- a/roles/winroom/tasks/7zip.yml +++ b/roles/winroom/tasks/7zip.yml @@ -1,3 +1,18 @@ - name: Install 7-zip win_chocolatey: name: 7zip + register: install + +- when: install.changed + block: + - name: Create 7-zip filetype + win_command: cmd.exe /c ftype 7-zip=%ProgramFiles%\7-zip\7zFM.exe + + - name: Associate 7-zip with archive filetypes + win_command: cmd.exe /c assoc .{{ item }}=7-zip + loop: + - gz + - tar + - targz + - rar + - 7z