Commit feb42be2 by arbabnazar

add tag and use the tomcat7 instead of tomcat6

parent 76f7c7f1
......@@ -4,11 +4,11 @@ tanguru_debian_pkgs:
- unzip
- libmysql-java
- python-mysqldb
- tomcat6
- tomcat7
- 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
......
---
- 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
......@@ -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/tomcat6/webapps \
--tomcat-user tomcat6 \
--tomcat-webapps /var/lib/tomcat7/webapps \
--tomcat-user tomcat7 \
--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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment