From d8b0857bb59bab2793d2b9c72ce2b810a54f818f Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 28 May 2023 00:13:01 +0200 Subject: [PATCH] Fix motd task for armbian --- roles/ssh/tasks/motd.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/ssh/tasks/motd.yml b/roles/ssh/tasks/motd.yml index dc06265..4773a0c 100644 --- a/roles/ssh/tasks/motd.yml +++ b/roles/ssh/tasks/motd.yml @@ -1,8 +1,15 @@ --- - become: yes block: + - name: check if help in motd exists + stat: + path: /etc/update-motd.d/10-help-text + register: stat_result + - name: disable help in ubuntu - when: ansible_distribution == "Ubuntu" + when: + - ansible_distribution == "Ubuntu" + - stat_result.stat.exists file: path: /etc/update-motd.d/10-help-text mode: '0644'