Hello all,

How does one enter multi-line content using 'puppet resource file ...'
at the command line?

For example, I am trying to create a file called /tmp/hw.txt with two
lines of content:

$ cat /tmp/hw.txt
hello
world

This does not work:

$ puppet resource file hello_world \
  path=/tmp/hw.txt \
  ensure=file \
  content="hello\nworld\n"

This does, but use "puppet apply" :

cat <<"eof" | puppet apply
file { "hello_world":
  path => "/tmp/hw.txt",
  ensure => "file",
  content => "hello\nworld\n",
}
eof

Does anyone have any pointers on how to construct the content= line so
that I can get two lines of text?

Regards,
- Robert

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to