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
OpenEdx
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:
-
unzip
-
libmysql-java
-
python-mysqldb
-
tomcat
6
-
tomcat
7
-
libspring-instrument-java
-
xvfb
-
postfix
-
mailutils
-
postfix
tanaguru_download_link
:
"
http://download.tanaguru.org/Tanaguru/tanaguru-3.1.0.i386.tar.gz"
# 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 @@
with_items
:
-
"
deb
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
debconf
:
...
...
@@ -16,6 +19,9 @@
with_items
:
-
{
question
:
"
postfix/mailname"
,
value
:
"
"
}
-
{
question
:
"
postfix/main_mailer_type"
,
value
:
"
Satellite
system"
}
tags
:
-
install
-
install:configuration
-
name
:
Install the TanaGuru Prerequisites
apt
:
...
...
@@ -23,6 +29,9 @@
update_cache
:
yes
state
:
installed
with_items
:
tanguru_debian_pkgs
tags
:
-
install
-
install:base
-
name
:
Modify the my.cnf file for max_allowed_packet option
lineinfile
:
...
...
@@ -30,8 +39,16 @@
regexp
:
'
^max_allowed_packet'
line
:
'
max_allowed_packet
=
64M'
state
:
present
notify
:
-
restart mysql
register
:
my_cnf
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
file
:
...
...
@@ -39,8 +56,11 @@
src
:
"
{{
item.src
}}"
state
:
link
with_items
:
-
{
src
:
'
/usr/share/java/spring3-instrument-tomcat.jar'
,
dest
:
'
/usr/share/tomcat6/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/spring3-instrument-tomcat.jar'
,
dest
:
'
/usr/share/tomcat7/lib/spring3-instrument-tomcat.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
template
:
...
...
@@ -50,8 +70,16 @@
group
:
root
mode
:
755
register
:
xvfb
notify
:
-
restart xvfb
tags
:
-
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
command
:
update-rc.d xvfb defaults
...
...
@@ -62,23 +90,35 @@
get_url
:
url
:
"
{{
fixfox_esr_link
}}"
dest
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
tags
:
-
install
-
install:base
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
src
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
dest
:
/opt
copy
:
no
tags
:
-
install
-
install:base
-
name
:
Download the latest TanaGuru tarball
get_url
:
url
:
"
{{
tanaguru_download_link
}}"
dest
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
tags
:
-
install
-
install:base
-
name
:
Unzip the downloaded
Firfox zipped file
-
name
:
Unzip the downloaded
TanaGuru tarball
unarchive
:
src
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
dest
:
"
~
/"
dest
:
"
/tmp
/"
copy
:
no
tags
:
-
install
-
install:base
-
name
:
Create MySQL database for TanaGuru
mysql_db
:
...
...
@@ -86,6 +126,9 @@
state
:
present
encoding
:
utf8
collation
:
utf8_general_ci
tags
:
-
install
-
install:base
-
name
:
Create MySQL user for TanaGuru
mysql_user
:
...
...
@@ -94,12 +137,17 @@
host
:
localhost
priv
:
"
{{
tanaguru_parameters.tanaguru_database
}}.*:ALL"
state
:
present
tags
:
-
install
-
install:base
-
name
:
Check that tanaguru app is running
shell
:
>
/bin/ps aux | grep -i tanaguru
register
:
tanaguru_app
changed_when
:
no
tags
:
-
install
-
name
:
Install the TanaGuru
shell
:
>
...
...
@@ -107,14 +155,21 @@
--mysql-tg-passwd "{{ tanaguru_parameters.tanaguru_db_password }}" \
--mysql-tg-db "{{ tanaguru_parameters.tanaguru_database }}" \
--tanaguru-url "{{ tanaguru_parameters.tanaguru_url }}" \
--tomcat-webapps /var/lib/tomcat
6
/webapps \
--tomcat-user tomcat
6
\
--tomcat-webapps /var/lib/tomcat
7
/webapps \
--tomcat-user tomcat
7
\
--tg-admin-email "{{ tanaguru_parameters.tanaguru_admin_email }}" \
--tg-admin-passwd "{{ tanaguru_parameters.tg_admin_passwd }}" \
--firefox-esr-path /opt/firefox/firefox \
--display-port ":99.1"
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"
notify
:
-
restart tomcat6
\ No newline at end of file
register
:
tanaguru_install
tags
:
-
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