I'd deploy a wee script that does what you are trying to handle in the command string, and just call that instead.
On 21 Nov 2011, at 06:30, Douglas Garstang wrote: > Grrr. I have the exec{} below in my puppet module. How do I escape the > \ characters? I've tried every possible combination I can think of. > I've used one, I've used two, and I've used THREE \. > > exec { > 'oracle-extract-part': > command => "/usr/bin/printf > \"n\np\n2\n2091\n+16384M\nw\n\" | /sbin/fdisk /dev/xvdj", > unless => "/bin/cat /proc/partitions | /bin/grep > ${orcl_ephm_device}2"; > } > > With three \, it ends up looking like this in the log: > > Nov 21 01:27:45 dev-c3-app-15 puppet-agent[3091]: > (/Stage[main]/Oracle::Server11g/Exec[oracle-swap-part]/returns) change > from notrun to 0 failed: /usr/bin/printf > \"n\#012p\#0121\#0121\#012+32768M\#012t\#01282\#012w\#012\" | > /sbin/fdisk /dev/xvdj returned 1 instead of one of [0] at > /etc/puppet/devmp/modules/oracle/manifests/server11g.pp:136 > > Now... that's obviously not right. How do I escape \ symbols? > > Doug. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.