From c3ce11dacf7924d3d8014ce9ecf26b6e3927d37b Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:29 -0400 Subject: [PATCH] Fix update-motd so it runs properly --- roles/base/templates/etc/cron.d/update-motd.j2 | 3 ++- roles/base/templates/usr/local/sbin/update-motd.sh.j2 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/base/templates/etc/cron.d/update-motd.j2 b/roles/base/templates/etc/cron.d/update-motd.j2 index 980eb21..a4d40d5 100644 --- a/roles/base/templates/etc/cron.d/update-motd.j2 +++ b/roles/base/templates/etc/cron.d/update-motd.j2 @@ -1,4 +1,5 @@ # cron file for motd # {{ ansible_managed }} -@reboot root /bin/sh /usr/local/sbin/update-motd.sh &>/dev/null +PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +@reboot root /usr/local/sbin/update-motd.sh &>/dev/null diff --git a/roles/base/templates/usr/local/sbin/update-motd.sh.j2 b/roles/base/templates/usr/local/sbin/update-motd.sh.j2 index d75606d..040c255 100755 --- a/roles/base/templates/usr/local/sbin/update-motd.sh.j2 +++ b/roles/base/templates/usr/local/sbin/update-motd.sh.j2 @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash # Update dynamic MOTD file # {{ ansible_managed }}