From 0e7ea643f1f4a82fb3382b81cc3172bb7e85f802 Mon Sep 17 00:00:00 2001 From: technowhizz <7688823+technowhizz@users.noreply.github.com> Date: Thu, 28 Dec 2023 09:48:15 +0000 Subject: [PATCH] Ensure cron service is started for smartmon --- etc/kayobe/ansible/smartmon-tools.yml | 7 +++++++ releasenotes/notes/smartmontools-bc8176f45d58a75d.yaml | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/smartmontools-bc8176f45d58a75d.yaml diff --git a/etc/kayobe/ansible/smartmon-tools.yml b/etc/kayobe/ansible/smartmon-tools.yml index bb5cf5dca1..b4a064b637 100644 --- a/etc/kayobe/ansible/smartmon-tools.yml +++ b/etc/kayobe/ansible/smartmon-tools.yml @@ -12,6 +12,13 @@ state: present become: true + - name: Ensure the cron/crond service is running + service: + name: "{{ 'cron' if ansible_facts['distribution'] == 'Ubuntu' else 'crond' }}" + state: started + enabled: true + become: true + - name: Copy smartmon.sh and nvmemon.sh from scripts folder copy: src: "scripts/{{ item }}" diff --git a/releasenotes/notes/smartmontools-bc8176f45d58a75d.yaml b/releasenotes/notes/smartmontools-bc8176f45d58a75d.yaml new file mode 100644 index 0000000000..ac34513473 --- /dev/null +++ b/releasenotes/notes/smartmontools-bc8176f45d58a75d.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The smartmon-tools playbook now ensures that the cron service is running as + in some cases it may not be running by default. +