forked from AlexNabokikh/windows-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(winget): introduced winget package installation task
- Loading branch information
1 parent
99a3dce
commit 098186c
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Install winget packages. | ||
ansible.windows.win_powershell: | ||
script: | | ||
$app = "{{ item.name | default(item) }}" | ||
if ($(winget list $app) -like "*No installed package found*") { | ||
winget install --accept-package-agreements --accept-source-agreements -h -s "winget" $app | ||
} | ||
else { | ||
winget upgrade $app | ||
} | ||
loop: "{{ winget_packages }}" |