Pergunta

New to Chef's world.

I found this useful recipe : https://github.com/mdxp/drupal-cookbook

I see the following default attributes :

default['drupal']['version'] = "7.14"
default['drupal']['checksum'] = "..."
default['drupal']['dir'] = "/var/www/drupal"
default['drupal']['db']['database'] = "drupal"
default['drupal']['db']['user'] = "drupal"
default['drupal']['db']['host'] = "localhost"
default['drupal']['site']['admin'] = "admin"
default['drupal']['site']['pass'] = "drupaladmin"
default['drupal']['site']['name'] = "Drupal7"
default['drupal']['apache']['port'] = "80"

On the node.json i have :

{
        "run_list": [
        "recipe[drupal]"
    ]
}

When I run chef; it installs drupal, with default attributes; which is not what I want.

Dumb question: where do I override the 'default' attributes ?

Couldn't find a concrete and simple example. The wiki is sooo confusing.

Foi útil?

Solução

in that JSON block if you specify information there it should work.

E.G.

{
        "drupal": {
          "db": {
            "user": "foo",
            "host": "bar"
          }
        },
        "run_list": ["recipe[drupal]"]
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top