1 #Copyright 2018 OPNFV and Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 - name: install mcelog package
21 when: install_mcelog|default(false)|bool
25 - name: start mcelog daemon if not running
31 when: install_mcelog|default(false)|bool
35 - name: check if mcelog running on host
36 shell: ps -ef | grep mcelog | grep -v grep > /dev/null
37 register: mcelog_running
42 - name: check if mcelog exists
43 shell: which mcelog > /dev/null
44 register: mcelog_exists
49 - name: check if mcelog-client exists
51 path: /var/run/mcelog-client
52 register: mcelog_client_exists
57 - name: enable mcelog plugin
60 dest: "{{ config_file_dir }}/mcelog.conf"
61 when: mcelog_running|succeeded and mcelog_exists|succeeded and mcelog_client_exists|succeeded