I have a recipe that includes on mysql::server but replaces my.cnf file. The result is that on each chef-client run it restarts mysql server because my.cnf was replaced twice during chef-client run. How to avoid that?
Update: yes, this happens because mysql::server deploys my.cnf and then my recipe overwrites it. The question is how to disable deployment of my.cnf by mysql::server without disabling or modifying this cookbook (by using only changes in my wrapper-cookbook). Directly modifying community cookbooks is considered a bad practice so there surely should be a way to achieve desired behaviour using wrapping cookbook.
my.cnf. - cassianolealmysqlcookbook that @MarkO'Connor linked to does not include amysql::serverrecipe (in fact, it has no recipes at all). Your best bet would probably be to switch to that and declaremysql_serviceandmysql_configresources in your wrapper. - cassianolealmysql_configresource will fix my problem. But is there some general way to deal with similar situations? - Poma