summaryrefslogtreecommitdiffstats
path: root/awx_collection
diff options
context:
space:
mode:
authorSeth Foster <fosterbseth@gmail.com>2021-05-10 19:54:33 +0200
committerSeth Foster <fosterbseth@gmail.com>2021-06-08 20:33:24 +0200
commita7b29f6112ca83a64dc1ddfd9584e259d03ed8d9 (patch)
treee32dedd2120e6cc584cb9f650add355a4f1e5f55 /awx_collection
parentAdded env variable CONTROLLER_HOST, et al. Add awx.awx namespace to the runti... (diff)
downloadawx-a7b29f6112ca83a64dc1ddfd9584e259d03ed8d9.tar.xz
awx-a7b29f6112ca83a64dc1ddfd9584e259d03ed8d9.zip
controller_inventory.yml in addition to tower_inventory.yml
Diffstat (limited to 'awx_collection')
-rw-r--r--awx_collection/plugins/inventory/controller.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/awx_collection/plugins/inventory/controller.py b/awx_collection/plugins/inventory/controller.py
index 6cbdc8f328..fa5d09cfd2 100644
--- a/awx_collection/plugins/inventory/controller.py
+++ b/awx_collection/plugins/inventory/controller.py
@@ -82,15 +82,26 @@ def handle_error(**kwargs):
class InventoryModule(BaseInventoryPlugin):
NAME = 'awx.awx.controller' # REPLACE
# Stays backward compatible with the inventory script.
- # If the user supplies '@tower_inventory' as path, the plugin will read from environment variables.
+ # If the user supplies '@controller_inventory' as path, the plugin will read from environment variables.
no_config_file_supplied = False
def verify_file(self, path):
- if path.endswith('@tower_inventory'):
+ if path.endswith('@controller_inventory') or path.endswith('@tower_inventory'):
self.no_config_file_supplied = True
return True
elif super(InventoryModule, self).verify_file(path):
- return path.endswith(('tower_inventory.yml', 'tower_inventory.yaml', 'tower.yml', 'tower.yaml'))
+ return path.endswith(
+ (
+ 'controller_inventory.yml',
+ 'controller_inventory.yaml',
+ 'controller.yml',
+ 'controller.yaml',
+ 'tower_inventory.yml',
+ 'tower_inventory.yaml',
+ 'tower.yml',
+ 'tower.yaml',
+ )
+ )
else:
return False