Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
feb42be2
Commit
feb42be2
authored
Dec 03, 2015
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tag and use the tomcat7 instead of tomcat6
parent
76f7c7f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
33 deletions
+71
-33
playbooks/roles/tanaguru/defaults/main.yml
+2
-2
playbooks/roles/tanaguru/handlers/main.yml
+0
-17
playbooks/roles/tanaguru/tasks/main.yml
+69
-14
No files found.
playbooks/roles/tanaguru/defaults/main.yml
View file @
feb42be2
...
@@ -4,11 +4,11 @@ tanguru_debian_pkgs:
...
@@ -4,11 +4,11 @@ tanguru_debian_pkgs:
-
unzip
-
unzip
-
libmysql-java
-
libmysql-java
-
python-mysqldb
-
python-mysqldb
-
tomcat
6
-
tomcat
7
-
libspring-instrument-java
-
libspring-instrument-java
-
xvfb
-
xvfb
-
postfix
-
mailutils
-
mailutils
-
postfix
tanaguru_download_link
:
"
http://download.tanaguru.org/Tanaguru/tanaguru-3.1.0.i386.tar.gz"
tanaguru_download_link
:
"
http://download.tanaguru.org/Tanaguru/tanaguru-3.1.0.i386.tar.gz"
# Go this link to find your desired ESR Firefox
# Go this link to find your desired ESR Firefox
...
...
playbooks/roles/tanaguru/handlers/main.yml
deleted
100644 → 0
View file @
76f7c7f1
---
-
name
:
restart mysql
service
:
name
:
mysql
state
:
restarted
-
name
:
restart tomcat6
service
:
name
:
tomcat6
state
:
restarted
-
name
:
restart xvfb
service
:
name
:
xvfb
pattern
:
/etc/init.d/xvfb
state
:
restarted
\ No newline at end of file
playbooks/roles/tanaguru/tasks/main.yml
View file @
feb42be2
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
with_items
:
with_items
:
-
"
deb
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
"
deb
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
"
deb-src
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
"
deb-src
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
tags
:
-
install
-
install:base
-
name
:
Set Postfix options
-
name
:
Set Postfix options
debconf
:
debconf
:
...
@@ -16,6 +19,9 @@
...
@@ -16,6 +19,9 @@
with_items
:
with_items
:
-
{
question
:
"
postfix/mailname"
,
value
:
"
"
}
-
{
question
:
"
postfix/mailname"
,
value
:
"
"
}
-
{
question
:
"
postfix/main_mailer_type"
,
value
:
"
Satellite
system"
}
-
{
question
:
"
postfix/main_mailer_type"
,
value
:
"
Satellite
system"
}
tags
:
-
install
-
install:configuration
-
name
:
Install the TanaGuru Prerequisites
-
name
:
Install the TanaGuru Prerequisites
apt
:
apt
:
...
@@ -23,6 +29,9 @@
...
@@ -23,6 +29,9 @@
update_cache
:
yes
update_cache
:
yes
state
:
installed
state
:
installed
with_items
:
tanguru_debian_pkgs
with_items
:
tanguru_debian_pkgs
tags
:
-
install
-
install:base
-
name
:
Modify the my.cnf file for max_allowed_packet option
-
name
:
Modify the my.cnf file for max_allowed_packet option
lineinfile
:
lineinfile
:
...
@@ -30,8 +39,16 @@
...
@@ -30,8 +39,16 @@
regexp
:
'
^max_allowed_packet'
regexp
:
'
^max_allowed_packet'
line
:
'
max_allowed_packet
=
64M'
line
:
'
max_allowed_packet
=
64M'
state
:
present
state
:
present
notify
:
register
:
my_cnf
-
restart mysql
tags
:
-
install
-
install:configuration
-
name
:
Restart MySQL
service
:
name
:
mysql
state
:
restarted
when
:
my_cnf.changed
-
name
:
Create a soft link for tomcat jar and mysql connector
-
name
:
Create a soft link for tomcat jar and mysql connector
file
:
file
:
...
@@ -39,8 +56,11 @@
...
@@ -39,8 +56,11 @@
src
:
"
{{
item.src
}}"
src
:
"
{{
item.src
}}"
state
:
link
state
:
link
with_items
:
with_items
:
-
{
src
:
'
/usr/share/java/spring3-instrument-tomcat.jar'
,
dest
:
'
/usr/share/tomcat6/lib/spring3-instrument-tomcat.jar'
}
-
{
src
:
'
/usr/share/java/spring3-instrument-tomcat.jar'
,
dest
:
'
/usr/share/tomcat7/lib/spring3-instrument-tomcat.jar'
}
-
{
src
:
'
/usr/share/java/mysql-connector-java.jar'
,
dest
:
'
/usr/share/tomcat6/lib/mysql-connector-java.jar'
}
-
{
src
:
'
/usr/share/java/mysql-connector-java.jar'
,
dest
:
'
/usr/share/tomcat7/lib/mysql-connector-java.jar'
}
tags
:
-
install
-
install:configuration
-
name
:
Copy the xvfb template to /etc/init.d
-
name
:
Copy the xvfb template to /etc/init.d
template
:
template
:
...
@@ -50,8 +70,16 @@
...
@@ -50,8 +70,16 @@
group
:
root
group
:
root
mode
:
755
mode
:
755
register
:
xvfb
register
:
xvfb
notify
:
tags
:
-
restart xvfb
-
install
-
install:configuration
-
name
:
Restart xvfb
service
:
name
:
xvfb
pattern
:
/etc/init.d/xvfb
state
:
restarted
when
:
xvfb.changed
-
name
:
Configure xvfb to run at startup
-
name
:
Configure xvfb to run at startup
command
:
update-rc.d xvfb defaults
command
:
update-rc.d xvfb defaults
...
@@ -62,23 +90,35 @@
...
@@ -62,23 +90,35 @@
get_url
:
get_url
:
url
:
"
{{
fixfox_esr_link
}}"
url
:
"
{{
fixfox_esr_link
}}"
dest
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
dest
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
tags
:
-
install
-
install:base
-
name
:
Unzip the downloaded Firfox zipped file
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
unarchive
:
src
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
src
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
dest
:
/opt
dest
:
/opt
copy
:
no
copy
:
no
tags
:
-
install
-
install:base
-
name
:
Download the latest TanaGuru tarball
-
name
:
Download the latest TanaGuru tarball
get_url
:
get_url
:
url
:
"
{{
tanaguru_download_link
}}"
url
:
"
{{
tanaguru_download_link
}}"
dest
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
dest
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
tags
:
-
install
-
install:base
-
name
:
Unzip the downloaded
Firfox zipped file
-
name
:
Unzip the downloaded
TanaGuru tarball
unarchive
:
unarchive
:
src
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
src
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
dest
:
"
~
/"
dest
:
"
/tmp
/"
copy
:
no
copy
:
no
tags
:
-
install
-
install:base
-
name
:
Create MySQL database for TanaGuru
-
name
:
Create MySQL database for TanaGuru
mysql_db
:
mysql_db
:
...
@@ -86,6 +126,9 @@
...
@@ -86,6 +126,9 @@
state
:
present
state
:
present
encoding
:
utf8
encoding
:
utf8
collation
:
utf8_general_ci
collation
:
utf8_general_ci
tags
:
-
install
-
install:base
-
name
:
Create MySQL user for TanaGuru
-
name
:
Create MySQL user for TanaGuru
mysql_user
:
mysql_user
:
...
@@ -94,12 +137,17 @@
...
@@ -94,12 +137,17 @@
host
:
localhost
host
:
localhost
priv
:
"
{{
tanaguru_parameters.tanaguru_database
}}.*:ALL"
priv
:
"
{{
tanaguru_parameters.tanaguru_database
}}.*:ALL"
state
:
present
state
:
present
tags
:
-
install
-
install:base
-
name
:
Check that tanaguru app is running
-
name
:
Check that tanaguru app is running
shell
:
>
shell
:
>
/bin/ps aux | grep -i tanaguru
/bin/ps aux | grep -i tanaguru
register
:
tanaguru_app
register
:
tanaguru_app
changed_when
:
no
changed_when
:
no
tags
:
-
install
-
name
:
Install the TanaGuru
-
name
:
Install the TanaGuru
shell
:
>
shell
:
>
...
@@ -107,14 +155,21 @@
...
@@ -107,14 +155,21 @@
--mysql-tg-passwd "{{ tanaguru_parameters.tanaguru_db_password }}" \
--mysql-tg-passwd "{{ tanaguru_parameters.tanaguru_db_password }}" \
--mysql-tg-db "{{ tanaguru_parameters.tanaguru_database }}" \
--mysql-tg-db "{{ tanaguru_parameters.tanaguru_database }}" \
--tanaguru-url "{{ tanaguru_parameters.tanaguru_url }}" \
--tanaguru-url "{{ tanaguru_parameters.tanaguru_url }}" \
--tomcat-webapps /var/lib/tomcat
6
/webapps \
--tomcat-webapps /var/lib/tomcat
7
/webapps \
--tomcat-user tomcat
6
\
--tomcat-user tomcat
7
\
--tg-admin-email "{{ tanaguru_parameters.tanaguru_admin_email }}" \
--tg-admin-email "{{ tanaguru_parameters.tanaguru_admin_email }}" \
--tg-admin-passwd "{{ tanaguru_parameters.tg_admin_passwd }}" \
--tg-admin-passwd "{{ tanaguru_parameters.tg_admin_passwd }}" \
--firefox-esr-path /opt/firefox/firefox \
--firefox-esr-path /opt/firefox/firefox \
--display-port ":99.1"
--display-port ":99.1"
args
:
args
:
chdir
:
"
~
/{{
tanaguru_download_link
|
basename
|
regex_replace('.tar.gz$',
'')
}}"
chdir
:
"
/tmp
/{{
tanaguru_download_link
|
basename
|
regex_replace('.tar.gz$',
'')
}}"
when
:
"
tanaguru_app.stdout.find('/etc/tanaguru/')
==
-1"
when
:
"
tanaguru_app.stdout.find('/etc/tanaguru/')
==
-1"
notify
:
register
:
tanaguru_install
-
restart tomcat6
tags
:
\ No newline at end of file
-
install
-
name
:
Restart tomcat7
service
:
name
:
tomcat7
state
:
restarted
when
:
tanaguru_install.changed
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment