From 6362a3b40f3405e736728a39e3882e478cde9938 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 5 Nov 2022 01:48:30 -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 }}