added inventory finsing

This commit is contained in:
CHIEFSOFT\ameye
2025-01-19 19:01:37 -05:00
parent 2b7f61f103
commit f4d1b12c5b
4 changed files with 43 additions and 72 deletions
-69
View File
@@ -1,69 +0,0 @@
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
# CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
# app.baseURL = ''
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = ''
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
# database.default.hostname = localhost
# database.default.database = ci4
# database.default.username = root
# database.default.password = root
# database.default.DBDriver = MySQLi
# database.default.DBPrefix =
# database.default.port = 3306
# If you use MySQLi as tests, first update the values of Config\Database::$tests.
# database.tests.hostname = localhost
# database.tests.database = ci4_test
# database.tests.username = root
# database.tests.password = root
# database.tests.DBDriver = MySQLi
# database.tests.DBPrefix =
# database.tests.charset = utf8mb4
# database.tests.DBCollat = utf8mb4_general_ci
# database.tests.port = 3306
#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
# encryption.key =
#--------------------------------------------------------------------
# SESSION
#--------------------------------------------------------------------
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
# session.savePath = null
#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
# logger.threshold = 4
+20 -1
View File
@@ -1 +1,20 @@
A000003
---
- hosts: WHAT_HOST_IN_USE
vars_files:
- vars/main.yml
tasks:
- name: Set up docker-compose file
template:
src: "files/docker-compose.yml"
dest: "/home/{{ admin_user }}/wordpress/"
- name: Set permission for docker daemon
file:
path: /var/run/docker.sock
mode: '0770'
- name: docker compose up
shell:
chdir: "/home/{{ admin_user }}/wordpress/"
cmd: docker-compose up -d
+15
View File
@@ -10,3 +10,18 @@ Personal Blog | A000003 | 5
(5 rows)
https://dev.to/nithinalias/docker-compose-install-wordpress-using-ansible-2lnh
[web_servers]
172.16.250.132
172.16.250.248
[db_servers]
172.16.250.133
[file_servers]
172.16.250.134
https://www.learnlinux.tv/getting-started-with-ansible-09-targeting-specific-nodes/
+8 -2
View File
@@ -20,12 +20,18 @@ class Home extends BaseController
//$provision_list =[];
foreach ($provision_list as $pr){
$productId = $pr->product_id;
$prov_name = str_replace(".", "_", $pr->internal_url).".yml";
$template_file = $ansible_folder ."/templates/".$pr->product_id.".yml";
$template_content = file_get_contents($template_file);
// GET THE TEMPLATE FOR THIS PROVISIONING
$template_content = file_get_contents($template_file);
$template_content_processed = str_replace("WHAT_HOST_IN_USE", $productId."_SERVER", $template_content);;
// CREATE PROVISOINING FILE
$myfile = fopen( $ansible_folder ."/".$prov_name, "w") or die("Unable to open file!");
fwrite($myfile, $template_content);
fwrite($myfile, $template_content_processed);
fclose($myfile);
}