[libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting

Pavel Hrdina phrdina at redhat.com
Mon Oct 23 08:35:38 UTC 2017


You can notice it by looking for this message while booting:

"Oct 23 08:31:19 libvirt-freebsd-10 sm-mta[667]: My unqualified host
name (libvirt-freebsd-10) unknown; sleeping for retry"

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 guests/tasks/base.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml
index a71e66d..48455dd 100644
--- a/guests/tasks/base.yml
+++ b/guests/tasks/base.yml
@@ -118,6 +118,19 @@
   hostname:
     name: '{{ inventory_hostname }}'
 
+# On FreeBSD sendmail is enabled by default and it expects fully qualified
+# hostname. By disabling sendmail we will avoid sendmail to trying to resolve
+# the hostname while booting which takes several seconds.
+- name: Disable sendmail
+  lineinfile:
+    path: /etc/rc.conf
+    create: yes
+    backup: yes
+    regexp: '^sendmail_enable.*'
+    line: 'sendmail_enable="NONE"'
+  when:
+    - os_name == 'FreeBSD'
+
 - name: Configure ssh access for the root user
   authorized_key:
     user: root
-- 
2.13.6




More information about the libvir-list mailing list