library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Fix the command that sets the logback log level.

This commit is contained in:
Andrea Dell'Amico 2016-07-08 16:43:11 +02:00
parent 6aed2db7a2
commit ac277cb6af
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@
- name: Change the smartgears log level
become: True
become_user: '{{ d4science_user }}'
shell: LOGLEVEL=$( xmlstarlet sel -t -v "/configuration/logger/@level" {{ item.user_home }}/tomcat/lib/logback.xml | grep {{ smartgears_loglevel }} ) ; [ $? -ne 0 ] && xmlstarlet ed -u "/configuration/logger[@level]/@level" -v {{ smartgears_loglevel }} {{ item.user_home }}/tomcat/lib/logback.xml > {{ item.user_home }}/tomcat/lib/logback.xml.new ; mv {{ item.user_home }}/tomcat/lib/logback.xml.new {{ item.user_home }}/tomcat/lib/logback.xml
shell: LOGLEVEL=$( xmlstarlet sel -t -v "/configuration/logger/@level" {{ item.user_home }}/tomcat/lib/logback.xml | grep {{ smartgears_loglevel }} ) ; [ $? -ne 0 ] && xmlstarlet ed -u "/configuration/logger[@level]/@level" -v {{ smartgears_loglevel }} {{ item.user_home }}/tomcat/lib/logback.xml > {{ item.user_home }}/tomcat/lib/logback.xml.new ; [ -f {{ item.user_home }}/tomcat/lib/logback.xml.new ] && mv {{ item.user_home }}/tomcat/lib/logback.xml.new {{ item.user_home }}/tomcat/lib/logback.xml
with_items: '{{ tomcat_m_instances }}'
notify: Restart smartgears
tags: [ 'smartgears', 'tomcat', 'smartgears_loglevel' ]