Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ansible
/
dma-playbook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c6d0539c
authored
May 01, 2018
by
ansible
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
1 parent
154117bf
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
45 deletions
roles/initial/tasks/initial_user_db_dma.yml
roles/initial/tasks/initial_user_db_wdchat.yml
roles/install/tasks/admin.yml
roles/install/tasks/dma-iconsole.yml
roles/install/tasks/dmamanager.yml
roles/install/tasks/main.yml
roles/install/tasks/runtime.yml
roles/install/tasks/servicegateway.yml
roles/install/tasks/system-management.yml
roles/install/tasks/wdchat-iconsole.yml
roles/install/tasks/wdchat-mongodb.yml
roles/install/tasks/wdchat-postgres.yml
roles/initial/tasks/initial_user_db_dma.yml
View file @
c6d0539
-
name
:
Create user & db named WDCHAT on mongodb-7017
-
name
:
Create user & db named WDCHAT on mongodb-7017
shell
:
/opt/stack/mongodb/mongodb/bin/mongo --host 127.0.0.1 --port 7017 < /tmp/
source
/wdchat.js
shell
:
/opt/stack/mongodb/mongodb/bin/mongo --host 127.0.0.1 --port 7017 < /tmp/
configuration
/wdchat.js
-
name
:
Create user & db named DMAMANAGER on mongodb1-7018
-
name
:
Create user & db named DMAMANAGER on mongodb1-7018
shell
:
/opt/stack/mongodb1/mongodb/bin/mongo --host 127.0.0.1 --port 7018 < /tmp/
source
/dmamanager.js
shell
:
/opt/stack/mongodb1/mongodb/bin/mongo --host 127.0.0.1 --port 7018 < /tmp/
configuration
/dmamanager.js
-
name
:
Create user & db named SERVICEGATEWAY on mongodb2-7019
-
name
:
Create user & db named SERVICEGATEWAY on mongodb2-7019
shell
:
/opt/stack/mongodb2/mongodb/bin/mongo --host 127.0.0.1 --port 7019 < /tmp/
source
/servicegateway.js
shell
:
/opt/stack/mongodb2/mongodb/bin/mongo --host 127.0.0.1 --port 7019 < /tmp/
configuration
/servicegateway.js
-
name
:
Create user & db named WDCHAT and WDAUTHEN on postgres-7432
-
name
:
Create user & db named WDCHAT and WDAUTHEN on postgres-7432
expect
:
expect
:
command
:
/opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
command
:
/opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
...
...
roles/initial/tasks/initial_user_db_wdchat.yml
View file @
c6d0539
-
name
:
Create user & db named WDCHAT on mongodb-7017
-
name
:
Create user & db named WDCHAT on mongodb-7017
shell
:
/opt/stack/mongodb/mongodb/bin/mongo --host 127.0.0.1 --port 7017 < /tmp/
source
/wdchat.js
shell
:
/opt/stack/mongodb/mongodb/bin/mongo --host 127.0.0.1 --port 7017 < /tmp/
configuration
/wdchat.js
-
name
:
Create user & db named WDCHAT and WDAUTHEN on postgres-7432
-
name
:
Create user & db named WDCHAT and WDAUTHEN on postgres-7432
expect
:
expect
:
command
:
/opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
command
:
/opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
...
...
roles/install/tasks/admin.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/admin
path
:
/opt/stack/admin
-
name
:
Install Admin Wildfly
-
name
:
Install Admin Wildfly
shell
:
/tmp/source/bitnami-wildfly-10.1.0-1-linux-x64-installer.run --optionfile /tmp/configuration/admin.conf --mode unattended
shell
:
/tmp/source/bitnami-wildfly-10.1.0-1-linux-x64-installer.run --optionfile /tmp/configuration/admin.conf --mode unattended
-
name
:
Stop Admin Wildfly
shell
:
/opt/stack/admin/ctlscript.sh stop
roles/install/tasks/dma-iconsole.yml
0 → 100644
View file @
c6d0539
-
name
:
Begin Install iConsole-Management System
unarchive
:
src
:
/tmp/source/dma.iConsole.script.onehost.3.0.6.0.tar.gz
dest
:
/opt
remote_src
:
yes
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
-
file
:
path
:
'
/opt/{{
item.dir
}}'
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
state
:
directory
recurse
:
yes
with_items
:
-
{
dir
:
'
Accessor'
}
-
{
dir
:
'
iConsole'
}
-
{
dir
:
'
json'
}
-
{
dir
:
'
Schedule'
}
-
name
:
Add iConsole Schedule
shell
:
/opt/Schedule/add_schedule
-
name
:
End Install iConsole-Management System - Deploy iConsole
shell
:
cp /tmp/application/{{ app_version }}/iConsole-3.0.6.0.war /opt/stack/admin/wildfly/standalone/deployments/iConsole.war
roles/install/tasks/dmamanager.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/mongodb1
path
:
/opt/stack/mongodb1
-
name
:
Install dmamanager DB
-
name
:
Install dmamanager DB
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/dmamanager.conf --mode unattended
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/dmamanager.conf --mode unattended
-
name
:
Stop dmamanager DB
shell
:
/opt/stack/mongodb1/ctlscript.sh stop
roles/install/tasks/main.yml
View file @
c6d0539
#
Module Delete Process That Open Port Except SSH
#
## Module Delete Process That Open Port Except SSH ###
-
name
:
Get running processes
-
name
:
Get running processes
shell
:
lsof -n -i4TCP |grep -v 'ssh' | grep LISTEN | awk '{ print $2 }'
shell
:
lsof -n -i4TCP |grep -v 'ssh' | grep LISTEN | awk '{ print $2 }'
register
:
running_processes
register
:
running_processes
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
with_items
:
"
{{
killed_processes.results
|
select('failed')
|
map(attribute='item')
|
list
}}"
with_items
:
"
{{
killed_processes.results
|
select('failed')
|
map(attribute='item')
|
list
}}"
ignore_errors
:
yes
ignore_errors
:
yes
#
END
#
#######################################################
-
name
:
Check & Recreate Stack Folder
-
name
:
Check & Recreate Stack Folder
file
:
file
:
...
@@ -32,6 +32,9 @@
...
@@ -32,6 +32,9 @@
with_items
:
with_items
:
-
{
owner
:
root
,
path
:
/opt/stack/dma/conf
}
-
{
owner
:
root
,
path
:
/opt/stack/dma/conf
}
-
{
owner
:
root
,
path
:
/home/chroot/wdftp
}
-
{
owner
:
root
,
path
:
/home/chroot/wdftp
}
### Software Stack Module Installation ###
-
name
:
Install software stack based on Application Name
-
name
:
Install software stack based on Application Name
import_tasks
:
nginx.yml
import_tasks
:
nginx.yml
...
@@ -61,9 +64,24 @@
...
@@ -61,9 +64,24 @@
-
import_tasks
:
system-management.yml
-
import_tasks
:
system-management.yml
when
:
app_name == 'dma' or app_name == 'wdchat'
when
:
app_name == 'dma' or app_name == 'wdchat'
#################################################
### Software Stack Script Module Installation ###
-
import_tasks
:
dma-stackscript.yml
-
import_tasks
:
dma-stackscript.yml
when
:
app_name == 'dma'
when
:
app_name == 'dma'
-
import_tasks
:
wdchat-stackscript.yml
-
import_tasks
:
wdchat-stackscript.yml
when
:
app_name == 'wdchat'
when
:
app_name == 'wdchat'
#################################################
### iConsole Module Installation ###
-
import_tasks
:
dma-iconsole.yml
when
:
app_name == 'dma'
-
import_tasks
:
wdchat-iconsole.yml
when
:
app_name == 'wdchat'
#################################################
\ No newline at end of file
roles/install/tasks/runtime.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/runtime
path
:
/opt/stack/runtime
-
name
:
Install Runtime Wildfly
-
name
:
Install Runtime Wildfly
shell
:
/tmp/source/bitnami-wildfly-10.1.0-1-linux-x64-installer.run --optionfile /tmp/configuration/runtime.conf --mode unattended
shell
:
/tmp/source/bitnami-wildfly-10.1.0-1-linux-x64-installer.run --optionfile /tmp/configuration/runtime.conf --mode unattended
-
name
:
Stop Runtime Wildfly
shell
:
/opt/stack/runtime/ctlscript.sh stop
roles/install/tasks/servicegateway.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/mongodb2
path
:
/opt/stack/mongodb2
-
name
:
Install servicegateway DB
-
name
:
Install servicegateway DB
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/servicegateway.conf --mode unattended
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/servicegateway.conf --mode unattended
-
name
:
Stop servicegateway DB
shell
:
/opt/stack/mongodb2/ctlscript.sh stop
roles/install/tasks/system-management.yml
View file @
c6d0539
-
name
:
Begin Install iConsole-Management System
unarchive
:
src
:
/tmp/source/iConsole.singlehost.dma.3.0.6.0.zip
dest
:
/opt
remote_src
:
yes
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
-
file
:
path
:
'
/opt/{{
item.dir
}}'
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
state
:
directory
recurse
:
yes
with_items
:
-
{
dir
:
'
Accessor'
}
-
{
dir
:
'
iConsole'
}
-
{
dir
:
'
json'
}
-
{
dir
:
'
Schedule'
}
-
name
:
Add iConsole Schedule
shell
:
/opt/Schedule/add_schedule
-
name
:
End Install iConsole-Management System - Deploy iConsole
shell
:
cp /tmp/application/{{ app_version }}/iConsole-3.0.6.0.war /opt/stack/admin/wildfly/standalone/deployments/iConsole.war
-
name
:
Begin Install Security License System
-
name
:
Begin Install Security License System
shell
:
cp /tmp/source/root.tar.gz /root/root.tar.gz
shell
:
cp /tmp/source/root.tar.gz /root/root.tar.gz
-
name
:
Extract root
-
name
:
Extract root
...
...
roles/install/tasks/wdchat-iconsole.yml
0 → 100644
View file @
c6d0539
-
name
:
Begin Install iConsole-Management System
unarchive
:
src
:
/tmp/source/wdchat.iConsole.script.onehost.3.0.6.0.tar.gz
dest
:
/opt
remote_src
:
yes
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
-
file
:
path
:
'
/opt/{{
item.dir
}}'
group
:
wdadmin
owner
:
wdadmin
mode
:
0755
state
:
directory
recurse
:
yes
with_items
:
-
{
dir
:
'
Accessor'
}
-
{
dir
:
'
iConsole'
}
-
{
dir
:
'
json'
}
-
{
dir
:
'
Schedule'
}
-
name
:
Add iConsole Schedule
shell
:
/opt/Schedule/add_schedule
-
name
:
End Install iConsole-Management System - Deploy iConsole
shell
:
cp /tmp/application/{{ app_version }}/iConsole-3.0.6.0.war /opt/stack/admin/wildfly/standalone/deployments/iConsole.war
roles/install/tasks/wdchat-mongodb.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/mongodb
path
:
/opt/stack/mongodb
-
name
:
Install wdchat-mongo DB
-
name
:
Install wdchat-mongo DB
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/wdchat-mongo.conf --mode unattended
shell
:
/tmp/source/bitnami-mongodb-3.4.4-0-linux-x64-installer.run --optionfile /tmp/configuration/wdchat-mongo.conf --mode unattended
-
name
:
Stop wdchat-mongo DB
shell
:
/opt/stack/mongodb/ctlscript.sh stop
roles/install/tasks/wdchat-postgres.yml
View file @
c6d0539
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
path
:
/opt/stack/postgres
path
:
/opt/stack/postgres
-
name
:
Install wdchat-postgres DB
-
name
:
Install wdchat-postgres DB
shell
:
/tmp/source/bitnami-postgresql-9.6.2-0-linux-x64-installer.run --optionfile /tmp/configuration/wdchat-postgres.conf --mode unattended
shell
:
/tmp/source/bitnami-postgresql-9.6.2-0-linux-x64-installer.run --optionfile /tmp/configuration/wdchat-postgres.conf --mode unattended
-
name
:
Stop wdchat-postgres DB
shell
:
/opt/stack/postgres/ctlscript.sh stop
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment