FAQ
I placed the printf string in a separate variabe, then I can double quote the
variable and it will take care of escaping correctly.

$fdisk_cmd = "c\nu\nn\np\n1\n\n\nw\n"
exec { "fdisk /dev/${name}":
command => "printf \"$fdisk_cmd\" | fdisk /dev/${name}",
unless => "cat /proc/partitions | grep ${name}1",
path => '/sbin:/bin:/usr/bin',
}




--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 24, '12 at 7:15p
activeJul 24, '12 at 7:15p
posts1
users1
websitepuppetlabs.com

1 user in discussion

Corby: 1 post

People

Translate

site design / logo © 2022 Grokbase