try to delete some apps

This commit is contained in:
L3D 2021-12-20 22:19:36 +01:00
parent 6d5fa28160
commit 4811481065
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 27 additions and 0 deletions

8
defaults/main.yml Normal file
View file

@ -0,0 +1,8 @@
---
remove_win_apps__product_id:
- 'Microsoft.SkypeApp'
- 'Microsoft.MicrosoftOfficeHub'
- 'Microsoft.Office.OneNote'
- 'Microsoft.Office'
remove_win_apps__users: []

6
tasks/main.yml Normal file
View file

@ -0,0 +1,6 @@
---
- name: remove windows apps
ansible.builtin.include_tasks: remove_apps.yml
- name: remove windows apps for other users
ansible.builtin.include_tasks: remove_apps_as_user.yml

5
tasks/remove_apps.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: remove windows apps
ansible.windows.win_package:
product_id: "{{ remove_win_apps__product_id }}"
state: absent

View file

@ -0,0 +1,8 @@
---
- name: remove windows apps as user
ansible.windows.win_package:
product_id: "{{ remove_win_apps__product_id }}"
state: absent
become_method: runas
become_user: "{{ item }}"
with_items: "{{ remove_win_apps__users }}"