Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README references to "cookbook_name" #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end
```

The user `postgres` will act once with the home directory
`/var/lib/pgsql/9.2` and the `cookbook_name` attribute is now
`/var/lib/pgsql/9.2` and the `cookbook` attribute is now
`my-postgresql` instead of `postgresql`. This last part is
particularly important for templates and cookbook files.

Expand Down Expand Up @@ -99,7 +99,7 @@ template "logging.yml" do
path "#{node.elasticsearch[:path][:conf]}/logging.yml"
source "logging.yml.erb"
owner node.elasticsearch[:user] and group node.elasticsearch[:user] and mode 0755
cookbook_name "elasticsearch"
cookbook "elasticsearch"

# this is the only change from original definition
notifies :run, 'execute[Custom ElasticSearch restarter]'
Expand All @@ -115,7 +115,7 @@ thus you need to `unwind` and redefine it based on the original version.

## Gotchas *Important*

The rewind method does not automatically change the cookbook_name
The rewind method does not automatically change the `cookbook`
attribute for a resource to the current cookbook. Doing so could cause
some unexpected behavior, particularly for less expert chef users.

Expand All @@ -136,12 +136,12 @@ include_recipe "postgresql::server"
# my-postgresql.conf.erb located inside my-postgresql/templates/default/my-postgresql.conf.erb
rewind :template => "/var/pgsql/data/postgresql.conf" do
source "my-postgresql.conf.erb"
cookbook_name "my-postgresql"
cookbook "my-postgresql"
end

```

If you do not specify cookbook_name the rewind function will likely
If you do not specify `cookbook` the rewind function will likely
return an error since Chef will look in the postgresql cookbook for
the source file and not in the my-postgresql cookbook.

Expand Down