Commit feb42be2 by arbabnazar

add tag and use the tomcat7 instead of tomcat6

parent 76f7c7f1
...@@ -4,11 +4,11 @@ tanguru_debian_pkgs: ...@@ -4,11 +4,11 @@ tanguru_debian_pkgs:
- unzip - unzip
- libmysql-java - libmysql-java
- python-mysqldb - python-mysqldb
- tomcat6 - tomcat7
- 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
......
---
- 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 @@ ...@@ -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/tomcat6/webapps \ --tomcat-webapps /var/lib/tomcat7/webapps \
--tomcat-user tomcat6 \ --tomcat-user tomcat7 \
--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
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