Disable verbose_logging for individual chef recipes or resources

I have a recipe that copies secret_key to my node. In fact, the contents of the file are registered in my shell. I want to disable this single recipe because I do not want the contents of the file to be stored in my shell history. I know that you can completely disable logging using the verbose_logging parameter in client.rb.

verbose_logging: Set the log level. Parameters: true, nil and false. If this parameter is set to false, notifications about individual resources are processed, suppressed (and displayed at: info logging level). Setting this value to false can be useful when starting a chef as a daemon. The default value is nil.

But is it possible to deactivate logging for only one recipe?

+4
source share
1 answer

There is a common property called sensitivethat will

Ensure that sensitive resource data is not logged by the chef client. The default value is false. This property applies only to runtime, file, and template resources.

template "/etc/my.secret" do
  sensitive true
end
+6
source

Source: https://habr.com/ru/post/1615805/


All Articles