From cffafd75f9d68b78d3fcae42d579ecdf3b96e803 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Fri, 6 Dec 2024 00:22:22 -0500 Subject: [PATCH] add injectors for aap --- .../commands/create_initial_data.py | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/aap_eda/core/management/commands/create_initial_data.py b/src/aap_eda/core/management/commands/create_initial_data.py index 382680563..238922bff 100644 --- a/src/aap_eda/core/management/commands/create_initial_data.py +++ b/src/aap_eda/core/management/commands/create_initial_data.py @@ -295,11 +295,30 @@ "type": "boolean", "secret": False, }, + { + "id": "request_timeout", + "label": ("Request Timeout"), + "type": "string", + "secret": False, + "default": "10", + "help_text": ( + "Specify the timeout Ansible should use in requests to" + "the host. Defaults to 10s", + ), + }, ], "required": ["host"], } AAP_INJECTORS = { + "extra_vars": { + "aap_hostname": "{{host}}", + "aap_username": "{{username}}", + "aap_password": "{{password}}", + "aap_token": "{{oauth_token}}", + "aap_request_timeout": "{{request_timeout}}", + "aap_validate_certs": "{{verify_ssl}}", + }, "env": { "TOWER_HOST": "{{host}}", "TOWER_USERNAME": "{{username}}", @@ -311,7 +330,14 @@ "CONTROLLER_PASSWORD": "{{password}}", "CONTROLLER_VERIFY_SSL": "{{verify_ssl}}", "CONTROLLER_OAUTH_TOKEN": "{{oauth_token}}", - } + "CONTROLLER_REQUEST_TIMEOUT": "{{request_timeout}}", + "AAP_HOSTNAME": "{{host}}", + "AAP_USERNAME": "{{username}}", + "AAP_PASSWORD": "{{password}}", + "AAP_VALIDATE_CERTS": "{{verify_ssl}}", + "AAP_TOKEN": "{{oauth_token}}", + "AAP_REQUEST_TIMEOUT": "{{request_timeout}}", + }, } VAULT_INPUTS = {