Skip to content

Wordpress DB password is not set correctly #56

@erez-rabih

Description

@erez-rabih

I'm wrapping the wordpress cookbook with my own. I am trying to set the wordpress DB password using attributes:

include_attribute 'wordpress'
default['wordpress']['db']['pass'] = "some-password"

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:

include_attribute 'wordpress'
normal['wordpress']['db']['pass'] = "some-password"

Just thought I should bring this issue to awareness.

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions