From 075ce8ea223fd93ced49975cf7fba6cd1c6bc41f Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:24 -0400 Subject: [PATCH] Add PVC status MOTD script --- roles/base/tasks/main.yml | 3 ++- roles/base/templates/etc/profile.d/pvc.sh.j2 | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 roles/base/templates/etc/profile.d/pvc.sh.j2 diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 6a87356..dc6a538 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -421,7 +421,7 @@ dest: "/etc/bash.bashrc" # motd -- name: ensure update-motd and w scripts are present +- name: ensure update-motd and profile.d scripts are present template: src: "{{ item.src }}" dest: "{{ item.dest }}" @@ -429,6 +429,7 @@ with_items: - { src: "usr/local/sbin/update-motd.sh.j2", dest: "/usr/local/sbin/update-motd.sh" } - { src: "etc/profile.d/w.sh.j2", dest: "/etc/profile.d/w.sh" } + - { src: "etc/profile.d/pvc.sh.j2", dest: "/etc/profile.d/zzz_pvc.sh" } tags: motd - name: install update-motd crontab diff --git a/roles/base/templates/etc/profile.d/pvc.sh.j2 b/roles/base/templates/etc/profile.d/pvc.sh.j2 new file mode 100644 index 0000000..1e128de --- /dev/null +++ b/roles/base/templates/etc/profile.d/pvc.sh.j2 @@ -0,0 +1,7 @@ +#!/bin/sh + +# Message of the day script to print PVC cluster status +# {{ ansible_managed }} + +echo +pvc -q status -f short