Commits

Peter Eisentraut  committed 18ac040

Workaround if no FQDN is defined

  • Participants
  • Parent commits 6cdd5c2

Comments (0)

Files changed (1)

File manifests/pgci.pp

   notify => Service['postfix'],
 }
 
-file { '/etc/hostname':
-  ensure => present,
-  content => "$fqdn\n",
-  notify => Exec['hostname'],
+if $fqdn != undef {
+  file { '/etc/hostname':
+    ensure => present,
+    content => "$fqdn\n",
+    notify => Exec['hostname'],
+  }
+}
+else {
+  warning("no FQDN defined");
 }
 
 exec { 'hostname':