forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Fix the command that sets the logback log level.
This commit is contained in:
parent
6aed2db7a2
commit
ac277cb6af
|
@ -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' ]
|
||||
|
|
Loading…
Reference in New Issue