forked from ISTI-ansible-roles/ansible-roles
d4science-ghn-cluster, library/roles/smartgears/twittermon_se_plugins: Twittermon smartexecutor plugins and php tools, see https://support.d4science.org/issues/8911
This commit is contained in:
parent
1aba1accde
commit
11b2ad9d51
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
twittermon_se_plugin_install: False
|
||||
twittermon_se_plugin_upgrade: False
|
||||
twittermon_twmoncron_se_plugin_ver: 0.0.1-SNAPSHOT
|
||||
twittermon_twmoncron_se_plugin_name: TwMonCronPlugin-0.0.1-SNAPSHOT-jar-with-dependencies.jar
|
||||
twittermon_twmoncron_se_plugin_url: 'http://data.d4science.org/TzZmTmhOakRTOEpXNWJBdXQ0YnRKbFJEcTdZN0RCNkZHbWJQNStIS0N6Yz0'
|
||||
twittermon_twmoncrawler_se_plugin_ver: 0.0.1-SNAPSHOT
|
||||
twittermon_twmoncrawler_se_plugin_name: TwMonCrawlerPlugin-0.0.1-SNAPSHOT-jar-with-dependencies.jar
|
||||
twittermon_twmoncrawler_se_plugin_url: 'http://data.d4science.org/dW5HSG92U3NEYnBXNWJBdXQ0YnRKc25nem9PMUE0aGRHbWJQNStIS0N6Yz0'
|
||||
twittermon_php_crawler_url: 'http://data.d4science.org/YTRZRUNoWnhkZTlXNWJBdXQ0YnRKbHFUcHlIOElabEdHbWJQNStIS0N6Yz0'
|
||||
twittermon_php_crawler_file: php_twmon_crawler.zip
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old twittermon
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ item }}
|
||||
with_items:
|
||||
- '{{ twittermon_twmoncron_se_plugin_name }}'
|
||||
- '{{ twittermon_twmoncrawler_se_plugin_name }}'
|
||||
when: twittermon_se_plugin_upgrade
|
||||
|
||||
- name: Get the twittermon TwMonCron smart executor plugin
|
||||
get_url: url={{ twittermon_twmoncron_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ twittermon_twmoncron_se_plugin_name }}
|
||||
when: twittermon_se_plugin_install
|
||||
notify: Restart smartgears
|
||||
tags: [ 'smartgears', 'twittermon_se', 'tomcat' ]
|
||||
|
||||
- name: Get the twittermon TwMonCrawler smart executor plugin
|
||||
get_url: url={{ twittermon_twmoncrawler_se_plugin_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ twittermon_twmoncrawler_se_plugin_name }}
|
||||
when: twittermon_se_plugin_install
|
||||
notify: Restart smartgears
|
||||
tags: [ 'smartgears', 'twittermon_se', 'tomcat' ]
|
||||
|
||||
- name: Create the directories needed by twittermon
|
||||
file: dest={{ item }} state=directory
|
||||
with_items:
|
||||
- '{{ smartgears_user_home }}/twittermon_utils'
|
||||
- '{{ smartgears_user_home }}/twmon/scripts'
|
||||
- '{{ smartgears_user_home }}/twmon/scripts/data'
|
||||
- '{{ smartgears_user_home }}/twmon/scripts/include'
|
||||
|
||||
- name: Get the twittermon php utilities
|
||||
unarchive: remote_src=yes src={{ twittermon_php_crawler_url }} dest={{ smartgears_user_home }}/twittermon_utils
|
||||
|
||||
- name: Move the php utilities in the correct place
|
||||
shell: 'cp {{ smartgears_user_home }}/twittermon_utils/php/sbd_twmonitor_crawler.php {{ smartgears_user_home }}/twmon/scripts/sbd_twmonitor_crawler.php ; chmod 755 {{ smartgears_user_home }}/twmon/scripts/sbd_twmonitor_crawler.php ; cp -rp {{ smartgears_user_home }}/twittermon_utils/php/include/* {{ smartgears_user_home }}/twmon/scripts/include'
|
||||
args:
|
||||
creates: '{{ smartgears_user_home }}/twmon/scripts/sbd_twmonitor_crawler.php'
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: twittermon_se_plugin_install
|
||||
tags: [ 'smartgears', 'twittermon_se', 'tomcat' ]
|
Loading…
Reference in New Issue