check the existing physical directory

asked 2014-11-18 11:16:34 -0500

Chutki gravatar image


I have below unix script

$disk=$(ls /dev/sd[b-z])
vgcreat vg02 $disk

I tried to convert the above unix script to the below puppet with two methods,but it didn't work

class diskcre::filecas {

augeas {'test':
command => "ls /dev/sd[b-z]"


class diskcre::filecas {

if (ls /dev/sd[b-z])
{ include diskcre::vg_cre

I tried these two but non of the method worked in puppet. I want to create new volume group. So before I create vg need to check what all are the disk (physical volume) existing. please help me

edit retag flag offensive close merge delete