try to delete some apps
This commit is contained in:
parent
6d5fa28160
commit
4811481065
4 changed files with 27 additions and 0 deletions
8
defaults/main.yml
Normal file
8
defaults/main.yml
Normal 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
6
tasks/main.yml
Normal 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
5
tasks/remove_apps.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: remove windows apps
|
||||
ansible.windows.win_package:
|
||||
product_id: "{{ remove_win_apps__product_id }}"
|
||||
state: absent
|
8
tasks/remove_apps_as_user.yml
Normal file
8
tasks/remove_apps_as_user.yml
Normal 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 }}"
|
Reference in a new issue