diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index 7afaefb0..9d463285 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -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' ]