aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dnf_automatic
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-11 09:18:26 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-11 09:18:26 -0500
commit4dde2337e850271e4e85a56c7c5eadeefb92c7b9 (patch)
treed679b104c04324b630cb040b81bf6903cd3efcd0 /roles/dnf_automatic
parent99aefa49a2dc99510f690ef1ab45ca0d3c0ca8e7 (diff)
downloadselfhosted-4dde2337e850271e4e85a56c7c5eadeefb92c7b9.tar.gz
selfhosted-4dde2337e850271e4e85a56c7c5eadeefb92c7b9.zip
dnf_automatic: add docs
Diffstat (limited to 'roles/dnf_automatic')
-rw-r--r--roles/dnf_automatic/README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/dnf_automatic/README.md b/roles/dnf_automatic/README.md
new file mode 100644
index 0000000..7922eab
--- /dev/null
+++ b/roles/dnf_automatic/README.md
@@ -0,0 +1,39 @@
+dnf-automatic
+=============
+
+Description
+-----------
+
+The `dnf_automatic` role configures the [dnf-automatic](https://dnf.readthedocs.io/en/latest/automatic.html)
+systemd timer to automatically update system packages.
+
+In addition, it provides a custom [post-update script](files/usr/local/sbin/dnf-auto-restart)
+which automatically restarts any systemd units affected by the update and
+reboots the host (when necessary).
+
+
+Variables
+---------
+
+This role **accepts** the following variables:
+
+Variable | Default | Description
+-----------------------------|-----------|------------
+`dnf_automatic_on_calendar` | `03:00` | Systemd [calendar interval](https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events) for performing updates
+`dnf_automatic_random_delay` | `60m` | [Randomized delay](https://www.freedesktop.org/software/systemd/man/systemd.timer.html#RandomizedDelaySec=) for update timer
+`dnf_automatic_restart` | yes | Enable automatic reboot and service restarts
+
+Usage
+-----
+
+Example playbook:
+
+````yaml
+- name: configure automatic package updates
+ hosts: all
+ roles:
+ - role: dnf_automatic
+ vars:
+ dnf_automatic_on_calendar: 06:00
+ dnf_automatic_restart: yes
+````