forked from ISTI-ansible-roles/ansible-roles
Refactor: fix all the 'when: variable is changed' occurrencies.
This commit is contained in:
parent
bd69071947
commit
07ebea657c
|
@ -31,7 +31,7 @@
|
|||
- name: Initialize the CKAN ckanext-harvest plugin
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-harvest harvester initdb --config={{ ckan_config_file }}
|
||||
when:
|
||||
- ( ckanext_harvest_install | changed )
|
||||
- ckanext_harvest_install is changed
|
||||
- ckan_init_db_and_solr
|
||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins' ]
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
- name: Initialize the CKAN ckanext-spatial plugin
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-spatial spatial initdb --config={{ ckan_config_file }}
|
||||
when:
|
||||
- ( ckanext_spatial_install | changed )
|
||||
- ckanext_spatial_install is changed
|
||||
- ckan_init_db_and_solr
|
||||
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
- name: Install the CKAN Geonetwork plugin code
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-geonetwork ; python setup.py develop
|
||||
when: ( install_geonetwork_harvester | changed )
|
||||
when: install_geonetwork_harvester is changed
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_geonetwork', 'ckan_plugins' ]
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
|||
|
||||
- name: Enable the CKAN ldap plugin code
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ldap ; python setup.py develop
|
||||
when: ( install_ldap_plugin | changed )
|
||||
when: install_ldap_plugin is changed
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_ldap', 'ckan_plugins' ]
|
||||
|
||||
|
@ -138,7 +138,7 @@
|
|||
|
||||
- name: Activate the CKAN Lire plugin code
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd {{ ckan_virtenv }}/src/ckanext-lire ; pip install -e ./
|
||||
when: ( install_lire_plugin | changed )
|
||||
when: install_lire_plugin is changed
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_lire', 'ckan_plugins' ]
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
- name: Setup the CKAN google analytics plugin
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-googleanalytics ; python setup.py develop
|
||||
when: ( install_ckan_google_analytics | changed )
|
||||
when: install_ckan_google_analytics is changed
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
|
||||
|
||||
|
@ -181,7 +181,7 @@
|
|||
- name: Setup the CKAN google analytics reports plugin
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ga-report ; paster initdb --config={{ ckan_config_file }}
|
||||
when:
|
||||
- ( install_ckan_ga_reports | changed )
|
||||
- install_ckan_ga_reports is changed
|
||||
- ckan_init_db_and_solr
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_ga_reports', 'ckan_plugins' ]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
- name: Restart apache
|
||||
service: name=apache2 state=restarted enabled=yes
|
||||
when: ( ckan_install | changed )
|
||||
when: ckan_install is changed
|
||||
tags: ckan
|
||||
|
||||
- name: Restart nginx
|
||||
service: name=nginx state=restarted enabled=yes
|
||||
when: ( ckan_install | changed )
|
||||
when: ckan_install is changed
|
||||
tags: ckan
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
- name: Update the apt cache if needed
|
||||
apt: update_cache=yes
|
||||
when: ( couchbase_repo_pkg | changed )
|
||||
when: couchbase_repo_pkg is changed
|
||||
|
||||
- name: Install the couchbase community server package
|
||||
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600
|
||||
|
|
|
@ -2,15 +2,10 @@
|
|||
# This is the playbook that installs couchdb 1.x
|
||||
#
|
||||
- name: Add the ppa for couchdb
|
||||
apt_repository: repo='{{ couchdb_ppa }}'
|
||||
apt_repository: repo='{{ couchdb_ppa }}' update_cache=yes
|
||||
register: install_ppa
|
||||
tags: couchdb
|
||||
|
||||
- name: Update the apt cache if needed
|
||||
apt: update_cache=yes
|
||||
when: ( install_ppa | changed )
|
||||
tags: couchdb
|
||||
|
||||
- name: Install the couchdb packages
|
||||
apt: pkg={{ item }} state={{ couchdb_pkg_state }}
|
||||
with_items: couchdb_pkgs
|
||||
|
@ -34,7 +29,7 @@
|
|||
with_items: couchdb_admin_users
|
||||
when:
|
||||
- couchdb_set_admin
|
||||
# - admin_init is defined and ( admin_init | changed )
|
||||
# - admin_init is defined and admin_init is changed
|
||||
notify: Restart couchdb
|
||||
tags: [ 'couchdb', 'couch_opts']
|
||||
|
||||
|
|
|
@ -4,15 +4,10 @@
|
|||
tags: couchdb
|
||||
|
||||
- name: Remove the couchdb ppa
|
||||
apt_repository: repo='{{ couchdb_ppa }}' state=absent
|
||||
apt_repository: repo='{{ couchdb_ppa }}' state=absent update_cache=yes
|
||||
register: update_apt_cache
|
||||
tags: couchdb
|
||||
|
||||
- name: Update the apt cache if needed
|
||||
apt: update_cache=yes
|
||||
when: (update_apt_cache|changed)
|
||||
tags: couchdb
|
||||
|
||||
- name: Change the open files limit
|
||||
template: src=limits-couchdb.nofiles.j2 dest=/etc/security/limits.d/couchdb.nofiles.conf owner=root group=root mode=0444
|
||||
tags: couchdb
|
||||
|
|
|
@ -3,28 +3,16 @@
|
|||
apt_key: url=http://ppa.research-infrastructures.eu/system/keys/system-archive.asc state=present
|
||||
when: has_apt
|
||||
register: update_apt_cache
|
||||
tags:
|
||||
- dnet
|
||||
|
||||
- name: Install the D-Net apt repositories
|
||||
apt_repository: repo='{{ item }}'
|
||||
with_items:
|
||||
- deb http://ppa.research-infrastructures.eu/dnet lucid main
|
||||
- deb http://ppa.research-infrastructures.eu/dnet unstable main
|
||||
when: has_apt
|
||||
register: update_apt_cache
|
||||
tags:
|
||||
- dnet
|
||||
tags: dnet
|
||||
|
||||
- name: Install the D-NET repository key
|
||||
action: apt_key url=http://ppa.research-infrastructures.eu/dnet/keys/dnet-archive.asc
|
||||
tags:
|
||||
- dnet
|
||||
tags: dnet
|
||||
|
||||
- name: Update the apt cache
|
||||
apt: update_cache=yes
|
||||
when: update_apt_cache.changed
|
||||
ignore_errors: True
|
||||
tags:
|
||||
- dnet
|
||||
- name: Install the D-Net apt repositories
|
||||
apt_repository: repo='{{ item }}' update_cache=yes
|
||||
with_items:
|
||||
- deb http://ppa.research-infrastructures.eu/dnet lucid main
|
||||
- deb http://ppa.research-infrastructures.eu/dnet unstable main
|
||||
tags: dnet
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
- name: Unpack the drupal tar file
|
||||
unarchive: copy=no src={{ drupal_download_dir }}/{{ drupal_dist_file }} dest={{ drupal_download_dir }}
|
||||
when: ( drupal_download | changed )
|
||||
when: drupal_download is changed
|
||||
tags: drupal
|
||||
|
||||
- name: Move the drupal files to the right place
|
||||
|
@ -32,7 +32,7 @@
|
|||
args:
|
||||
creates: '{{ drupal_install_dir }}/{{ item.virthost }}/index.php'
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( drupal_download | changed )
|
||||
when: drupal_download is changed
|
||||
register: unpack_drupal
|
||||
tags: drupal
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
creates: '{{ drupal_install_dir }}/{{ item.virthost }}/sites/default/settings.php'
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when:
|
||||
- ( unpack_drupal | changed )
|
||||
- unpack_drupal is changed
|
||||
- '{{ drupal_major_ver }} >= 8'
|
||||
tags: drupal
|
||||
|
||||
|
@ -52,30 +52,30 @@
|
|||
creates: '{{ drupal_install_dir }}/{{ item.virthost }}/sites/default/services.yml'
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when:
|
||||
- ( unpack_drupal | changed )
|
||||
- unpack_drupal is changed
|
||||
- '{{ drupal_major_ver }} >= 8'
|
||||
tags: drupal
|
||||
|
||||
- name: Create the files directory
|
||||
file: dest={{ drupal_install_dir }}/{{ item.virthost }}/sites/default/files owner={{ item.user }} group={{ item.group }} mode=0775 state=directory
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( unpack_drupal | changed )
|
||||
when: unpack_drupal is changed
|
||||
tags: drupal
|
||||
|
||||
- name: Set the correct ownership of the drupal files
|
||||
file: dest={{ drupal_install_dir }}/{{ item.virthost }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( unpack_drupal | changed )
|
||||
when: unpack_drupal is changed
|
||||
tags: drupal
|
||||
|
||||
- name: Set the correct ownership of the drupal modules directory
|
||||
file: dest={{ drupal_install_dir }}/{{ item.virthost }}/modules owner={{ item.user }} group={{ http_group }} recurse=yes state=directory mode=0775
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( unpack_drupal | changed )
|
||||
when: unpack_drupal is changed
|
||||
tags: drupal
|
||||
|
||||
- name: Remove the original drupal unpacked distribution
|
||||
file: dest={{ drupal_download_dir }}/{{ drupal_dist_name }} state=absent
|
||||
when: ( unpack_drupal | changed )
|
||||
when: unpack_drupal is changed
|
||||
tags: drupal
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
- name: Install the puppetlabs repo package
|
||||
apt: deb=/srv/{{ foreman_puppetlabs_repo_pkg }} update_cache=yes
|
||||
when: puppetlabs_repo | changed
|
||||
when: puppetlabs_repo is changed
|
||||
tags: foreman
|
||||
|
||||
- name: Add the foreman repo keys
|
||||
|
@ -29,5 +29,5 @@
|
|||
|
||||
#- name: Run the foremann installer
|
||||
# shell: foreman-installer
|
||||
# when: foreman_installer_pkg | changed
|
||||
# when: foreman_installer_pkg is changed
|
||||
# tags: foreman
|
||||
|
|
|
@ -1,188 +0,0 @@
|
|||
---
|
||||
- name: Test if liferay is already installed
|
||||
raw: ls -l /var/lib/tomcat7/webapps/ROOT/WEB-INF/classes/portal-developer.properties
|
||||
register: liferay_install
|
||||
ignore_errors: True
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Download the liferay war file
|
||||
get_url: url="http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.2%20GA3/liferay-portal-6.1.2-ce-ga3-20130816114619181.war?r=http%3A%2F%2Fwww.liferay.com%2Fit%2Fdownloads%2Fliferay-portal%2Fadditional-files&ts=1383123826&use_mirror=garr" dest=/var/tmp/liferay-6.1.war
|
||||
when: liferay_install.rc != 0
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Explode the liferay war
|
||||
shell: cd /var/lib/tomcat7/webapps/ROOT ; jar xf /var/tmp/liferay-6.1.war ; chown -R root:root . ; rm -f /var/tmp/liferay-6.1.war
|
||||
when: liferay_install.rc != 0
|
||||
notify:
|
||||
tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Create the /usr/share/tomcat7/lib/ext directory
|
||||
file: dest=/usr/share/tomcat7/lib/ext state=directory owner=root group=root mode=0755
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Install other liferay dependencies (taken from the liferay bundle)
|
||||
copy: src={{ item }} dest=/usr/share/tomcat7/lib/ext/{{ item }}
|
||||
with_items:
|
||||
- activation.jar
|
||||
- ccpp.jar
|
||||
# - hsql.jar
|
||||
- jms.jar
|
||||
- jta.jar
|
||||
- jtds.jar
|
||||
- junit.jar
|
||||
- jutf7.jar
|
||||
- mail.jar
|
||||
# - mysql.jar
|
||||
- persistence.jar
|
||||
- portal-service.jar
|
||||
- portlet.jar
|
||||
# - postgresql.jar
|
||||
- support-tomcat.jar
|
||||
notify: tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Install liferay patch for ldap without using the test password
|
||||
copy: src={{ item }} dest=/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/{{ item }}
|
||||
with_items:
|
||||
- lps9001-ldap-ce6101-portal-impl.jar
|
||||
when: liferay_ldap_fix is defined and liferay_ldap_fix == 'True'
|
||||
notify: tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Ensure that the ldap authentication patch is not installed
|
||||
file: dest=/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/{{ item }} state=absent
|
||||
with_items:
|
||||
- lps9001-ldap-ce6101-portal-impl.jar
|
||||
when: liferay_ldap_fix is not defined or liferay_ldap_fix == 'False'
|
||||
notify: tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Create the funny /var/lib/tomcat7/temp/liferay/com/liferay/portal/deploy/dependencies directory
|
||||
file: dest=/var/lib/tomcat7/temp/liferay/com/liferay/portal/deploy/dependencies state=directory owner=root group=root mode=0755
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Create the temp directory /var/lib/tomcat7/temp
|
||||
file: dest=/var/lib/tomcat7/temp owner=tomcat7 group=tomcat7 mode=0750 state=directory
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Create the funny path needed by some liferay dependencies
|
||||
file: dest=/var/lib/tomcat7/temp/liferay/com/liferay/portal/deploy/dependencies state=directory owner=root group=root mode=0755
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Install other liferay dependencies in funny places
|
||||
copy: src=../files/{{ item }} dest=/var/lib/tomcat7/temp/liferay/com/liferay/portal/deploy/dependencies/{{ item }}
|
||||
with_items:
|
||||
- resin.jar
|
||||
- script-10.jar
|
||||
notify:
|
||||
tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
#
|
||||
# Note: we have the dependencies as local files. The two following tasks are not needed anymore
|
||||
#
|
||||
# - name: get the liferay dependencies
|
||||
# get_url: url="http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.2%20GA3/liferay-portal-dependencies-6.1.2-ce-ga3-20130816114619181.zip?r=http%3A%2F%2Fwww.liferay.com%2Fit%2Fdownloads%2Fliferay-portal%2Fadditional-files&ts=1383130399&use_mirror=garr" dest=/var/tmp/liferay-dependencies.zip
|
||||
# register: dependencies_download
|
||||
|
||||
# - name: Install the liferay dependencies
|
||||
# shell: cd /usr/share/tomcat7/lib ; unzip /var/tmp/liferay-dependencies.zip ; chown -R root:root . ; ln -s */*.jar ./ext ; /bin/rm -f ./ext/hsql.jar
|
||||
# when: dependencies_download.changed
|
||||
# notify: tomcat7 restart
|
||||
|
||||
- name: liferay basic configuration
|
||||
template: src=../templates/portal-ext.properties.j2 dest=/var/lib/tomcat7/webapps/ROOT/WEB-INF/classes/portal-ext.properties owner=root group=tomcat7 mode=0640
|
||||
notify:
|
||||
tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Create the portal home directory outside the webapp root
|
||||
file: dest={{ liferay.portal_home }} state=directory owner=tomcat7 group=tomcat7 mode=0750
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Create data and deploy directories
|
||||
file: dest={{ liferay.portal_home }}/{{ item }} state=directory owner=tomcat7 group=tomcat7 mode=0750
|
||||
with_items:
|
||||
- data
|
||||
- deploy
|
||||
- liferay
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Force the logs in the right place
|
||||
file: src=/var/log/tomcat7 dest={{ liferay.portal_home }}/logs state=link
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Give write permissions to some directories
|
||||
file: dest=/var/lib/tomcat7/webapps/ROOT/html/{{ item }} state=directory owner=tomcat7 group=tomcat7
|
||||
with_items:
|
||||
- icons
|
||||
- themes
|
||||
notify: Recursively set liferay write permissions
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Put the static properties in the portal home directory
|
||||
template: src=../templates/home-portal-ext.properties.j2 dest={{ liferay.portal_home }}/portal-ext.properties owner=root group=tomcat7 mode=0640
|
||||
notify: tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Create an empty portal-setup-wizard.properties if does not exist
|
||||
copy: content="" dest={{ liferay.portal_home }}/portal-setup-wizard.properties owner=root group=tomcat7 mode=0660 force=no
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
||||
- name: Test if the related webapps are installed
|
||||
raw: ls -l /var/lib/tomcat7/webapps/marketplace-portlet
|
||||
register: liferay_bundled_apps
|
||||
ignore_errors: True
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Download the liferay bundle. Needed for the related webapps
|
||||
get_url: url="http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.2%20GA3/liferay-portal-tomcat-6.1.2-ce-ga3-20130816114619181.zip?r=http%3A%2F%2Fwww.liferay.com%2Fit%2Fdownloads%2Fliferay-portal%2Favailable-releases&ts=1383043780&use_mirror=garr" dest=/var/tmp/liferay-bundle.zip
|
||||
when: liferay_bundled_apps.rc != 0
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: Explode the liferay bundle and install the needed webapps
|
||||
shell: cd /var/tmp ; /var/lib/tomcat7/webapps/ROOT ; unzip /var/tmp/liferay-bundle.zip ; cd /var/tmp/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps ; cp -a marketplace-portlet portal-compat-hook resources-importer-web welcome-theme /var/lib/tomcat7/webapps/ ; cd /var/tmp ; rm -fr /var/tmp/liferay-bundle.zip /var/tmp/liferay-portal-6.1.2-ce-ga3
|
||||
when: liferay_bundled_apps.rc != 0
|
||||
notify:
|
||||
tomcat7 restart
|
||||
tags:
|
||||
- liferay
|
||||
|
||||
- name: The images directory of the theme must be writeable by tomcat(!)
|
||||
file: dest=/var/lib/tomcat7/webapps/welcome-theme/images state=directory owner=tomcat7 group=tomcat7 mode=0750
|
||||
notify:
|
||||
Recursively change welcome-theme images permissions
|
||||
tags:
|
||||
- liferay
|
||||
- liferaycfg
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
- name: Initialize the data directory
|
||||
shell: cp -rp /srv/gitblit-{{ gitblit_version }}/data/* {{ gitblit_data_dir }} ; chown -R {{ gitblit_user }}:{{ gitblit_user }} {{ gitblit_data_dir }}
|
||||
when: ( gitblit_data_dir_setup | changed )
|
||||
when: gitblit_data_dir_setup is changed
|
||||
tags: gitblit
|
||||
|
||||
- name: Install the customized gitblit.properties file
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- name: Update the apt cache
|
||||
apt: update_cache=yes
|
||||
when: ( ambari_repo | changed )
|
||||
when: ambari_repo is changed
|
||||
|
||||
- name: Install the ambari server
|
||||
apt: pkg=ambari-server state=latest update_cache=yes cache_valid_time=1800
|
||||
|
|
|
@ -70,13 +70,13 @@
|
|||
- name: Check if restart is required by any of the versioned plugins
|
||||
set_fact:
|
||||
jenkins_restart_required: yes
|
||||
when: item.changed
|
||||
when: item is changed
|
||||
with_items: '{{ my_jenkins_plugin_versioned.results }}'
|
||||
|
||||
- name: Check if restart is required by any of the unversioned plugins
|
||||
set_fact:
|
||||
jenkins_restart_required: yes
|
||||
when: item.changed
|
||||
when: item is changed
|
||||
with_items: '{{ my_jenkins_plugin_unversioned.results }}'
|
||||
|
||||
- name: Restart Jenkins if required
|
||||
|
|
|
@ -26,23 +26,23 @@
|
|||
|
||||
- name: Unpack the joomla distribution file
|
||||
unarchive: copy=no src={{ joomla_download_dir }}/{{ joomla_dist_file }} dest={{ joomla_download_dir }}/joomla-unpacked
|
||||
when: ( joomla_download | changed )
|
||||
when: joomla_download is changed
|
||||
|
||||
- name: Move the joomla files to the right place
|
||||
shell: cp -a {{ joomla_download_dir }}/joomla-unpacked/* {{ joomla_install_dir }}/
|
||||
args:
|
||||
creates: '{{ joomla_install_dir }}/index.php'
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( joomla_download | changed )
|
||||
when: joomla_download is changed
|
||||
register: unpack_joomla
|
||||
|
||||
- name: Set the correct ownership of the joomla files
|
||||
file: dest={{ joomla_install_dir }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory
|
||||
with_items: '{{ phpfpm_pools }}'
|
||||
when: ( unpack_joomla | changed )
|
||||
when: unpack_joomla is changed
|
||||
|
||||
- name: Remove the original joomla unpacked distribution
|
||||
command: rm -fr {{ joomla_download_dir }}/{{ joomla_dist_name }}
|
||||
when: ( unpack_joomla | changed )
|
||||
when: unpack_joomla is changed
|
||||
|
||||
tags: joomla
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
- name: Update the apt cache
|
||||
apt: update_cache=yes
|
||||
when: ( external_repo | changed )
|
||||
when: external_repo is changed
|
||||
ignore_errors: True
|
||||
tags: mongodb
|
||||
|
||||
|
@ -35,24 +35,8 @@
|
|||
- mongodb_install_from_external_repo
|
||||
- mongodb_install_packages
|
||||
- not mongodb_latest_version
|
||||
# - not mongodb-org_version
|
||||
tags: mongodb
|
||||
|
||||
#- name: Install the mongodb-org server
|
||||
# apt: pkg={{ item }}={{ mongodb_specific_version }} state=present
|
||||
# with_items:
|
||||
# - mongodb-org
|
||||
# - mongodb-org-server
|
||||
# - mongodb-org-shell
|
||||
# - mongodb-org-mongos
|
||||
# - mongodb-org-tools
|
||||
# when:
|
||||
# - mongodb_install_from_external_repo
|
||||
# - mongodb_install_packages
|
||||
# - not mongodb_latest_version
|
||||
# - mongodb-org_version
|
||||
# tags: mongodb
|
||||
|
||||
- name: Install the mongodb server
|
||||
apt: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
- name: Update apt cache
|
||||
apt: update_cache=yes
|
||||
when: ( update_apt_cache | changed )
|
||||
when: update_apt_cache is changed
|
||||
tags: [ 'dell', 'nagios' ]
|
||||
|
||||
#- action: apt_key id=1285491434D8786F state=present
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
- name: Install libssl0.9.8_0.9.8o-4squeeze14_amd64.deb on debian 7
|
||||
shell: /usr/bin/dpkg -i /var/lib/libssl0.9.8_0.9.8o-4squeeze14_amd64.deb
|
||||
when: ( libssl_legacy | changed )
|
||||
when: libssl_legacy is changed
|
||||
tags: [ 'dell', 'nagios' ]
|
||||
|
||||
- name: Install the main Dell OMSA package
|
||||
|
|
|
@ -2,23 +2,11 @@
|
|||
- name: apt key for the internal precise-backports repository
|
||||
apt_key: url=http://ppa.research-infrastructures.eu/precise-backports/keys/precise-backports.asc state=present
|
||||
when: is_precise
|
||||
register: update_apt_cache
|
||||
tags:
|
||||
- apt
|
||||
tags: apt
|
||||
|
||||
- name: Install the precise backports apt repository
|
||||
apt_repository: repo='{{ item }}'
|
||||
apt_repository: repo='{{ item }}' update_cache=yes
|
||||
with_items:
|
||||
- deb http://ppa.research-infrastructures.eu/precise-backports precise main
|
||||
when: is_precise
|
||||
register: update_apt_cache
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Update the apt cache
|
||||
apt: update_cache=yes
|
||||
when: ( update_apt_cache | changed )
|
||||
ignore_errors: True
|
||||
tags:
|
||||
- apt
|
||||
|
||||
tags: apt
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- name: Add the openjdk ppa. To have openjdk 8/9 on precise and trusty
|
||||
apt_repository: repo='{{ openjdk_ppa }}' update_cache=yes
|
||||
|
||||
- name: install OpenJDK JRE
|
||||
- name: Install OpenJDK
|
||||
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }} update_cache=yes cache_valid_time=3600
|
||||
with_nested:
|
||||
- '{{ openjdk_version }}'
|
||||
|
@ -13,11 +13,11 @@
|
|||
|
||||
- name: Rebuild the Ubuntu keystore
|
||||
command: update-ca-certificates --fresh
|
||||
when: ( openjdk_installed | changed )
|
||||
when: openjdk_installed is changed
|
||||
|
||||
- name: Set the default OpenJDK
|
||||
shell: update-java-alternatives -s java-1.{{ item }}.0-openjdk-amd64
|
||||
with_items: '{{ openjdk_default }}'
|
||||
when: ( openjdk_installed | changed )
|
||||
when: openjdk_installed is changed
|
||||
|
||||
tags: [ 'jdk', 'openjdk' ]
|
||||
|
|
|
@ -31,12 +31,12 @@
|
|||
|
||||
- name: Configure the sources and compile them
|
||||
shell: cd /home/{{ d4science_user }}/quickrank ; rm -fr build ; mkdir build ; cd /home/{{ d4science_user }}/quickrank/build ; cmake .. -DCMAKE_CXX_COMPILER=g++-5 -DCMAKE_BUILD_TYPE=Release ; make
|
||||
when: ( quickrank_src | changed )
|
||||
when: quickrank_src is changed
|
||||
|
||||
- name: Install the quickrank binaries
|
||||
become_user: "{{ d4science_ansible_become_user | default('root') }}"
|
||||
shell: cd /home/{{ d4science_user }}/quickrank/bin ; install -m 755 quicklearn /usr/local/bin
|
||||
when: ( quickrank_src | changed )
|
||||
when: quickrank_src is changed
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
|
|
|
@ -82,12 +82,12 @@
|
|||
|
||||
- name: Initialize the DB
|
||||
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; RAILS_ENV=production rake db:migrate
|
||||
when: redmine_install.changed
|
||||
when: redmine_install is changed
|
||||
tags: redmine
|
||||
|
||||
- name: Install the defauld DB data
|
||||
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; RAILS_ENV=production REDMINE_LANG=en rake redmine:load_default_data
|
||||
when: redmine_install.changed
|
||||
when: redmine_install is changed
|
||||
tags: redmine
|
||||
|
||||
- name: Install the packages needed by plugins or to build plugins required gems
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
- name: Unpack the revive adserver distribution file
|
||||
unarchive: src={{ revive_ad_install_dir }}/revive-adserver-{{ revive_ad_version }}.tar.gz dest={{ revive_ad_dest_dir }} copy=no
|
||||
when: ( ad_download | changed )
|
||||
when: ad_download is changed
|
||||
tags:
|
||||
- revive
|
||||
- revive_adserver
|
||||
|
||||
- name: Fix the global permissions on the revive adserver directory
|
||||
command: chown -R root:root {{ revive_ad_dest_dir }}/revive-adserver-{{ revive_ad_version }}
|
||||
when: ( ad_download | changed )
|
||||
when: ad_download is changed
|
||||
tags:
|
||||
- revive
|
||||
- revive_adserver
|
||||
|
@ -48,14 +48,14 @@
|
|||
- name: Give the revive user the permission to write inside a list of directories
|
||||
command: chown -R {{ revive_ad_user }} {{ revive_ad_dest_dir }}/{{ item }}
|
||||
with_items: revive_writable_dirs
|
||||
#when: ( ad_download | changed )
|
||||
#when: ad_download is changed
|
||||
tags:
|
||||
- revive
|
||||
- revive_adserver
|
||||
|
||||
- name: Give the revive user the permission to write inside the images directories
|
||||
command: chown -R {{ revive_ad_user }} {{ revive_ad_images_dest_dir }}
|
||||
#when: ( ad_download | changed )
|
||||
#when: ad_download is changed
|
||||
tags:
|
||||
- revive
|
||||
- revive_adserver
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: Install the rstudio server package
|
||||
command: gdebi -n -q /srv/{{ rstudio_file }}
|
||||
when: ( rstudio_download | changed )
|
||||
when: rstudio_download is changed
|
||||
|
||||
- name: Change the apparmor behaviour to complain, otherwise it cannot read the nslcd socket
|
||||
shell: RETVAL='' ; if [ -x /usr/sbin/apparmor_status ] ; then APPARMOR_STATE=$( /usr/sbin/apparmor_status ) ; RETVAL=$? ; if [ $RETVAL -eq 0 ] ; then aa-complain /usr/lib/rstudio-server/bin/rserver ; fi ; fi
|
||||
|
|
|
@ -19,19 +19,19 @@
|
|||
|
||||
- name: Remove the old accounting service app
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=absent
|
||||
when: ( accounting_download | changed )
|
||||
when: accounting_download is changed
|
||||
|
||||
- name: Remove the accounting service library
|
||||
shell: rm -fr {{ smartgears_instance_path }}/lib/{{ accounting_service_library_name }}-*
|
||||
when: ( accounting_download | changed )
|
||||
when: accounting_download is changed
|
||||
|
||||
- name: Remove the accounting couchbase library if present
|
||||
shell: rm -fr {{ smartgears_instance_path }}/lib/{{ accounting_couchbase_library_name }}-*
|
||||
when: ( accounting_download | changed )
|
||||
when: accounting_download is changed
|
||||
|
||||
- name: Get the couchbase library
|
||||
maven_artifact: artifact_id={{ accounting_couchbase_library_name }} version={{ accounting_couchbase_library_version | default('latest') }} group_id={{ accounting_couchbase_library_group_id }} extension={{ accounting_couchbase_library_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_service_library_classifier }} dest={{ smartgears_instance_path }}/lib
|
||||
when: ( accounting_download | changed )
|
||||
when: accounting_download is changed
|
||||
|
||||
- name: Copy the accounting_service war file to the destination place
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ accounting_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
- name: Remove the old accounting_aggregator smart executor plugin
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ accounting_aggregator_se_plugin_name }} state=absent
|
||||
when: ( accounting_aggregator_download | changed )
|
||||
when: accounting_aggregator_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Create the plugin directory inside the smart executor
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
- name: Unarchive the accounting_aggregator uber jar to expose its libraries
|
||||
unarchive: src={{ smartgears_downloads_dir }}/{{ accounting_aggregator_se_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ accounting_aggregator_se_plugin_name }}/ copy=no
|
||||
when: (accounting_aggregator_create_dir | changed)
|
||||
when: accounting_aggregator_create_dir is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Download the accounting_aggregator plugin jar file
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: Remove the old accounting insert storage plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_rstudio_se_plugin_artifact_id }}-*-{{ accounting_insert_rstudio_se_plugin_classifier }}.{{ accounting_insert_rstudio_se_plugin_extension }}
|
||||
when: (accounting_insert_rstudio_download | changed)
|
||||
when: accounting_insert_rstudio_download is changed
|
||||
|
||||
- name: Copy the accounting aggregator plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ accounting_insert_rstudio_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_rstudio_se_plugin_file }} remote_src=yes
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: Remove the old catalogue ws files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} state=absent
|
||||
when: ( catalogue_ws_download | changed )
|
||||
when: catalogue_ws_download is changed
|
||||
|
||||
- name: Copy the catalogue ws war into the tomcat webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ catalogue_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}.{{ catalogue_ws_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ ckan_connector_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ ckan_connector_name }}.{{ ckan_connector_extension }}'
|
||||
when: ( ckan_connector_download | changed )
|
||||
when: ckan_connector_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Create the CKAN connector webapp directory
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ ckan_connector_name }} state=directory
|
||||
when: ( ckan_connector_download | changed )
|
||||
when: ckan_connector_download is changed
|
||||
|
||||
- name: Unarchive the CKAN connector war file
|
||||
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ ckan_connector_filename }} dest={{ smartgears_instance_path }}/webapps/{{ ckan_connector_name }}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
- name: Remove the old cmems-importer smart executor plugin
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }} state=absent
|
||||
when: ( cmems_importer_download | changed )
|
||||
when: cmems_importer_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Create the plugin directory inside the smart executor
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
- name: Unarchive the cmems-importer uber jar to expose its libraries
|
||||
unarchive: src={{ smartgears_downloads_dir }}/{{ cmems_importer_se_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }}/ copy=no
|
||||
when: (cmems_importer_create_dir | changed)
|
||||
when: cmems_importer_create_dir is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Download the cmems-importer plugin jar file
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: Remove the old dm_pool_manager files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=absent
|
||||
when: ( dm_pool_manager_download | changed )
|
||||
when: dm_pool_manager_download is changed
|
||||
|
||||
- name: Create the dm_pool_manager working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
- name: Remove the old fhn-manager files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=absent
|
||||
when: ( fhn_mgr_download | changed )
|
||||
when: fhn_mgr_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the fhn_manager war file to its destination place
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: Remove the old gcube oauth files
|
||||
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=absent
|
||||
when: ( gcube_oauth_download | changed )
|
||||
when: gcube_oauth_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the gcube_oauth war into the webapps directory
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Remove the old accounting aggregator plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ smart_generic_worker_plugin_name }}-*-jar-with-dependencies.jar
|
||||
when: (generic_worker_download | changed)
|
||||
when: generic_worker_download is changed
|
||||
|
||||
- name: Copy the accounting aggregator plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ smart_generic_worker_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ smart_generic_worker_plugin_file }} remote_src=yes force=yes
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Remove the installed gcube geoserver connector before upgrading
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib/{{ gcube_geoserver_connector_name }}*.jar
|
||||
when: ( gcube_conn_download | changed )
|
||||
when: gcube_conn_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the gcube geoserver connector to its destination
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- name: Remove the old grsf-publisher-ws files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }} state=absent
|
||||
notify: Restart smartgears
|
||||
when: ( grsf_publisher_download | changed )
|
||||
when: grsf_publisher_download is changed
|
||||
|
||||
- name: Copy the GRSF publisher under the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ grsf_publisher_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ grsf_publisher_ws_name }}.{{ grsf_publisher_ws_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the installed home library before upgrading
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ home_library_name }} state=absent
|
||||
when: ( home_library_download | changed )
|
||||
when: home_library_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the home library war
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the old ic_proxy files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ ic_proxy_name }} state=absent
|
||||
when: ( ic_proxy_download | changed )
|
||||
when: ic_proxy_download is changed
|
||||
|
||||
- name: Create the ic proxy working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ ic_proxy_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
- name: Remove the old is_exporter smart executor plugin
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ is_exporter_se_plugin_name }} state=absent
|
||||
when: ( is_exporter_download | changed )
|
||||
when: is_exporter_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Create the plugin directory inside the smart executor
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
- name: Unarchive the is_exporter uber jar to expose its libraries
|
||||
unarchive: src={{ smartgears_downloads_dir }}/{{ is_exporter_se_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ is_exporter_se_plugin_name }}/ copy=no
|
||||
when: (is_exporter_create_dir | changed)
|
||||
when: is_exporter_create_dir is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Download the is_exporter plugin jar file
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Remove the old is-sweeper plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_name }}-*-{{ is_sweeper_se_plugin_classifier }}.{{ is_sweeper_se_plugin_extension }}
|
||||
when: ( is_sweeper_plugin_download | changed )
|
||||
when: is_sweeper_plugin_download is changed
|
||||
|
||||
- name: Install the is-sweeper plugin inside the smart executor lib directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ is_sweeper_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ is_sweeper_se_plugin_file }} remote_src=yes force=yes
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
- name: Remove the old oscar-importer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ oscar_importer_se_plugin_name }}-*-{{ oscar_importer_se_plugin_classifier }}.{{ oscar_importer_se_plugin_extension }}
|
||||
when: ( oscar_importer_download | changed )
|
||||
when: oscar_importer_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the oscar-importer plugin on the correct place
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ oscar_importer_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ oscar_importer_se_plugin_file }} remote_src=yes force=yes
|
||||
when: ( oscar_importer_download | changed )
|
||||
when: oscar_importer_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Install the libnetcdfc7 package
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Remove the old quota plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_artifact_id }}-*-jar-with-dependencies.jar
|
||||
when: (quota_storage_download | changed)
|
||||
when: quota_storage_download is changed
|
||||
|
||||
- name: Copy the quota plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ quota_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ quota_se_plugin_file }} remote_src=yes
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: Remove the old quota service files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ quota_service_name }} state=absent
|
||||
when: ( quota_service_download | changed )
|
||||
when: quota_service_download is changed
|
||||
|
||||
- name: Copy the quota_service war to the destination place
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ quota_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ quota_service_name }}.{{ quota_service_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -38,11 +38,11 @@
|
|||
- '{{ smartgears_instance_path }}/webapps/{{ r_connector_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ r_connector_name }}.{{ r_connector_extension }}'
|
||||
notify: Restart smartgears
|
||||
when: ( r_connector_download | changed )
|
||||
when: r_connector_download is changed
|
||||
|
||||
- name: Create the R connector webapp directory
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ r_connector_name }} state=directory
|
||||
when: ( r_connector_download | changed )
|
||||
when: r_connector_download is changed
|
||||
|
||||
- name: Unarchive the R connector war file
|
||||
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ r_connector_filename }} dest={{ smartgears_instance_path }}/webapps/{{ r_connector_name }}
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}.{{ resource_registry_extension }}'
|
||||
when: ( resource_registry_download | changed )
|
||||
when: resource_registry_download is changed
|
||||
|
||||
- name: Create the resource-registry working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
when: ( resource_registry_download | changed )
|
||||
when: resource_registry_download is changed
|
||||
|
||||
- name: Unarchive the resource registry war
|
||||
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ resource_registry_file }} dest={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} creates={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}/WEB-INF/lib
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: Remove the old resource-registry-handlers file
|
||||
shell: rm -f {{ smartgears_instance_path }}/lib/{{ resource_registry_handlers_name }}-*.{{ resource_registry_handlers_extension }}
|
||||
when: ( resource_registry_handlers_download | changed )
|
||||
when: resource_registry_handlers_download is changed
|
||||
|
||||
- name: Copy the resource registry jar file into the tomcat lib directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ resource_registry_handlers_file }} dest={{ smartgears_instance_path }}/lib/{{ resource_registry_handlers_file }} remote_src=yes force=yes
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the old sdi files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ sdi_service_name }} state=absent
|
||||
when: ( sdi_service_download | changed )
|
||||
when: sdi_service_download is changed
|
||||
|
||||
- name: Copy the sdi service war file into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ sdi_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ sdi_service_name }}.{{ sdi_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the old service files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }} state=absent
|
||||
when: ( sdmx_datasource_service_download | changed )
|
||||
when: sdmx_datasource_service_download is changed
|
||||
|
||||
- name: Copy the service war file into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ sdmx_datasource_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }}.{{ sdmx_datasource_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the old sharelatex-connector files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }} state=absent
|
||||
when: ( sharelatex_connector_download | changed )
|
||||
when: sharelatex_connector_download is changed
|
||||
|
||||
- name: Create the sharelatex connector webapp directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: Remove the old Sis geotk data transfer plugin
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=absent
|
||||
when: (sis_geotk_download | changed)
|
||||
when: sis_geotk_download is changed
|
||||
|
||||
- name: Create the plugin directory inside data transfer
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=directory
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
- name: Unarchive the Sis geotk data transfer uber jar to expose its libraries
|
||||
unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/ copy=no
|
||||
when: (sis_geotk_create_dir | changed)
|
||||
when: sis_geotk_create_dir is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Get the Sis geotk data transfer jar
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
- name: Remove the old smart executor files if an upgrade is planned
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
||||
when: ( smartexecutor_download | changed )
|
||||
when: smartexecutor_download is changed
|
||||
|
||||
- name: Create the smart executor working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
- name: Remove the smartgears-distribution files
|
||||
shell: find {{ smartgears_downloads_dir }} -maxdepth 1 -type d -name smartgears-distribution-* -exec rm -fr {} \;
|
||||
ignore_errors: yes
|
||||
when: ( smartgears_download | changed )
|
||||
when: smartgears_download is changed
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat']
|
||||
|
||||
- name: Unarchive the smartgears distribution
|
||||
|
@ -31,14 +31,14 @@
|
|||
with_items: '{{ tomcat_m_instances }}'
|
||||
when:
|
||||
- not item.skip_smartgears
|
||||
- ( smartgears_download | changed )
|
||||
- smartgears_download is changed
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat' ]
|
||||
|
||||
- name: Check if the smartgears stop script exists
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
stat: path={{ smartgears_user_home }}/stopContainer.sh
|
||||
when: smartgears_upgrade or ( smartgears_download | changed )
|
||||
when: smartgears_upgrade or ( smartgears_download is changed )
|
||||
register: smartgears_stop_script
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat', 'stop_smartgears_service' ]
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
|||
become_user: '{{ smartgears_user }}'
|
||||
shell: '{{ smartgears_user_home }}/stopContainer.sh'
|
||||
when:
|
||||
- smartgears_upgrade or ( smartgears_download | changed )
|
||||
- smartgears_upgrade or ( smartgears_download is changed )
|
||||
- smartgears_stop_script.stat.exists
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat', 'stop_smartgears_service' ]
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
|||
shell: cd {{ smartgears_downloads_dir }} ; dest_dir=$( find . -type d -name smartgears-distribution-\* | tail -1 ) ; cd $dest_dir ; . /{{ item.user_home }}/.bashrc ; ./install -s tomcat
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
when:
|
||||
- ( smartgears_download | changed )
|
||||
- smartgears_download is changed
|
||||
- not item.skip_smartgears
|
||||
register: install_smartgears_app
|
||||
notify: Restart smartgears
|
||||
|
@ -136,7 +136,7 @@
|
|||
# command: cat {{ smartgears_user_home }}/SMARTGEARS_VERSION
|
||||
# when:
|
||||
# - sm_version_file.stat.exists
|
||||
# - smartgears_download is not defined or not ( smartgears_download | changed )
|
||||
# - smartgears_download is not defined or not ( smartgears_download is changed )
|
||||
# register: smartgears_real_version
|
||||
# tags: [ 'smartgears', 'smartgears_distribution', 'tomcat', 'smartgears_conf' ]
|
||||
|
||||
|
@ -166,7 +166,7 @@
|
|||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
shell: /usr/local/bin/get-scopes {{ gcube_admin_token | default('') }}
|
||||
# when: gcube_admin_token is defined or ( smartgears_download | changed )
|
||||
# when: gcube_admin_token is defined or ( smartgears_download is changed )
|
||||
# register: smartgears_remove_state
|
||||
notify: Restart smartgears
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
|
||||
|
@ -176,7 +176,7 @@
|
|||
# become: True
|
||||
# become_user: '{{ smartgears_user }}'
|
||||
# shell: . {{ smartgears_user_home }}/.bashrc ; cd {{ smartgears_user_home }}/SmartGears/scripts ; ./clean-container-state -s old_saved_scopes.xml
|
||||
# when: ( smartgears_remove_state | changed )
|
||||
# when: smartgears_remove_state is changed
|
||||
# notify: Restart smartgears
|
||||
# tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}.{{ social_networking_library_ws_extension }}'
|
||||
when: ( social_networking_library_ws_download | changed )
|
||||
when: social_networking_library_ws_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Copy the social_networking_library_ws war into the tomcat webapps dir
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Remove the old social indexer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ social_data_indexer_se_plugin_name }}-*-jar-with-dependencies.jar
|
||||
when: (social_indexer_download | changed)
|
||||
when: social_indexer_download is changed
|
||||
|
||||
- name: Copy the social indexer plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ social_data_indexer_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ social_data_indexer_se_plugin_file }} remote_src=yes force=yes
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Remove the old spd files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ spd_service_name }} state=absent
|
||||
when: ( spd_service_download | changed )
|
||||
when: spd_service_download is changed
|
||||
|
||||
- name: Copy the spd war into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ spd_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ spd_service_name }}.{{ spd_extension }} remote_src=yes force=yes
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
- name: Remove the installed storage hub before upgrading
|
||||
file: dest={{ smartgears_instance_path }}/webapps/{{ storage_hub_name }} state=absent
|
||||
when: ( storage_hub_download | changed )
|
||||
when: storage_hub_download is changed
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Get the StorageHub war
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
- name: Write the timezone file
|
||||
template: src=etc-timezone.j2 dest=/etc/timezone owner=root group=root mode=0644
|
||||
register: set_timezone
|
||||
tags:
|
||||
- timezone
|
||||
tags: timezone
|
||||
|
||||
- name: Reconfigure the system tzdata
|
||||
command: dpkg-reconfigure --frontend noninteractive tzdata
|
||||
when: (set_timezone|changed)
|
||||
tags:
|
||||
- timezone
|
||||
when: set_timezone is changed
|
||||
tags: timezone
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
- name: tomcat restart instances with changed configs
|
||||
service: name='tomcat-instance-{{ item.item.http_port }}' state=restarted sleep=20
|
||||
with_items: '{{ restart_needed.results }}'
|
||||
when: item.changed
|
||||
when: item is changed
|
||||
ignore_errors: True
|
||||
|
||||
- name: tomcat restart instances with changed jmx config
|
||||
service: name='tomcat-instance-{{ item.item.http_port }}' state=restarted sleep=20
|
||||
with_items: '{{ jmx_restart_needed.results }}'
|
||||
when: item.changed
|
||||
when: item is changed
|
||||
ignore_errors: True
|
||||
|
||||
- name: tomcat instances restart
|
||||
|
|
|
@ -13,12 +13,10 @@
|
|||
- 'allow ^146\.48\.122\.15$'
|
||||
- 'allow ^146\.48\.123\.23$'
|
||||
register: munin_config
|
||||
tags:
|
||||
- munin
|
||||
tags: munin
|
||||
|
||||
- name: reload munin-node
|
||||
service: name=munin-node state=restarted
|
||||
when: munin_config.changed == True
|
||||
tags:
|
||||
- munin
|
||||
when: munin_config is changed
|
||||
tags: munin
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
- name: Reload the systemd unit when changed
|
||||
command: systemctl daemon-reload
|
||||
when: ( install_varnish_unit | changed )
|
||||
when: install_varnish_unit is changed
|
||||
tags: [ 'varnish', 'varnishconf' ]
|
||||
|
||||
- name: Ensure that the varnish service is started and enabled
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
- name: Fix the permissions on the yii framework directory
|
||||
command: chown -R root:root {{ yii_install_dir }}/yii-{{ yii_version }}.{{ yii_release }}
|
||||
when: ( yii_unpack | changed )
|
||||
when: yii_unpack is changed
|
||||
tags: [ 'yii', 'yii-framework' ]
|
||||
|
||||
- name: Create a couple of links to the running version
|
||||
|
|
Loading…
Reference in New Issue