Add a --dry-run option to gather analytics locally, even if analytics is disabled in settings.

This commit is contained in:
Graham Mainwaring
2019-10-17 13:54:13 -04:00
parent 5e797a5ad5
commit 7dd241fcff
2 changed files with 11 additions and 4 deletions

View File

@@ -88,8 +88,8 @@ def gather(dest=None, module=None, collection_type='scheduled'):
logger.exception("Invalid License provided, or No License Provided")
return "Error: Invalid License provided, or No License Provided"
if not settings.INSIGHTS_TRACKING_STATE:
logger.error("Automation Analytics not enabled")
if collection_type != 'dry-run' and not settings.INSIGHTS_TRACKING_STATE:
logger.error("Automation Analytics not enabled. Use --dry-run to gather locally without sending.")
return
if module is None: