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
. – cassianolealmysql
cookbook that @MarkO'Connor linked to does not include amysql::server
recipe (in fact, it has no recipes at all). Your best bet would probably be to switch to that and declaremysql_service
andmysql_config
resources in your wrapper. – cassianolealmysql_config
resource will fix my problem. But is there some general way to deal with similar situations? – Poma