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
eaac40e2
Commit
eaac40e2
authored
Nov 30, 2015
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the tanaguru_prerequisites to tanguru_debian_pkgs
parent
d5ae98c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
131 deletions
+129
-131
playbooks/roles/tanaguru/defaults/main.yml
+1
-1
playbooks/roles/tanaguru/tasks/deploy.yml
+0
-129
playbooks/roles/tanaguru/tasks/main.yml
+128
-1
No files found.
playbooks/roles/tanaguru/defaults/main.yml
View file @
eaac40e2
---
tan
aguru_prerequisite
s
:
tan
guru_debian_pkg
s
:
-
openjdk-7-jre
-
unzip
-
libmysql-java
...
...
playbooks/roles/tanaguru/tasks/deploy.yml
deleted
100644 → 0
View file @
d5ae98c1
---
-
name
:
Add the Partner repository
apt_repository
:
repo
:
"
{{
item
}}"
state
:
present
with_items
:
-
"
deb
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
"
deb-src
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
name
:
Set the Locale
locale_gen
:
name
:
"
{{
locale_setting
}}"
state
:
present
-
name
:
Set Postfix options
debconf
:
name
:
postifx
question
:
"
{{
item.question
}}"
value
:
"
{{
item.value
}}
"
vtype
:
"
string"
with_items
:
-
{
question
:
"
postfix/mailname"
,
value
:
"
"
}
-
{
question
:
"
postfix/main_mailer_type"
,
value
:
"
Satellite
system"
}
-
name
:
Install the TanaGuru Prerequisites
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
installed
with_items
:
tanaguru_prerequisites
-
name
:
Modify the my.cnf file for max_allowed_packet option
lineinfile
:
dest
:
/etc/mysql/my.cnf
regexp
:
'
^max_allowed_packet'
line
:
'
max_allowed_packet
=
64M'
state
:
present
notify
:
-
restart mysql
-
name
:
Create a soft link for tomcat jar and mysql connector
file
:
dest
:
"
{{
item.dest
}}"
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'
}
-
name
:
Copy the xvfb template to /etc/init.d
template
:
dest
:
/etc/init.d/xvfb
src
:
xvfb.j2
owner
:
root
group
:
root
mode
:
755
register
:
xvfb
notify
:
-
restart xvfb
-
name
:
Configure xvfb to run at startup
command
:
update-rc.d xvfb defaults
ignore_errors
:
yes
when
:
xvfb.changed
-
name
:
Download the latest ESR Firfox
get_url
:
url
:
"
{{
fixfox_esr_link
}}"
dest
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
src
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
dest
:
/opt
copy
:
no
-
name
:
Download the latest TanaGuru tarball
get_url
:
url
:
"
{{
tanaguru_download_link
}}"
dest
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
src
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
dest
:
"
~/"
copy
:
no
-
name
:
Create MySQL database for TanaGuru
mysql_db
:
name
:
"
{{
item.tanaguru_database
}}"
state
:
present
encoding
:
utf8
collation
:
utf8_general_ci
with_items
:
tanaguru_parameters
-
name
:
Create MySQL user for TanaGuru
mysql_user
:
name
:
"
{{
item.tanaguru_db_user
}}"
password
:
"
{{
item.tanaguru_db_password
}}"
host
:
localhost
priv
:
"
{{
item.tanaguru_database
}}.*:ALL"
state
:
present
with_items
:
tanaguru_parameters
-
name
:
Check that tanaguru app is running
shell
:
>
/bin/ps aux | grep -i tanaguru
register
:
tanaguru_app
changed_when
:
no
-
name
:
Install the TanaGuru
shell
:
>
/bin/echo "yes" | ./install.sh --mysql-tg-user "{{ item.tanaguru_db_user }}" \
--mysql-tg-passwd "{{ item.tanaguru_db_password }}" \
--mysql-tg-db "{{ item.tanaguru_database }}" \
--tanaguru-url "{{ item.tanaguru_url }}" \
--tomcat-webapps /var/lib/tomcat6/webapps \
--tomcat-user tomcat6 \
--tg-admin-email "{{ item.tanaguru_admin_email }}" \
--tg-admin-passwd "{{ item.tg_admin_passwd }}" \
--firefox-esr-path /opt/firefox/firefox \
--display-port ":99.1"
args
:
chdir
:
"
~/{{
tanaguru_download_link
|
basename
|
regex_replace('.tar.gz$',
'')
}}"
with_items
:
tanaguru_parameters
when
:
"
tanaguru_app.stdout.find('/etc/tanaguru/')
==
-1"
notify
:
-
restart tomcat6
\ No newline at end of file
playbooks/roles/tanaguru/tasks/main.yml
View file @
eaac40e2
---
-
include
:
deploy.yml
-
name
:
Add the Partner repository
apt_repository
:
repo
:
"
{{
item
}}"
state
:
present
with_items
:
-
"
deb
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
"
deb-src
http://archive.canonical.com/ubuntu
{{
ansible_distribution_release
}}
partner"
-
name
:
Set the Locale
locale_gen
:
name
:
"
{{
locale_setting
}}"
state
:
present
-
name
:
Set Postfix options
debconf
:
name
:
postifx
question
:
"
{{
item.question
}}"
value
:
"
{{
item.value
}}
"
vtype
:
"
string"
with_items
:
-
{
question
:
"
postfix/mailname"
,
value
:
"
"
}
-
{
question
:
"
postfix/main_mailer_type"
,
value
:
"
Satellite
system"
}
-
name
:
Install the TanaGuru Prerequisites
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
installed
with_items
:
tanguru_debian_pkgs
-
name
:
Modify the my.cnf file for max_allowed_packet option
lineinfile
:
dest
:
/etc/mysql/my.cnf
regexp
:
'
^max_allowed_packet'
line
:
'
max_allowed_packet
=
64M'
state
:
present
notify
:
-
restart mysql
-
name
:
Create a soft link for tomcat jar and mysql connector
file
:
dest
:
"
{{
item.dest
}}"
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'
}
-
name
:
Copy the xvfb template to /etc/init.d
template
:
dest
:
/etc/init.d/xvfb
src
:
xvfb.j2
owner
:
root
group
:
root
mode
:
755
register
:
xvfb
notify
:
-
restart xvfb
-
name
:
Configure xvfb to run at startup
command
:
update-rc.d xvfb defaults
ignore_errors
:
yes
when
:
xvfb.changed
-
name
:
Download the latest ESR Firfox
get_url
:
url
:
"
{{
fixfox_esr_link
}}"
dest
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
src
:
"
/tmp/{{
fixfox_esr_link
|
basename
}}"
dest
:
/opt
copy
:
no
-
name
:
Download the latest TanaGuru tarball
get_url
:
url
:
"
{{
tanaguru_download_link
}}"
dest
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
-
name
:
Unzip the downloaded Firfox zipped file
unarchive
:
src
:
"
/tmp/{{
tanaguru_download_link
|
basename
}}"
dest
:
"
~/"
copy
:
no
-
name
:
Create MySQL database for TanaGuru
mysql_db
:
name
:
"
{{
item.tanaguru_database
}}"
state
:
present
encoding
:
utf8
collation
:
utf8_general_ci
with_items
:
tanaguru_parameters
-
name
:
Create MySQL user for TanaGuru
mysql_user
:
name
:
"
{{
item.tanaguru_db_user
}}"
password
:
"
{{
item.tanaguru_db_password
}}"
host
:
localhost
priv
:
"
{{
item.tanaguru_database
}}.*:ALL"
state
:
present
with_items
:
tanaguru_parameters
-
name
:
Check that tanaguru app is running
shell
:
>
/bin/ps aux | grep -i tanaguru
register
:
tanaguru_app
changed_when
:
no
-
name
:
Install the TanaGuru
shell
:
>
/bin/echo "yes" | ./install.sh --mysql-tg-user "{{ item.tanaguru_db_user }}" \
--mysql-tg-passwd "{{ item.tanaguru_db_password }}" \
--mysql-tg-db "{{ item.tanaguru_database }}" \
--tanaguru-url "{{ item.tanaguru_url }}" \
--tomcat-webapps /var/lib/tomcat6/webapps \
--tomcat-user tomcat6 \
--tg-admin-email "{{ item.tanaguru_admin_email }}" \
--tg-admin-passwd "{{ item.tg_admin_passwd }}" \
--firefox-esr-path /opt/firefox/firefox \
--display-port ":99.1"
args
:
chdir
:
"
~/{{
tanaguru_download_link
|
basename
|
regex_replace('.tar.gz$',
'')
}}"
with_items
:
tanaguru_parameters
when
:
"
tanaguru_app.stdout.find('/etc/tanaguru/')
==
-1"
notify
:
-
restart tomcat6
\ 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