Ansible Role linuxfabrik.lfops.dnf_makecache¶
This role manages dnf-makecache.timer, which periodically refreshes the DNF metadata cache. By default the timer is disabled and stopped, which is what most servers want: DNF refreshes its caches on demand, and the periodic refresh is rarely needed.
This role is Red Hat-family only (DNF / YUM). It does not run on Debian / Ubuntu.
Available since LFOps 2.0.0.
How the Role Behaves¶
- The role does not manage
dnf-makecache.service. The service cannot be enabled at boot: it has no[Install]section (systemctl is-enabledreportsstatic), runsdnf makecacheonce and only whendnf-makecache.timertriggers it. Disabling the timer therefore also stops the periodic refresh.
Tags¶
dnf_makecache
- Manages the dnf-makecache timer.
- Triggers: none.
Optional Role Variables¶
dnf_makecache__timer_enabled
- Whether
dnf-makecache.timeris enabled at boot. - Type: Bool.
- Default:
false
dnf_makecache__timer_state
- State of
dnf-makecache.timer. - Type: String. One of
restarted,started,stopped. - Default:
'started'ifdnf_makecache__timer_enabledistrue, otherwise'stopped'.
Example:
# optional
dnf_makecache__timer_enabled: false
dnf_makecache__timer_state: 'stopped'