Fix files data
This commit is contained in:
@@ -1 +1,20 @@
|
||||
A000002
|
||||
---
|
||||
- hosts: WHAT_HOST_IN_USE
|
||||
|
||||
tasks:
|
||||
- name: Creates directory DESTINATION_FOLDER
|
||||
ansible.builtin.file:
|
||||
path: DESTINATION_FOLDER
|
||||
state: directory
|
||||
mode: 0775
|
||||
recurse: yes
|
||||
|
||||
- name: Set up docker-compose file
|
||||
template:
|
||||
src: "WHAT_PART_LOCAL/docker-compose.yml"
|
||||
dest: "DESTINATION_FOLDER"
|
||||
|
||||
- name: docker compose up
|
||||
shell:
|
||||
chdir: "DESTINATION_FOLDER/"
|
||||
cmd: docker-compose up -d
|
||||
@@ -1 +1,20 @@
|
||||
A000005
|
||||
---
|
||||
- hosts: WHAT_HOST_IN_USE
|
||||
|
||||
tasks:
|
||||
- name: Creates directory DESTINATION_FOLDER
|
||||
ansible.builtin.file:
|
||||
path: DESTINATION_FOLDER
|
||||
state: directory
|
||||
mode: 0775
|
||||
recurse: yes
|
||||
|
||||
- name: Set up docker-compose file
|
||||
template:
|
||||
src: "WHAT_PART_LOCAL/docker-compose.yml"
|
||||
dest: "DESTINATION_FOLDER"
|
||||
|
||||
- name: docker compose up
|
||||
shell:
|
||||
chdir: "DESTINATION_FOLDER/"
|
||||
cmd: docker-compose up -d
|
||||
@@ -0,0 +1,20 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
openemr-WHAT_CONTAINER_NAME:
|
||||
container_name: WHAT_CONTAINER_NAME
|
||||
image: wordpress:latest
|
||||
ports:
|
||||
- 'ALLOCATED_PORT:80'
|
||||
restart: always
|
||||
volumes: ['DESTINATION_FOLDER:/var/www/html']
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: CNT_DB_DATA
|
||||
WORDPRESS_DB_USER: CNT_DB_NAME
|
||||
WORDPRESS_DB_PASSWORD: CNT_DB_PASS
|
||||
WORDPRESS_DB_NAME: CNT_DB_NAME
|
||||
networks:
|
||||
- wpsite
|
||||
|
||||
networks:
|
||||
wpsite:
|
||||
|
||||
@@ -207,42 +207,42 @@ abstract class BaseController extends Controller
|
||||
return 0;
|
||||
|
||||
}
|
||||
public function ansibleProvisionBAD($ansibleToken,$params){
|
||||
log_message('critical', "***** ***** Provision CALL:: ansibleProvision() Token ".$ansibleToken);
|
||||
log_message('critical', "***** ***** Provision CALL:: ansibleProvision() Token ". serialize( $params));
|
||||
|
||||
$result = "Unhandled exception";
|
||||
$base_url = "http://172.16.4.90:3000";
|
||||
$PROJECT_ID= 8;
|
||||
$cookies = tempnam('/tmp','cookie.txt');
|
||||
|
||||
# 1. Login
|
||||
$url = $base_url . "/api/project/$PROJECT_ID/tasks";
|
||||
log_message('critical', "***** ***** ansibleProvision CALL::URL ". $url);
|
||||
$ch = curl_init( $url );
|
||||
# Setup request to send json via POST.
|
||||
$payload = json_encode( $params );
|
||||
$authorization = "Authorization: Bearer ".$ansibleToken; // Prepare the authorisation token
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json',$authorization));
|
||||
# Return response instead of printing.
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
# Fetch the headers, not the body content:
|
||||
|
||||
# Send request.
|
||||
$result = curl_exec($ch);
|
||||
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$result = 'HTTP code: ' . $httpcode;
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
log_message('critical', "***** ***** Provision :: ansibleProvision($httpcode) ".$httpcode);
|
||||
|
||||
if ($httpcode != "204") {
|
||||
return "Login failed! $result";
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
// public function ansibleProvisionBAD($ansibleToken,$params){
|
||||
// log_message('critical', "***** ***** Provision CALL:: ansibleProvision() Token ".$ansibleToken);
|
||||
// log_message('critical', "***** ***** Provision CALL:: ansibleProvision() Token ". serialize( $params));
|
||||
//
|
||||
// $result = "Unhandled exception";
|
||||
// $base_url = "http://172.16.4.90:3000";
|
||||
// $PROJECT_ID= 8;
|
||||
// $cookies = tempnam('/tmp','cookie.txt');
|
||||
//
|
||||
// # 1. Login
|
||||
// $url = $base_url . "/api/project/$PROJECT_ID/tasks";
|
||||
// log_message('critical', "***** ***** ansibleProvision CALL::URL ". $url);
|
||||
// $ch = curl_init( $url );
|
||||
// # Setup request to send json via POST.
|
||||
// $payload = json_encode( $params );
|
||||
// $authorization = "Authorization: Bearer ".$ansibleToken; // Prepare the authorisation token
|
||||
// curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
|
||||
// curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json',$authorization));
|
||||
// # Return response instead of printing.
|
||||
// curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
// # Fetch the headers, not the body content:
|
||||
//
|
||||
// # Send request.
|
||||
// $result = curl_exec($ch);
|
||||
// $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
// $result = 'HTTP code: ' . $httpcode;
|
||||
//
|
||||
// curl_close($ch);
|
||||
//
|
||||
// log_message('critical', "***** ***** Provision :: ansibleProvision($httpcode) ".$httpcode);
|
||||
//
|
||||
// if ($httpcode != "204") {
|
||||
// return "Login failed! $result";
|
||||
// }
|
||||
//
|
||||
// return 0;
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user