Pasted below an example relation for new resource say 'new_type'.
file
{ "interface":
path => "/var/tmp/test.txt",
content => template("module/test_template.erb"),
notify => new_type['sample'],
}
new_type
{ "sample":
path => "/var/tmp/test.txt",
active =>true,
ensure=>present,
}
In 'new_type' resource implementation I want to access value of 'path' attribute value from 'file' resource to determine certain action in 'new_type' resource.
With current approach I have to keep ‘path’ attribute in ‘new_type’ and mandate user to have ‘path’ value same as that of ‘path’ value in file resource.
How can I access 'file’ resource 'path' attribute value in 'new_type' resource implementation?
If it is possible I can remove the 'path' attribute from 'new_type' resource body as value of both path need to be same all the time.