Why Automate Deletion?
Creating a Maintenance item will allow you to automate the process of clearing your ansible folder. This is a great way to delete the folder and free up space on a daily/weekly/monthly basis for your devices.
Getting Started
To create a Maintenance item, head to Catalog > Maintenance > New
Once the pop-up appears, input:
-
Name
-
Custom Script
-
Frequency
Below is the code that you can copy and paste to your Maintenance item.
/Library/Addigy/lan-cache find-cache /Library/Addigy/ansible/packages | xargs -I{} rm "{}"
Note: This is the recommended method for clearing disk space. It will take up to 4 hours for `lan-cache` to see this change and free up disk space.
After saving the Maintenance item, assign it to the policy (or policies) of your choosing by clicking the three dots in the Actions column and selecting Assignments
After the policy is deployed, the Maintenance item should run at its next scheduled time.