lets say I want to create two files with two different contents. i need to do the following:
class newfile{
file{"file1":
ensure => present,
content => "abc",
}
file{"file2":
ensure=>present,
content => "xyz",
}
file{"file3":
ensure=>present,
content => "def",
}
and so on
}.
Is there a way where I can loop this and instead have arrays = [1,2,3.....] , contentarray=["abc", "xyz", "def"...]
and
while (x=4; x++){
file {"file$array[x]":
ensure => present,
content => $contentarray[x]
}
}
or something likek that
↧