Ansibel token
This commit is contained in:
@@ -12,6 +12,7 @@ REMOTE_COMPOSER_PATH='chiefsoft@10.10.10.13:/home/chiefsoft/DevSites/MERMS/Merms
|
|||||||
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
|
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
|
||||||
|
|
||||||
# ANSIBLE PATHS *********************************************
|
# ANSIBLE PATHS *********************************************
|
||||||
|
ANSIBLE_LOGIN_TOKEN=''
|
||||||
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://172.16.4.90:3000"
|
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://172.16.4.90:3000"
|
||||||
ANSIBLE_LOGIN_URL="/api/auth/login"
|
ANSIBLE_LOGIN_URL="/api/auth/login"
|
||||||
ANSIBLE_TOKEN_URL="/api/user/tokens"
|
ANSIBLE_TOKEN_URL="/api/user/tokens"
|
||||||
|
|||||||
@@ -13,10 +13,11 @@ REMOTE_COMPOSER_PATH='chiefsoft@10.10.10.13:/home/chiefsoft/DevSites/MERMS/Merms
|
|||||||
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
|
DESTINATION_HOME_FOLDER='/home/chiefsoft/SITES/'
|
||||||
|
|
||||||
# ANSIBLE PATHS *********************************************
|
# ANSIBLE PATHS *********************************************
|
||||||
|
ANSIBLE_LOGIN_TOKEN="ghp5vseetodryrav77b8kfh6azuwwr-hxiky-qc3bue="
|
||||||
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://10.13.2.18:3000"
|
ANSIBLE_AUTOMATION_SERVER_LOCATION="http://10.13.2.18:3000"
|
||||||
ANSIBLE_LOGIN_URL="/auth/login"
|
ANSIBLE_LOGIN_URL="/api/auth/login"
|
||||||
ANSIBLE_TOKEN_URL="/user/tokens"
|
ANSIBLE_TOKEN_URL="/api/user/tokens"
|
||||||
ANSIBLE_TASK_URL="/project/"
|
ANSIBLE_TASK_URL="/api/project/"
|
||||||
ANSIBLE_AUTOMATION_PROJECT_ID="1"
|
ANSIBLE_AUTOMATION_PROJECT_ID="1"
|
||||||
|
|
||||||
SOCKET_SERVER_LOCATION="http://10.13.3.15:5006"
|
SOCKET_SERVER_LOCATION="http://10.13.3.15:5006"
|
||||||
|
|||||||
@@ -108,6 +108,10 @@ abstract class BaseController extends Controller
|
|||||||
public function ansibleLogin(): string
|
public function ansibleLogin(): string
|
||||||
{
|
{
|
||||||
$token = null;
|
$token = null;
|
||||||
|
if (isset($_ENV['ANSIBLE_LOGIN_TOKEN']) && $_ENV['ANSIBLE_LOGIN_TOKEN'] !=''){
|
||||||
|
return $_ENV['ANSIBLE_LOGIN_TOKEN'];
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Code that might throw an exception
|
// Code that might throw an exception
|
||||||
$result = "Unhandled exception";
|
$result = "Unhandled exception";
|
||||||
|
|||||||
Reference in New Issue
Block a user