Open erez-rabih opened 9 years ago
I am running into this as well. It seems that you must set your own password as a normal precedence attribute in order for it to not be overwritten by the set_unless statement; not even a force_override was able to take precedence. Maybe switch the statement to something like:
node.set['wordpress']['db']['pass'] = secure_password if node['wordpress']['db']['pass'].nil?
If you're still having problems with this I just opened https://github.com/brint/wordpress-cookbook/pull/71 that solves this for all of the set_unless
cases and makes the cookbook more wrap-able.
I'm wrapping the wordpress cookbook with my own. I am trying to set the wordpress DB password using attributes:
But it is not being set as expected. The problem is here: https://github.com/brint/wordpress-cookbook/blob/master/recipes/database.rb#L35
It overrides the given password even though the attribute has a value. After exploring the problem I found out that set_unless will override default precedence attributes. Changing the attributes file to normal instead of default solves it:
Just thought I should bring this issue to awareness.
Thanks :)