Skip to content

Commit

Permalink
Don't cleanup by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Dec 13, 2020
1 parent 984144f commit bbe79d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions inventory.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set_powerplan=False
change_hostname=False
set_spy_block_hosts=False
disable_defender=False
cleanup=False

install_simplewall=False
install_brave=False
Expand Down
3 changes: 3 additions & 0 deletions tasks/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
- name: Remove all Event Viewer entries
when: cleanup
win_shell: |
Get-EventLog -List | ForEach-Object {$_.Log} | ForEach-Object {Clear-EventLog -LogName $_ }
- name: Remove all temporary files
when: cleanup
win_shell: |
Remove-Item "{{ ansible_env.TEMP }}\*" -Recurse -Force
Remove-Item "{{ ansible_env.SystemRoot }}\Temp\*" -Recurse -Force
$true
- name: Clean Powershell history
when: cleanup
win_shell: |
Clear-History
Remove-Item (Get-PSReadlineOption).HistorySavePath -ErrorAction SilentlyContinue
Expand Down

0 comments on commit bbe79d5

Please sign in to comment.