Not if you pass your attributes as literal strings.
However, you can re-use the attribute if you assign it to a variable. Example:
$file_path = '/this/is/my/path'
file { 'myfile':
path => $file_path,
ensure => present,
owner => 'someuser',
group => 'somegroup'
}
notify { "the value of path is: ${file_path}": }
Note the final colon that separates the resource name and the parameters (in this case there are none, so the resource is just terminated). The notify
above could also be written as this (reference):
notify { 'my_notify':
message => "the value of path is: ${file_path}",
}
Also, note the correct use of single and double quotes. According to Puppet Lint, double quotes should only be used when the string contains an interpolated variable, and such variables should be enclosed within curly braces.