vm/guest: Make sure haveged is not installed
authornicoo <nicoo@realraum.at>
Wed, 5 Feb 2020 21:52:19 +0000 (22:52 +0100)
committernicoo <nicoo@realraum.at>
Wed, 5 Feb 2020 21:52:19 +0000 (22:52 +0100)
There are no benefits to having it on the guest, since we use virtio-rng
to provide entropy from the host.

vm_guest_force_haveged is added to support overriding that, in the special
case of vex (which doesn't seem to use virtio-rng, probably because its
kernel is too ancient)

ansible/host_vars/vex/main.yml
ansible/roles/vm/guest/tasks/main.yml

index d75df90..0275c73 100644 (file)
@@ -4,3 +4,5 @@ sshd_allowusers_host:
   - www
   - www-data
   - acme
+
+vm_guest_force_haveged: yes
index 2c34699..8cdc0a4 100644 (file)
@@ -9,6 +9,12 @@
     state: absent
     purge: yes
 
+- name: Uninstall haveged
+  when: not (vm_guest_force_haveged | default(False))
+  apt:
+    name: haveged
+    state: absent
+    purge: yes
 
 - name: Provide a root shell on the VM console [1/2]
   file: