From 5611e76e363c323c95d65befd7025199ccbc316b Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 19 Feb 2023 14:16:44 +0100 Subject: [PATCH] Cloud-init for automating yum security updates --- cloud-init/yum.automate-security-updates.yaml | 9 +++++++++ knowledge base/systemd.md | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 cloud-init/yum.automate-security-updates.yaml diff --git a/cloud-init/yum.automate-security-updates.yaml b/cloud-init/yum.automate-security-updates.yaml new file mode 100644 index 0000000..93c49e6 --- /dev/null +++ b/cloud-init/yum.automate-security-updates.yaml @@ -0,0 +1,9 @@ +#cloud-config + +write_files: + - path: /etc/cron.daily/security-updates + permissions: '0755' + content: | + #!/bin/bash + dnf -y upgrade --security --nobest + defer: true diff --git a/knowledge base/systemd.md b/knowledge base/systemd.md index f8e1f9a..abab0a8 100644 --- a/knowledge base/systemd.md +++ b/knowledge base/systemd.md @@ -86,6 +86,9 @@ journalctl -F '_GID' # Filter logs by path. journalctl '/usr/bin/bash' +# Filter logs by identifier (like a tag). +journalctl -t 'CROND' + # Display kernel logs only. # Works like `dmesg`. journalctl -k