Ask Your Question

Puppet agent log shows file resource by title, not the actual file

asked 2015-12-01 06:50:09 -0600

mark gravatar image


Is there any way to have the Puppet Agent log any file resource by the actual resource (the file/directory name) instead of the resource title (which can be any choosen string)? Changing the code to use the file path as title is not an option, as this might differ from platform to platform.

For example :

Current : Notice: /Stage[main]/Rsyslog/File[rsyslogconf]/ensure: currentvalue link, should be file Desired : Notice: /Stage[main]/Rsyslog/File[/etc/rsyslog.conf]/ensure: current_value link, should be file


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-01 09:03:51 -0600

Hi Mark - if you're trying to debug the simplest way I think would be to add a notice or notify message in yout module - e.g.:

notify{"changing rsyslog.conf"}

.. Cheers Stuart

edit flag offensive delete link more


Further, I would expect that the path is in a variable, so you could notify{"Changing ${path_var}"} to see the actual path.

lavaman gravatar imagelavaman ( 2015-12-01 15:14:41 -0600 )edit

Unfortunately, I have dozens of modules so adding a notify is not an option. I was looking for a more generic approach which could help me to to find the file names. Seems I will have to think of a different way to accomplish this. Thank you both

mark gravatar imagemark ( 2015-12-02 08:33:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-01 06:50:09 -0600

Seen: 52 times

Last updated: Dec 01 '15