jms1

Puppet syntax question

Sep 2nd, 2016
299
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   file { 'blah.sh' :
  2.     content => @('EOF')
  3.       #!/bin/bash
  4.       echo hello
  5.       |EOF ,
  6.     ensure  => present ,
  7.   }
  8.  
  9.   file { 'blah.sh' :
  10.     content => @('EOF') ,
  11.       #!/bin/bash
  12.       echo hello
  13.       |EOF
  14.     ensure  => present ,
  15.   }
  16.  
  17. ----
  18.  
  19. Answer, found through trial and error:
  20.  
  21. * The delimiter must be DOUBLE-quoted
  22. * The comma goes at the end of the line which starts the heredoc
  23.  
  24.   file { 'blah.sh' :
  25.     content => @("EOF") ,
  26.       #!/bin/bash
  27.       echo hello
  28.       |EOF
  29.     ensure  => present ,
  30.   }
RAW Paste Data