node default {
   package { "webserver" :
      case $operatingsystem {
         centos, redhat { $apache = "httpd" }
         debian, ubuntu { $apache = "apache2" }
         default : { fail("I do not support this OS or distribution") }
      }
      name = $apache,
      ensure = installed,
   }
   
   file { "/myfile.txt" :
      contents => "The IP of this host is $ipaddress",
   }
}