From d55f36eb9001a8983e32ddb28d97a0f854b3d374 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Tue, 3 Nov 2020 13:24:44 -0800 Subject: [PATCH] add clarifying comment * noting that the inv update task only uses the inventory update management command to save the inv to the database (it doesn't do the work of fetching hosts / groups) --- awx/main/tasks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index a0dc41f756..7e013bd198 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -2784,6 +2784,12 @@ class RunInventoryUpdate(BaseTask): from awx.main.management.commands.inventory_import import Command as InventoryImportCommand cmd = InventoryImportCommand() try: + # note that we are only using the management command to + # save the inventory data to the database. + # we are not asking it to actually fetch hosts / groups. + # that work was taken care of earlier, when + # BaseTask.run called ansible-inventory (by way of ansible-runner) + # for us. save_status, tb, exc = cmd.perform_update(options, data, inventory_update) except Exception as raw_exc: # Ignore license errors specifically