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. 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0c179b1d-8b44-4e74-9097-4579a4fba1c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to