I am trying to create recursive directories with the same structure:
I have the following modes:
/ some-1 / some-2 / some-3 / some-4
and inside each of them I would like to create the same structure, let it call its pool:
/ some-1 / pool / some-2 / pool / some-3 / pool / some-4 / pool
as suggested by Albert, an elegant solution can be implemented using the method of determining puppets.
define create_pool {
file { "/some-$title/pool":
ensure => "directory",
recurse => "true",
}
}
create_pool { [1,2,3,4]: }
Fortunately, this solution "loops" around the list:
source
share