What I actually would like it to create a kind of dependency.
I would like that a parameter X of any instance of type 'b'
depends on the path param of the 'a' resource instance namely passed as a parameter.
file {'test' :
ensure => present,
name => 'test.txt',
within => dir,
}
file {'dir' :
ensure => directory,
name => 'dir',
path => '/tmp'
}
This is not the best example since file does not work this way but its the closest one to what I would like.
Imagine file was a custom type, so I know in the
within param I am expecting a File[] resource insance. I'd like to know if there is any way I can get the parameters of this resource instance (dir)? (Something like extrapolating it, or accessing it through catalog)
In the previous case File['test'] will end up being located at '/tmp/text.txt', appending dir.path +
test.name, without specifying the path in File['test'] but just the directory it depends on.
I hope I could explain myself a bit better,