Ansibel token

This commit is contained in:
CHIEFSOFT\ameye
2025-09-24 15:49:45 -04:00
parent f55283c1b8
commit 8e0697eda9
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -12,6 +12,7 @@ REMOTE_COMPOSER_PATH='chiefsoft@10.10.10.13:/home/chiefsoft/DevSites/MERMS/Merms
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
# ANSIBLE PATHS *********************************************
ANSIBLE_LOGIN_TOKEN=''
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://172.16.4.90:3000"
ANSIBLE_LOGIN_URL="/api/auth/login"
ANSIBLE_TOKEN_URL="/api/user/tokens"
+4 -3
View File
@@ -13,10 +13,11 @@ REMOTE_COMPOSER_PATH='chiefsoft@10.10.10.13:/home/chiefsoft/DevSites/MERMS/Merms
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
# ANSIBLE PATHS *********************************************
ANSIBLE_LOGIN_TOKEN="ghp5vseetodryrav77b8kfh6azuwwr-hxiky-qc3bue="
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://10.13.2.18:3000"
ANSIBLE_LOGIN_URL="/auth/login"
ANSIBLE_TOKEN_URL="/user/tokens"
ANSIBLE_TASK_URL="/project/"
ANSIBLE_LOGIN_URL="/api/auth/login"
ANSIBLE_TOKEN_URL="/api/user/tokens"
ANSIBLE_TASK_URL="/api/project/"
ANSIBLE_AUTOMATION_PROJECT_ID="1"
SOCKET_SERVER_LOCATION="http://10.13.3.15:5006"
+4
View File
@@ -108,6 +108,10 @@ abstract class BaseController extends Controller
public function ansibleLogin(): string
{
$token = null;
if (isset($_ENV['ANSIBLE_LOGIN_TOKEN']) && $_ENV['ANSIBLE_LOGIN_TOKEN'] !=''){
return $_ENV['ANSIBLE_LOGIN_TOKEN'];
}
try {
// Code that might throw an exception
$result = "Unhandled exception";