aboutsummaryrefslogtreecommitdiffstats
path: root/roles/fedora
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-11-16 11:30:19 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2018-11-16 11:30:51 +0100
commit68c25d5e9bc0c4ec9cf22107c031794a9be719fb (patch)
treeea96f7ac636991ec2c9bc18b27d844e2b836baaf /roles/fedora
parent2df419d71028a4f699a98d897439b89e15f4e72a (diff)
downloadlabitat-ansible-68c25d5e9bc0c4ec9cf22107c031794a9be719fb.tar.gz
labitat-ansible-68c25d5e9bc0c4ec9cf22107c031794a9be719fb.tar.xz
labitat-ansible-68c25d5e9bc0c4ec9cf22107c031794a9be719fb.zip
fedora: dnf: disable dnf-makecache.timer by default
Diffstat (limited to 'roles/fedora')
-rw-r--r--roles/fedora/defaults/main.yml2
-rw-r--r--roles/fedora/tasks/dnf.yml11
2 files changed, 13 insertions, 0 deletions
diff --git a/roles/fedora/defaults/main.yml b/roles/fedora/defaults/main.yml
index 41944d9..d12cc0d 100644
--- a/roles/fedora/defaults/main.yml
+++ b/roles/fedora/defaults/main.yml
@@ -13,6 +13,8 @@ logind_conf: {}
resolved_conf: {}
timesyncd_conf: {}
+dnf_makecache: false
+
dnf_packages:
'glibc-langpack-en': present
'initscripts': present
diff --git a/roles/fedora/tasks/dnf.yml b/roles/fedora/tasks/dnf.yml
index 6b3ad74..4a3e623 100644
--- a/roles/fedora/tasks/dnf.yml
+++ b/roles/fedora/tasks/dnf.yml
@@ -32,4 +32,15 @@
tags:
- packages
+- name: Configure dnf-makecache timer
+ systemd:
+ name: dnf-makecache.timer
+ enabled: "{{ dnf_makecache|ternary('yes','no') }}"
+ masked: no
+ state: "{{ dnf_makecache|ternary('started','stopped') }}"
+ when: not chroot
+- name: '- when in chroot'
+ command: 'systemctl {{ dnf_makecache|ternary("enable","disable") }} dnf-makecache.timer'
+ when: chroot
+
# vim: set ts=2 sw=2 et: