Dear Andrea, 


as promised I provide you some of my ANSIBLE code as inspiration for you.

Here a short list of my final steps

 # NEW: check if a KNIME process is running in the DataMiner #

- check if a plugin has a new version or is not installed yet (FSKlab_ICPMF is our key plugin)
- if old version is installed (HANDLER?) 
  + remove old version first (either via uninstall or the new way for testing by just deleting all related plugin files
  + run dummy workflow to force KNIME to use -clean in order to accept the recent changes
- install new plugin version
- run dummy workflow again with - clean feature

as dummy workflow you could use my provided KNIME test workflow. It should run through if all used plugins are present and working properly.

I did not find yet a way to include the path of R automatically to the special FSKlab_Rpath in the KNIME GUI


plugins.yml

---

- name: uninstall KNIME plugins
  shell: "{{ knime_dir }}/knime_executor/knime -nosplash -application org.eclipse.equinox.p2.director -profile KNIMEProfile -destination {{ knime_dir }}/knime_executor -repository {{ knime_plugin_repository }} -uninstallIU {{ item }} && rm -rf {{ knime_dir }}/knime_executor/plugins/{{ item }}.installed"
  with_items: "{{ knime_plugin_uninstall }}"
  become: yes
  become_user: "{{ knime_user }}"
  notify:
     - run dummy workflow
     - restart apache-tomee

- name: install KNIME plugins
  shell: "{{ knime_dir }}/knime_executor/knime -nosplash -application org.eclipse.equinox.p2.director -profile KNIMEProfile -destination {{ knime_dir }}/knime_executor -repository {{ knime_plugin_repository }} -installIU {{ item }} && touch {{ knime_dir }}/knime_executor/plugins/{{ item }}.installed creates={{ knime_dir }}/knime_executor/plugins/{{ item }}.installed"
  with_items: "{{ knime_plugin_install }}"
  become: yes
  become_user: "{{ knime_user }}"
  notify:
     - run dummy workflow
     - restart apache-tomee

host_vars:

knime_plugin_uninstall: #[] 
     - de.bund.bfr.knime.fsklab.feature.feature.group

handler:

--
- name: run dummy workflow #to reset plugin-list and restart apache-tomee
  shell: "{{ knime_dir }}/knime_executor/knime -nosplash -clean -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir='/opt/knime_server/workflow_repository/workflows/dummy'"
  become: yes
  become_user: "{{ knime_user }}"

main.yml:

knime_plugin_repository:  "http://update.knime.org/analytics-platform/{{ knime_update_version }},http://update.knime.org/store/{{ knime_update_version }},http://update.knime.org/community-contributions/trusted/{{ knime_update_version }},http://update.knime.org/community-contributions/{{ knime_update_version }},http://update.knime.org/community-contributions/{{ knime_update_version }},https://dl.bintray.com/silebat/fsklab_icpmf,https://github.com/SiLeBAT/Other/raw/master/de.bund.bfr.knime.other.aaw.feat/update,https://dl.bintray.com/silebat/pmmlab,http://dl.bintray.com/silebat/generic,http://dl.bintray.com/silebat/internal/"
knime_plugin_install:
    - org.knime.features.testingapplication.feature.group
    - org.knime.features.datageneration.feature.group  #KNIME Data Generation http://update.knime.com/analytics-platform/3.6 Lars      
    - org.knime.features.base.filehandling.feature.group  #KNIME File Handling Nodes http://update.knime.com/analytics-platform/3.6 Lars      
    - org.knime.features.r.feature.group #KNIME Interactive R Statistics Integration http://update.knime.com/analytics-platform/3.6 Lars      
    - org.knime.features.base.feature.group #KNIME Core http://update.knime.com/analytics-platform/3.6 Lars      
    - org.knime.features.ext.jfreechart.feature.group #KNIME JFreeChart http://update.knime.com/analytics-platform/3.6 Lars      
    - org.knime.features.ext.svg.feature.group #KNIME SVG Support http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.webservice.client.feature.group #KNIME Web Service Client http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.virtual.feature.group #KNIME Virtual Nodes http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.textprocessing.feature.group #KNIME Textprocessing http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.textprocessing.language.german.feature.group #KNIME Textprocessing German Language Pack http://update.knime.com/analytics-platform/3.6 Matthias
    - org.knime.features.ext.textprocessing.language.spanish.feature.group #KNIME Textprocessing Spanish Language Pack http://update.knime.com/analytics-platform/3.6 Matthias
    - org.knime.features.ext.textprocessing.language.french.feature.group #KNIME Textprocessing French Language Pack http://update.knime.com/analytics-platform/3.6 Matthias
    - org.knime.features.stats2.feature.group #KNIME Statistics Nodes (Labs) http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.socialmedia.feature.group #KNIME Social Media Connectors (Twitter && Google) http://update.knime.com/analytics-platform/3.6 Matthias      
    - com.knime.features.reporting.designer.feature.group #KNIME Report Designer http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.webanalytics.feature.group #KNIME Webanalytics http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.python2.feature.group #KNIME Python Integration http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.perl.feature.group #KNIME Perl Integration http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.optimization.feature.group #KNIME Optimization extension http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.osm.feature.group #KNIME Open Street Map Integration http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.network.feature.group #KNIME Network Mining http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.network.distmatrix.feature.group #KNIME Network Mining distance matrix support http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.neighborgram.feature.group #KNIME Neighborgram && ParUni http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.distmatrix.feature.group #KNIME Distance Matrix http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.itemset.feature.group #KNIME Itemset Mining http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.lucene.feature.group #KNIME Indexing and Searching http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.birt.feature.group #KNIME HTML/PDF Writer http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.exttool.feature.group #KNIME External Tool Support http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.arima.feature.group #KNIME Autoregressive integrated moving average (ARIMA) http://update.knime.com/analytics-platform/3.6 Matthias      
    - org.knime.features.ext.exttool.feature.group #KNIME External Tool Support http://update.knime.com/analytics-platform/3.6 Matthias      
    - de.bund.bfr.knime.fsklab.feature.feature.group #FSK Lab Feature https://dl.bintray.com/silebat/fsklab_icpmf Lars      
      #    - de.bund.bfr.knime.fsklab.legacy.feature.feature.group #Legacy FSK-Lab nodes https://dl.bintray.com/silebat/fsklab_icpmf Lars      
    - de.bund.bfr.knime.pmm.base.feature.group #PMM Nodes https://dl.bintray.com/silebat/pmmlab/ Lars      
    - de.bund.bfr.knime.gis.feature.feature.group #KNIME Nodes for GIS and Graph Visualization http://dl.bintray.com/silebat/generic/ Lars Warenstrominfo
    - de.bund.bfr.knime.other.aaw.feat.feature.group #ZoMoPlugin-OtherFeats_aaw https://github.com/SiLeBAT/Other/raw/master/de.bund.bfr.knime.other.aaw.feat/update Alex Mibi-Portal
      ###    - de.bund.bfr.knime.internal.feature.feature.group #Rhome and editable node http://dl.bintray.com/silebat/internal/ Alex RiskRanking
    - de.nbi.cibi.feature.feature.group #de.NBI - CIBI Extension http://update.knime.com/community-contributions/3.6 M. Flor      
    - org.knime.knip.feature.feature.group #KNIME Image Processing http://update.knime.com/community-contributions/3.6 M. Filter AGINFRA

Thank you for the webmeeting and please let me know if I can help somehow.

Best wishes
Lars




