Commit 76f7c7f1 by arbabnazar

change the list into dict

parent 7860c78b
...@@ -17,7 +17,7 @@ tanaguru_download_link: "http://download.tanaguru.org/Tanaguru/tanaguru-3.1.0.i3 ...@@ -17,7 +17,7 @@ tanaguru_download_link: "http://download.tanaguru.org/Tanaguru/tanaguru-3.1.0.i3
fixfox_esr_link: "http://download-origin.cdn.mozilla.net/pub/firefox/releases/24.0esr/linux-x86_64/en-US/firefox-24.0esr.tar.bz2" fixfox_esr_link: "http://download-origin.cdn.mozilla.net/pub/firefox/releases/24.0esr/linux-x86_64/en-US/firefox-24.0esr.tar.bz2"
tanaguru_parameters: tanaguru_parameters:
- tanaguru_database: tgdatabase tanaguru_database: tgdatabase
tanaguru_db_user: tguser tanaguru_db_user: tguser
tanaguru_db_password: "tgPassword" tanaguru_db_password: "tgPassword"
tanaguru_url: "http://localhost:8080/tanaguru/" tanaguru_url: "http://localhost:8080/tanaguru/"
......
...@@ -82,20 +82,18 @@ ...@@ -82,20 +82,18 @@
- name: Create MySQL database for TanaGuru - name: Create MySQL database for TanaGuru
mysql_db: mysql_db:
name: "{{ item.tanaguru_database }}" name: "{{ tanaguru_parameters.tanaguru_database }}"
state: present state: present
encoding: utf8 encoding: utf8
collation: utf8_general_ci collation: utf8_general_ci
with_items: tanaguru_parameters
- name: Create MySQL user for TanaGuru - name: Create MySQL user for TanaGuru
mysql_user: mysql_user:
name: "{{ item.tanaguru_db_user }}" name: "{{ tanaguru_parameters.tanaguru_db_user }}"
password: "{{ item.tanaguru_db_password }}" password: "{{ tanaguru_parameters.tanaguru_db_password }}"
host: localhost host: localhost
priv: "{{ item.tanaguru_database }}.*:ALL" priv: "{{ tanaguru_parameters.tanaguru_database }}.*:ALL"
state: present state: present
with_items: tanaguru_parameters
- name: Check that tanaguru app is running - name: Check that tanaguru app is running
shell: > shell: >
...@@ -105,19 +103,18 @@ ...@@ -105,19 +103,18 @@
- name: Install the TanaGuru - name: Install the TanaGuru
shell: > shell: >
/bin/echo "yes" | ./install.sh --mysql-tg-user "{{ item.tanaguru_db_user }}" \ /bin/echo "yes" | ./install.sh --mysql-tg-user "{{ tanaguru_parameters.tanaguru_db_user }}" \
--mysql-tg-passwd "{{ item.tanaguru_db_password }}" \ --mysql-tg-passwd "{{ tanaguru_parameters.tanaguru_db_password }}" \
--mysql-tg-db "{{ item.tanaguru_database }}" \ --mysql-tg-db "{{ tanaguru_parameters.tanaguru_database }}" \
--tanaguru-url "{{ item.tanaguru_url }}" \ --tanaguru-url "{{ tanaguru_parameters.tanaguru_url }}" \
--tomcat-webapps /var/lib/tomcat6/webapps \ --tomcat-webapps /var/lib/tomcat6/webapps \
--tomcat-user tomcat6 \ --tomcat-user tomcat6 \
--tg-admin-email "{{ item.tanaguru_admin_email }}" \ --tg-admin-email "{{ tanaguru_parameters.tanaguru_admin_email }}" \
--tg-admin-passwd "{{ item.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: "~/{{ tanaguru_download_link | basename | regex_replace('.tar.gz$', '') }}"
with_items: tanaguru_parameters
when: "tanaguru_app.stdout.find('/etc/tanaguru/') == -1" when: "tanaguru_app.stdout.find('/etc/tanaguru/') == -1"
notify: notify:
- restart tomcat6 - restart tomcat6
\ 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