Try this: command => "echo \"I want to see ${string}\"",
i.e. send a double quoted string containing single quotes to the echo command rather than a single quoted string containing single quotes. HTH, - thomas On Sunday, December 13, 2015 at 5:20:00 PM UTC+1, Vadym Chepkov wrote: > > Hi, > > I can't figure out how to include a single quoted string into a command, > not matter what escaping I do. > Here is a simplified code : > > $string = '\'a quoted string\'' > > exec { 'show string': > command => "echo \'I want to see ${string}\'", > logoutput => true, > path => '/bin:/usr/bin', > } > > Quotes don't show up, no matter what. > What do I do wrong? > > $ puppet --version > 3.6.2 (Puppet Enterprise 3.3.2) > > Thanks, > Vadym > > -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/62cc81ef-5fa0-4e07-859e-263903126c3f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.