From c3480a588cc138d09e9f5cd8af1b7ee3b637dd86 Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Sat, 22 Mar 2014 14:57:22 +0000 Subject: [PATCH] Drop a update-motd.d fragment for monitors so when the user/admin logs into a monitor there is a small notice for the user about the state of the ceph cluster. Works only on ubuntu for now --- roles/mon/files/precise/92-ceph | 5 +++++ roles/mon/tasks/main.yml | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 roles/mon/files/precise/92-ceph diff --git a/roles/mon/files/precise/92-ceph b/roles/mon/files/precise/92-ceph new file mode 100644 index 000000000..a424bc188 --- /dev/null +++ b/roles/mon/files/precise/92-ceph @@ -0,0 +1,5 @@ +#!/bin/bash + +echo -n "Ceph state is: " +/usr/bin/ceph health +echo "" diff --git a/roles/mon/tasks/main.yml b/roles/mon/tasks/main.yml index 3038c32fb..007f47105 100644 --- a/roles/mon/tasks/main.yml +++ b/roles/mon/tasks/main.yml @@ -40,3 +40,7 @@ - /var/lib/ceph/bootstrap-osd/ceph.keyring # this handles the non-colocation case - /var/lib/ceph/bootstrap-mds/ceph.keyring - /etc/ceph/keyring.radosgw.gateway + +- name: Drop in a motd script to report status when logging in + copy: src=precise/92-ceph dest=/etc/update-motd.d/92-ceph owner=root group=root mode=0755 + when: ansible_distribution_release == 'precise' -- 2.39.5