summaryrefslogtreecommitdiffstats
path: root/docker/ansible/roles/config_files/tasks/mcelog.yml
diff options
context:
space:
mode:
authorAaron Smith <aasmith@redhat.com>2018-10-02 15:09:34 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-02 15:09:34 +0000
commit328129a1fd4ae54fe012379439464a56d15d4681 (patch)
treea89e97ab1027cc025bcf7d82ac4eb424d07cb0fb /docker/ansible/roles/config_files/tasks/mcelog.yml
parentdda0e18b1dd1a9a2397f43262124d4de3dc424e7 (diff)
parent24c5124e304b8e2854d98284f6ee4715a75ee735 (diff)
Merge "WIP: Add role to auto install docker on hosts"
Diffstat (limited to 'docker/ansible/roles/config_files/tasks/mcelog.yml')
-rw-r--r--docker/ansible/roles/config_files/tasks/mcelog.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/docker/ansible/roles/config_files/tasks/mcelog.yml b/docker/ansible/roles/config_files/tasks/mcelog.yml
index 9c935e3e..bab4b142 100644
--- a/docker/ansible/roles/config_files/tasks/mcelog.yml
+++ b/docker/ansible/roles/config_files/tasks/mcelog.yml
@@ -13,6 +13,23 @@
# limitations under the License.
---
+- name: install mcelog package
+ package:
+ name: mcelog
+ state: present
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
+- name: start mcelog daemon if not running
+ service:
+ name: mcelog
+ state: started
+ enabled: true
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
- name: check if mcelog running on host
shell: ps -ef | grep mcelog | grep -v grep > /dev/null
register: mcelog_running