Commits

Peter Eisentraut committed a8a60df

Make sure host name is set as FQDN

This is necessary for Postfix.

Comments (0)

Files changed (1)

   notify => Service['postfix'],
 }
 
+file { '/etc/hostname':
+  ensure => present,
+  content => "$fqdn\n",
+  notify => Exec['hostname'],
+}
+
+exec { 'hostname':
+  command => 'hostname -F /etc/hostname',
+  path => ['/bin', '/usr/bin'],
+  refreshonly => true,
+  notify => Service['postfix'],
+}
+
 if $virtual != 'openvzve' {
   package { 'ntp': }
   service { 'ntp':